Disconnected agent - runs unknown build we're not aware of

I'm having trouble with an agent that is disconnected that I can't figure out how to reconnect.  I believe it got disconnected when someone tried to manually stop a build that was in the middle of a huge SVN checkout.  Now that build agent shows as disconnected with an inactivity reason of "Runs unknown build we're not aware of", and no amount of killing processes or rebooting the machine or restarting the service seems to help.  I need that machine back online, but I'm pretty much lost for what to do to fix the problem at the moment.  I did some searching and found that there was a bug related to this, but it was fixed quite a while ago.  We are currently using TeamCity Professional 4.0 (build 8080).

Can anyone help me with this?

5 comments
Comment actions Permalink

Please take a look at the teamcity-agent.log after the agent service restart, there could be pointers why agent is not starting.

0
Comment actions Permalink

We had tried uninstalling and reinstalling the build agent on this machine, and now we simply can't get the service to start.  The only log file I can find now is the wrapper.log.  This is the error we're seeing there:

STATUS | wrapper  | 2009/01/08 13:51:34 | Starting the TeamCity Build Agent Service service...
STATUS | wrapper  | 2009/01/08 13:51:34 | --> Wrapper Started as Service
ERROR  | wrapper  | 2009/01/08 13:51:34 | The Java Runtime Environment home directory could not be located in the system registry.
STATUS | wrapper  | 2009/01/08 13:51:34 | Launching a JVM...
FATAL  | wrapper  | 2009/01/08 13:51:34 | Unable to execute Java command.  The system cannot find the file specified. (0x2)
FATAL  | wrapper  | 2009/01/08 13:51:34 |     "" -Xrs -Djava.library.path="../launcher/lib;../launcher/bin" -classpath "../launcher/lib/wrapper.jar;../launcher/lib/launcher.jar" -Dwrapper.key="QKM7kJFg8aDzpmgc" -Dwrapper.port=32002 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=3880 -Dwrapper.version="3.2.3" -Dwrapper.native_library="wrapper" -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp jetbrains.buildServer.agent.StandAloneLauncher -ea -Xmx512m -XX:+HeapDumpOnOutOfMemoryError -Xrs -Dlog4j.configuration=file:../conf/teamcity-agent-log4j.xml -Dteamcity_logs=../logs/ jetbrains.buildServer.agent.AgentMain -file ../conf/buildAgent.properties
FATAL  | wrapper  | 2009/01/08 13:51:34 | Critical error: wait for JVM process failed
ERROR  | wrapper  | 2009/01/08 13:51:36 | The TeamCity Build Agent Service service was launched, but failed to start.

I've checked to make sure that everything it seems to be looking for in the launcher directory is there, and I also checked the settings in the buildAgent.properties file, and there's nothing out of the ordinary that I can see in there.

Does this give you any more clues as to what's happening?

Thanks.

0
Comment actions Permalink

According to this error:
Unable to execute Java command.  The system cannot find the file specified. (0x2)

it looks like agent service cannot find java. Could you please check that there is jre folder in the agent installation directory and this folder contains valid jre, i.e. java.exe is starting.

0
Comment actions Permalink

I'm not 100% sure what the problem really was, but I did add in a jre directory on the build agent (even though other build agents did not have it), and then I was able to make the build server run.  However, I was able to delete the jre folder and things still run.  So who knows what the problem was.  But I appreciate the help!  And the problem is fixed.

Thanks very much!

0
Comment actions Permalink

I had the same problem.
After I copied the jre dir to the agent\launcher dir, the service started successfully.
Then I noticed that the jre was automatically copied by the service to the \launcher\bin dir - which explains why it still works after you delete the copied jre.

0

Please sign in to leave a comment.