Go Server <-> Agent communication issue.

254 views
Skip to first unread message

Meghanand Acharekar

unread,
Aug 4, 2016, 6:24:57 AM8/4/16
to go-cd
Hi,

We are running Go-Server & Go-Agent on the same machine for one of our local setup, but somehow agent is not able to communicate with server.
Following in the agent configuration.

# GO_SERVER=localhost
# export GO_SERVER
# GO_SERVER_PORT=8153
# export GO_SERVER_PORT
AGENT_WORK_DIR=/var/lib/${SERVICE_NAME:-go-agent}
DAEMON=Y
VNC=N

Environment Information.
OS : Ubuntu 16.04 
GoServer : 16.7.0-3819
GoAgnet : 16.7.0-3819

I see following exception printing continuously  in GO-Agent logs.


2016-08-04 15:43:19,388 [TouchLoopThread-17] INFO  go.agent.launcher.Lockfile:102 - Using lock file: /var/lib/go-agent/.agent-bootstrapper.running
2016-08-04 15:43:19,389 [main     ] ERROR cruise.agent.launcher.AgentLauncherImpl:98 - Launch encountered an unknown exception
java.lang.NullPointerException
at com.thoughtworks.cruise.agent.launcher.AgentLauncherImpl.getPort(AgentLauncherImpl.java:136)
at com.thoughtworks.cruise.agent.launcher.AgentLauncherImpl.getUrlGenerator(AgentLauncherImpl.java:127)
at com.thoughtworks.cruise.agent.launcher.AgentLauncherImpl.launch(AgentLauncherImpl.java:75)
at com.thoughtworks.go.agent.bootstrapper.AgentBootstrapper.go(AgentBootstrapper.java:72)
at com.thoughtworks.go.agent.bootstrapper.AgentBootstrapper.main(AgentBootstrapper.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.simontuffs.onejar.Boot.run(Boot.java:306)
at com.simontuffs.onejar.Boot.main(Boot.java:159)

Let me know if more information is required on this.


Thanks,
Meghanand

Moritz Lenz

unread,
Aug 4, 2016, 8:48:36 AM8/4/16
to go-cd
Hi,


On Thursday, 4 August 2016 12:24:57 UTC+2, Meghanand Acharekar wrote:
Hi,

We are running Go-Server & Go-Agent on the same machine for one of our local setup, but somehow agent is not able to communicate with server.
Following in the agent configuration.

# GO_SERVER=localhost
# export GO_SERVER
# GO_SERVER_PORT=8153
# export GO_SERVER_PORT
AGENT_WORK_DIR=/var/lib/${SERVICE_NAME:-go-agent}
DAEMON=Y
VNC=N


Please try setting GO_SERVER and GO_SERVER_PORT, which are currently commented out in your agent configuration.

Cheers,
Moritz

Aravind SV

unread,
Aug 4, 2016, 9:12:14 AM8/4/16
to go...@googlegroups.com
On Thu, Aug 4, 2016 at 8:48 AM, Moritz Lenz <morit...@gmail.com> wrote:
Please try setting GO_SERVER and GO_SERVER_PORT, which are currently commented out in your agent configuration.

For 16.7, GO_SERVER_URL should be ok. The other two should not be needed. Ketan is looking at this and will respond soon. It looks like this has to do with the order of upgrade between the server and the agent, since 16.7.0 changed the agent bootstrapper a bit. There should be an easy workaround for this, for now, while we look at whether the installer needs to be changed.

Meanwhile, Meghanand, do you remember the order you upgraded the agent and server?

Aravind SV

unread,
Aug 4, 2016, 9:21:11 AM8/4/16
to go...@googlegroups.com
Hello!

Can you please try this?

1. Stop the agent.
2. Remove or move /var/lib/go-agent/agent.jar and /var/lib/go-agent/agent-launcher.jar (if they exist).
3. Start the agent.

Should be just a one-time process. We think it happens because the agent was upgraded before the server (so new agent connects to the old server and gets confused). This is not a problem in 16.6 or earlier. Just in 16.7, because the agent was changed in that version.

The release notes and documentation will be updated to mention this. In 16.8 or probably 16.9, we will try to make it so that the agent will recognize this and fix itself. Sorry about the trouble.

Thanks,
Aravind


Ketan Padegaonkar

unread,
Aug 4, 2016, 9:37:57 AM8/4/16
to go...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Meghanand Acharekar

unread,
Aug 4, 2016, 9:47:51 AM8/4/16
to go-cd
Thanks for the help Aravind, I confirmed this from one of my colleague who did installation, what he remembers is go-agent was installed prior to go-server, its was a fresh installation not upgrade. I will try the given steps & update your further.

Meghanand Acharekar

unread,
Aug 4, 2016, 9:56:02 AM8/4/16
to go-cd
Aravind - Yes, this worked, removing "agent-launcher.jar" fixed this issue. Thanks again.

Aravind SV

unread,
Aug 4, 2016, 9:57:18 AM8/4/16
to go...@googlegroups.com
Glad to hear that! Thanks for confirming.

Cheers,
Aravind

--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages