Bamboo 5 remote agent not registering
Asked by DATPROF:

I've installed bamboo v5 (on windows) and now i'm trying to start a remote agent on Ubuntu 12.04 LTS. When i run the following command:

```
sudo java -Dbamboo.home=/home/bamboo/data -jar atlassian-bamboo-agent-installer-5.0.jar https://[bamboo-host]/bamboo/agentServer/
```

The last message during startup is:

```
INFO   | jvm 1    | 2013/07/31 09:54:50 | 2013-07-31 09:54:50,787 ERROR [Thread-1] [SystemProperty] Cannot find the bamboo.darkfeature.app-switcher.new environment variable
```

And in bamboo server the following message:

```
31-jul-2013 9:52:17 A remote agent is loading on [agenthostname] ([agent-ip]).
```

Any suggestion on how to get this setup working? The agent is not showing up as remote agent in bamboo, however the message says to me that they can see eachother...


Answers:
author: DATPROF
body: I've managed to solve the problem. This wasn't because of the error, but after a long period of time some exceptions showed up. This was caused due the the broker port being closed (54663) on the server machine.


author: Paramanand dhuri
body: Just check the proper Ip specified in file bamboo.cfg.xml for property \<property name="bamboo.jms.broker.client.uri"\>

And Check whether the port 54663 accessible.

Then it will work for sure


author: Tristan Stricker
body: I also had this problem my administrator had applied a new firewall policy which was blocking port 54663. Creating an exception for this fixed the problem


author: Michiel Nieuwstraten
body: Mmm, looks like the broker-client-uri in bamboo.cfg.xml was wrong.

NetworkAnalyser is of no use...

comments: author: Sathishkumar Dhanapal
body: Thank you. After pointing to the bamboo server in the client.uri in bamboo.cfg.xml , the remote agent successfully registered.


author: Michiel Nieuwstraten
body: OK, then it says:

```
INFO   | jvm 1    | 2013/08/09 13:31:00 | 2013-08-09 13:31:00,589 ERROR [ActiveMQ Task-1] [FailoverTransport] Failed to connect to [tcp://dft1lnx014vz.lan.inology.nl:54663?wireFormat.maxInactivityDuration=300000] after: 10 attempt(s)
```

and later on:

```
INFO   | jvm 1    | 2013/08/09 13:31:00 | Caused by: java.net.UnknownHostException: dft1lnx014vz.lan.inology.nl
```

But using the NetworkAnalyser as mentioned on <https://confluence.atlassian.com/display/BAMKB/Troubleshooting+Remote+Agents#TroubleshootingRemoteAgents-RemoteAgentRegistration> returns:

```
# java NetworkAnalyser http://bamboo.lan.inology.nlTesting connectivity to Bamboo Server: http://bamboo.lan.inology.nlTrying to establish connection with remote server: http://bamboo.lan.inology.nlConnection established!Testing connectivity to Bamboo Server: http:?//bamboo.lan.inology.nl:54663Trying to establish connection with remote server: http:?//bamboo.lan.inology.nl:54663Connection established!
```

As well as:

```
# java NetworkAnalyser http://dft1lnx014vz.lan.inology.nlTesting connectivity to Bamboo Server: http://dft1lnx014vz.lan.inology.nlTrying to establish connection with remote server: http://dft1lnx014vz.lan.inology.nlConnection established!Testing connectivity to Bamboo Server: http:?//dft1lnx014vz.lan.inology.nl:54663Trying to establish connection with remote server: http:?//dft1lnx014vz.lan.inology.nl:54663Connection established!
```

For starting the agent I use:

```
# java -Dbamboo.home=/data/bamboo-agent-1 -Djava.io.tmpdir=/tmp/AGENT1  -jar atlassian-bamboo-agent-installer-5.0.jar http://bamboo.lan.inology.nl/agentServer/
```


author: Michiel Nieuwstraten
body: Not an answer, but a look-alike problem here.

I get to exact the same point, but I'm pretty shure broker port is open/listening (I suppose Ferdy meant closed by a firewall, or so). In Bamboo I do get this remote agent authenticated.

Logging during startup of the agent seems OK until here:

