Bamboo remote agent fails to connect with java.lang.IllegalArgumentException: Registration of remote agent failed
Bamboo remote agent fails to connect to the Bamboo Server with
java.lang.IllegalArgumentException: Registration of remote agent failed
A stack trace similar to the following is found in the
2017-06-04 17:53:01,248 WARN [ActiveMQ Session Task-5268] [RemoteInvocationTraceInterceptor] Processing of BambooJmsInvokerServiceExporter remote call resulted in fatal exception: com.atlassian.bamboo.buildqueue.manager.RemotedRemoteAgentManager.registerAgent java.lang.IllegalArgumentException: Registration of remote agent failed. There is already an agent of another type with the same id registered (). at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
There's already an agent registered with the server with the same ID. This ID is allocated by the Bamboo Server the first time the agent connects and is retained by the remote agent within <bamboo-agent-home>/bamboo-agent.cfg.xml.
Since there's already an agent connected to the server with the same ID, you'll need to investigate that angle. Some suggestions:
- Check the agent machine and see if there's two agent processes running out of the same <bamboo-agent-home> directory.
- If you've tried to clone an agent from an existing installation, it will need to get a new ID. Delete the <bamboo-agent-home>/bamboo-agent.cfg.xml and the next time it attempts to register with the server, it will receive a new ID.
- If you're a little unsure where to start or where the agent with the same ID is coming from, you can learn more about the existing, connected agent from the Bamboo UI. Substitute the below URL with your Bamboo Server URL and use the ID from the error message: http://bamboo.example.com/admin/agent/viewAgent.action?agentId=id-goes-here