Bamboo Elastic Agents stuck on pending state with wire format negotiation timeout error
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Elastic agents are stuck on the Pending state in Bamboo, and the following error is seen in the logs.
1
WARN [ActiveMQ Task-2] [FailoverTransport] Failed to connect to [tcp://localhost:4527?wireFormat.maxInactivityDuration=300000] after: 1 attempt(s) with Wire format negotiation timeout: peer did not send his wire format., continuing to retry.
Environment
Issue seen on Bamboo 8.0.1
Diagnosis
Following error message is seen in below log files.
Application logs - atlassian-bamboo.log on Bamboo sever
1
2
3
[InetAddressBean] Cannot determine local host name; using "Unknown".
java.net.UnknownHostException: devops-bamboo: devops-bamboo: Name or service not known
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
On bamboo-elastic-agent.out file, following error message is seen
1
2
3
WARN [ActiveMQ Task-2] [FailoverTransport] Failed to connect to [tcp://localhost:4527?wireFormat.maxInactivityDuration=300000] after: 1 attempt(s) with Wire format negotiation timeout: peer did not send his wire format., continuing to retry.
ERROR [ActiveMQ Task-2] [FailoverTransport] Failed to connect to [tcp://localhost:4527?wireFormat.maxInactivityDuration=300000] after: 10 attempt(s)
ERROR [AgentRunnerThread] [ElasticAgentRegistrationBean] org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.IllegalStateException: javax.jms.JMSException: Disposed due to prior exception
Cause
Remote or Elastic agents uses Broker client URL to communicate with Bamboo. It is defined in <bamboo-home>bamboo.cfg.xml file and it looks like below
1
<property name="bamboo.jms.broker.client.uri">failover:(tcp://bamboo801:54663?wireFormat.maxInactivityDuration=300000)?initialReconnectDelay=15000&maxReconnectAttempts=10</property>
The problem is the domain which the elastic agent is trying to communicate with ( for example in the above case it is bamboo801 ) is removed from the /etc/hosts file on the Bamboo server, which maintains the hostname to IP address mapping.
Solution
The solution is to add the Bamboo server hostname defined in the Broker client URL to /etc/hosts file on the Bamboo server file.
Was this helpful?