```
INFO   | jvm 1    | 2013/08/09 12:00:52 | 2013-08-09 12:00:52,657 INFO [Thread-1] [RemoteAgent] com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent starting.INFO   | jvm 1    | 2013/08/09 12:00:52 | 2013-08-09 12:00:52,740 INFO [Thread-1] [RemoteAgentHomeLocatorForBootstrap] Agent home located at '/data/bamboo-agent-1'INFO   | jvm 1    | 2013/08/09 12:00:52 | 2013-08-09 12:00:52,750 INFO [Thread-1] [RemoteAgent] Starting Bamboo Remote Agent...INFO   | jvm 1    | 2013/08/09 12:00:52 | 2013-08-09 12:00:52,750 INFO [Thread-1] [RemoteAgent] Starting application context...INFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,073 WARN [Thread-1] [PropertyPlaceholderConfigurer] Could not load properties from class path resource [bamboo-init.properties]: class path resource [bamboo-init.properties] cannot be opened because it does not existINFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,120 INFO [Thread-1] [RemoteAgentHomeLocatorForBootstrap] Agent home located at '/data/bamboo-agent-1'INFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,120 INFO [Thread-1] [RemoteAgentHomeDirectoryLayout] Plugin directory: /data/bamboo-agent-1/pluginsINFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,120 INFO [Thread-1] [RemoteAgentHomeDirectoryLayout] Plugin cache directory: /data/bamboo-agent-1/caches/pluginsINFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,191 INFO [Thread-1] [BambooActiveMQConnectionFactory] Setting broker URL to 'failover:(tcp://dft1lnx014vz.lan.inology.nl:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&amp;initialReconnectDelay=15000'INFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,300 INFO [Thread-1] [BambooActiveMQConnectionFactory] Setting broker URL to 'failover:(tcp://dft1lnx014vz.lan.inology.nl:54663?wireFormat.maxInactivityDuration=300000)?maxReconnectAttempts=10&amp;initialReconnectDelay=15000'INFO   | jvm 1    | 2013/08/09 12:00:54 | 2013-08-09 12:00:54,337 ERROR [Thread-1] [SystemProperty] Cannot find the bamboo.darkfeature.app-switcher.new environment variable
```

Anyone any idea how to troubleshoot/resolve?

comments: author: DATPROF
body: I suggest waiting a while (5 min or so). If using a terminal to run, set scrollback lines to lets say 1000. The real error appeared after some sort of timeout. But then it immideatly retries. So keep an eye on it.


author: Przemek Bruski
body: did you run

sudo java -Dbamboo.home=/home/bamboo/data -jar atlassian-bamboo-agent-installer-5.0.jar https://\[bamboo-host\]/bamboo/agentServer/ install

first?

comments: author: DATPROF
body: I've ran that, but right after that i discovered that broker port was closed.


author: David Le
body: I had the same problem, I already tried "sudo java -jar ... install" with no luck. Then I tried Atlassian trouble shoot/debug/install, etc... with no luck. I also disabled the firewall on both bamboo agent, and server machines. I also ping from and to both machines.

However, the agent is still hanging with the (error) "Broker URI... is invalid.

Any suggestion would be much appreciated !

startup command:

$ java -jar atlassian-bamboo-agent-installer-5.4.1.jar [](http://my_host_name:8085/agentServer/)<http://my_host_name:8085/agentServer/>

the last line of output (error):

INFO \| jvm 1 \| 2014/03/13 16:56:29 \| 2014-03-13 15:56:29,135 WARN \[Thread-1\] \[BambooActiveMQConnectionFactory\] Broker URI: tcp://my_host_name:54663?wireFormat.maxInactivityDuration=300000 is invalid: java.net.UnknownHostException: my_host_name

Please note that I replaced my real host name with "my_host_name" in this post.


author: DATPROF
body: If you try to ping the hostname from the machine, does the hostname resolve? UnknownHostException suggestes it fails to contact the machine.


author: David Le
body: Thank you for your reply.

Yes, I ping from agent to host, and then from host to agent. They both got packets reply. I could also telnet from the agent to the server for both ports 8085 and 54663.


author: S Alexandre Lemaire
body: I have this same problem. All ports open, I can connect to ports both ways, but I never get anything more than "A remote agent is loading on ip-..."


Tags: bamboo-administration