Bamboo agent cannot start due to error java.lang.RuntimeException: Unable to delete: C:\bamboo-agent-home\classpath\winp.x64.dll

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.

Summary

Bamboo agent does not start and throws an Unable to delete: C:\bamboo-agent-home\classpath\winp.x64.dll error.

Environment

Bamboo agent running on Windows OS.

Diagnosis

The following error can be seen in the logs:

FATAL [WrapperSimpleAppMain] [AgentBootstrap] Exiting due to fatal exception.
java.lang.RuntimeException: 
	at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.removeSpuriousFiles(ClasspathBuilder.java:146)
	at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.sync(ClasspathBuilder.java:109)
	at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.getClassLoader(ClasspathBuilder.java:59)
	at com.atlassian.bamboo.agent.bootstrap.AgentContext.newClassLoader(AgentContext.java:335)
	at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:97)
	at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:121)
	at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.main(AgentBootstrap.java:54)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:349)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: C:\bamboo-agent-home\classpath\winp.x64.dll
	at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
	at sun.nio.fs.AbstractFileSystemProvider.delete(Unknown Source)
	at java.nio.file.Files.delete(Unknown Source)
	at com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder.removeSpuriousFiles(ClasspathBuilder.java:144)
	... 12 more
JVM exited while starting the application.

Cause

Java platform SE binary process is using the file C:\bamboo-agent-home\classpath\winp.x64.dll file preventing the agent from starting.

Solution

Confirm that the user account that runs the Bamboo service has access to the agent's home directory. Then, terminate the Java process and restart the agent.

Last modified on Nov 16, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.