tc-sdk:start build agent not launching, but works when run using agent.bat start.

Hola!,

I am attempting to reuse a server/10.0 distribution between multiple plugins that I'm developing.  I set the  <teamcityDir>C:\pluginpath\servers\10.0\</teamcityDir> on the other builds to the first plugin where I did a tc-sdk:init.  I am able to get the server to come up no problem.  (testing shows that even the orginal plugin which was working does not seem to launch the buildAgent properly anymore either when doing a tc-sdk:init)

When run mvn clean package tc-sdk:start, the agent will not run it exits quickly.  teamcity-agent.log doesn't get updated but launcher.log does.

The launcher.log contains:
[2017-10-19 02:09:58,332] INFO - dServer.agent.run.AgentProcess - Agent process finished
[2017-10-19 02:09:58,333] INFO - ldServer.agent.run.AgentRunner - Agent has exited with code: 2
[2017-10-19 02:09:58,335] ERROR - ldServer.agent.run.AgentRunner - Too short run time, most likely there is some installation problem: 0.155 sec.
[2017-10-19 02:09:58,335] INFO - ldServer.agent.run.AgentRunner - Launcher is exiting
That's not much to go on.

If I run the agent.bat start it does actually come up and connect.
However, in the console output I see the following:
[2017-10-19 02:15:22,296] WARN - jetbrains.buildServer.AGENT - TaskBuildRunner created.
[2017-10-19 02:15:24,964] WARN - ildServer.util.EventDispatcher - Error in event handler: java.lang.NumberFormatExcept
ion: Value out of range. Value:"144" Radix:10
java.lang.NumberFormatException: Value out of range. Value:"144" Radix:10
at java.lang.Byte.parseByte(Byte.java:151)
at java.lang.Byte.parseByte(Byte.java:175)
at jetbrains.buildServer.agent.javaDowser.JavaDowser.tryJava(JavaDowser.java:204)
at jetbrains.buildServer.agent.javaDowser.JavaDowser.examJavaInDirectory(JavaDowser.java:137)
at jetbrains.buildServer.agent.javaDowser.JavaDowser.findJavaStuffInDirectory(JavaDowser.java:96)
at jetbrains.buildServer.agent.javaDowser.JavaDowser.findJavaInDirectories(JavaDowser.java:243)
at jetbrains.buildServer.agent.javaDowser.JavaDowser.findAllCandidates(JavaDowser.java:54)
at jetbrains.buildServer.agent.javaDowser.JavaDowserAgentImpl.dowseAndSelectJavas(JavaDowserAgentImpl.java:76)
at jetbrains.buildServer.agent.javaDowser.JavaDowserAgentImpl.access$100(JavaDowserAgentImpl.java:16)
at jetbrains.buildServer.agent.javaDowser.JavaDowserAgentImpl$Listener.beforeAgentConfigurationLoaded(JavaDowser
AgentImpl.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68)
at com.sun.proxy.$Proxy6.beforeAgentConfigurationLoaded(Unknown Source)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.init(BuildAgentImpl.java:797)
at jetbrains.buildServer.agent.AgentMain2.startAgent(AgentMain2.java:211)
at jetbrains.buildServer.agent.AgentMain2.main2(AgentMain2.java:76)
at jetbrains.buildServer.agent.AgentMain2.main(AgentMain2.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at jetbrains.buildServer.agent.AgentMain.main(AgentMain.java:43)

I'm assuming this error is what is causing the launcher to fail during the tc-sdk:start and that this error is related to the java detection in some way?
I am running:
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Using the agent via the agent.bat is not a nice as using the tc-sdk:start since that mechanism provides debugging ports...

Any ideas?
Thanks.
--dave

1 comment
Comment actions Permalink

This issue looks similar to:
https://youtrack.jetbrains.com/issue/TW-47574


Build agent is throwing an error on startup when searching for the installed Java versions. This is preventing the build agent from setting the needed environment variables. It appears this is due to an error parsing the Java update version.

Marked as fixed.

--dave

0

Please sign in to leave a comment.