Agent startup fails with message "The system cannot find the file specified. (0x2)"

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When starting a Bamboo Remote Agent, the startup process fails, reporting the following messages in the <bamboo-agent-home>/atlassian-bamboo-agent.log:

FATAL  | wrapper  | 2011/04/30 17:18:35 | Unable to execute Java command.  The system cannot find the file specified. (0x2)
FATAL  | wrapper  | 2011/04/30 17:18:35 | Critical error: wait for JVM process failed
ERROR  | wrapper  | 2011/04/30 17:18:36 | The Bamboo build server service was launched, but failed to start.

Cause

Environment variables PATH, JAVA_HOME, JAVA_JDK or JAVA_JRE are pointing to the Java version distributed with Windows at C:\Windows\System32. This version of Java does not work correctly with the Agent Wrapper.

Resolution

In the remote agent machine, download and install a supported JDK version and make sure that the Windows environment variables are pointing to it.

  1. Check the JAVA_HOME/JAVA_JDK/JAVA_JRE variables.
  2. Check the PATH environment variable definition and ensure that the correct Java JDK is defined before the c:\windows\system32 part.

Alternatively, if just setting the variables does not work, please:

  1. Edit the property wrapper.java.command located in the file <bamboo-agent-home>/conf/wrapper.conf so that it points to the Sun JDK Java binary file:

    wrapper.java.command=%JAVA_HOME%/bin/java
  2. Restart the Agent.


Last modified on Sep 26, 2019

Was this helpful?

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