Microservice build timesout

Product/components used and version/fix level are you on:

version: 1017.0.366

Detailed explanation of the problem:

Hey guys. I have rancher installed and running. I created the sample microservice using the archetype. Due to some reason the microservice would just not build. The build always times out. I build other microservices, they build just fine.

Error messages / full error message screenshot / log fileL

 Copying 4 resources
[INFO] copy resources from Resource {targetPath: null, filtering: true, FileSet {directory: C:\Users\ARSI\OneDrive - Software AG\Documents\cumulocityLwM2MIntegrationService\src\main\configuration, PatternSet [includes: {}, excludes: {}]}} toC:\Users\ARSI\OneDrive - Software AG\Documents\cumulocityLwM2MIntegrationService\target\docker-work\etc
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] copy resources from Resource {targetPath: null, filtering: true, FileSet {directory: C:\Users\ARSI\OneDrive - Software AG\Documents\cumulocityLwM2MIntegrationService\src\main\docker, PatternSet [includes: {}, excludes: {}]}} toC:\Users\ARSI\OneDrive - Software AG\Documents\cumulocityLwM2MIntegrationService\target\docker-work
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Building microservice image for target architecture linux/amd64
[INFO] Building Docker image. Docker dir=C:\Users\ARSI\OneDrive - Software AG\Documents\cumulocityLwM2MIntegrationService\target\docker-work,tags=[cumulocityLwM2MIntegrationService:latest, cumulocityLwM2MIntegrationService:1.0.0-SNAPSHOT], build arguments={}, platform=linux/amd64
[INFO] Waiting for image build to complete (timeout=360s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  06:11 min
[INFO] Finished at: 2023-10-26T00:44:16+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.nsn.cumulocity.clients-java:microservice-package-maven-plugin:1017.0.366:package (package) on project cumulocityLwM2MIntegrationService: Execution package of goal com.nsn.cumulocity.clients-java:microservice-package-maven-plugin:1017.0.366:package failed: org.apache.maven.MavenExecutionException: Docker build timed out: TimeoutException -> [Help 1]
[ERROR] 

I have also attached my project. Can someone try building it ?

I do not think this is the issue here but this would cause issues along the line:

		<microservice.name>cumulocityLwM2MIntegrationService</microservice.name>

The microservice name cannot be longer than 23 characters:
https://cumulocity.com/guides/microservice-sdk/concept/#packing

Also, you must be using an old version of the archetype:

	<repositories>
		<repository>
			<id>cumulocity</id>
			<layout>default</layout>
			<url>http://download.cumulocity.com/maven/repository</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>public</id>
			<url>http://download.cumulocity.com/maven/repository</url>
		</pluginRepository>
	</pluginRepositories>

The URLs need to be https for recent Maven versions.

Hi Harald,
I made the suggested changes without any luck



Arsalan Mahmood Siddiqi

Found the issue: the answer was actually already in the link in my first reply: max 23 characters which need to be only lower-case letters, digits and dashes.

After changing the name, the build is successful for me.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.