Remote agent points to incorrect hostname instead of Bamboo's server IP
Problem
Remote Agent is started on remote machine and has been given approval on Bamboo server (if Agent authentication is configured).
However, the remote agent does not appear as Online.
The following appears in Bamboo Overview > Build Resources > Agents > Online Remote Agents tab
:
May 17, 2015 4:03:38 AM A remote agent is loading on <hostname> (10.10.2.250).
The following appears in the remote agent's atlassian-bamboo.log
:
INFO | jvm 1 | 2015/08/11 17:37:18 | 2015-08-11 17:37:18,650 ERROR [ActiveMQ Task-1] [FailoverTransport] Failed to connect to [tcp://<hostname>:54663?wireFormat.maxInactivityDuration=300000] after: 10 attempt(s)
INFO | jvm 1 | 2015/08/11 17:37:18 | 2015-08-11 17:37:18,666 INFO [ActiveMQ Connection Executor: unconnected] [PooledConnectionFactory] Expiring connection ActiveMQConnection {id=ID:id-vm-2316-1439285557288-1:1,clientId=ID:id-vm-2316-1439285557288-0:1,started=false} on IOException: java.net.UnknownHostException: <hostname>
INFO | jvm 1 | 2015/08/11 17:37:18 | Exiting due to fatal exception.
INFO | jvm 1 | 2015/08/11 17:37:18 | java.lang.reflect.InvocationTargetException
OR
INFO | jvm 1 | 2015/05/17 19:35:47 | 2015-05-17 19:35:46,988 INFO [Thread-0] [BambooActiveMQConnectionFactory] Setting broker URL to 'failover:(tcp://localhost:54663?wireFormat.maxInactivityDuration=300000)
?initialReconnectDelay=15000&maxReconnectAttempts=10'
INFO | jvm 1 | 2015/05/17 19:35:47 | 2015-05-17 19:35:46,991 WARN [Thread-0] [BambooActiveMQConnectionFactory] Broker URI: tcp://localhost:54663?wireFormat.maxInactivityDuration=300000 is invalid: java.net.
ConnectException: Connection refused
Diagnosis
Check the hostname of Broker client URL configured at Overview >> System >> General Configuration
.
"Ping" the hostname in the remote agent machine.
Cause
The remote agent in another machine is trying to connect to an unknown hostname
or localhost
instead of Bamboo's IP address.
The agent obtains the Broker client URL from the Bamboo configuration to connect to Bamboo server.
Resolution
- Stop Remote Agent.
Set the correct hostname or Bamboo's IP address for Broker client URL at bamboo
Overview >> System >> General Configuration
.- Restart Bamboo server as this change is not applied until then.
Start Remote Agent.
Please refer to our documentation that describes the Broker URL in Bamboo for more details.