Bamboo Elastic Agents stuck on pending state with wire format negotiation timeout error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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 Pending state in Bamboo and following error in seen in the logs.

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
[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
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

    <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. 


Last modified on Jun 13, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.