Bamboo remote agent cannot connect to server with error "java.lang.IllegalArgumentException: Invalid connect parameters"

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

Bamboo remote agent fails to connect to Bamboo server with an error stating javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters

Diagnosis

The remote agent never registers as online on the Bamboo Server and the $BAMBOO_AGENT_HOME/atlassian-bamboo-agent.log contains an error similar to the below:

1 2 3 4 5 6 2021-06-06 09:14:55,397 WARN [AgentRunnerThread] [RemoteAgent$1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentRegistrationBean': Invocation of init method failed; nested exception is org.springframework.remoting.RemoteAccessException: Could not access JMS invoker queue [queue://com.atlassian.bamboo.registrationQueue]; nested exception is javax.jms.JMSException: Error while attempting to add new Connection to the pool ... 2021-06-06 09:14:55,489 FATAL [AgentRunnerThread] [AgentBootstrap] Exiting due to fatal exception. ... <stack trace> Caused by: javax.jms.JMSException: Could not create Transport. Reason: java.lang.IllegalArgumentException: Invalid connect parameters: {amp;maxReconnectAttempts=10}

Cause

There is a typo or misconfiguration in the Broker client URL defined on the Bamboo Server side (it is propagated to agents when they connect) at:

  • Bamboo Administration >> Overview >> General configuration >> Broker client URL

  • $BAMBOO_HOME/bamboo.cfg.xml

1 <property name="bamboo.jms.broker.client.uri">...</property>

There can be many types of misconfiguration/typos that can cause the Invalid connect parameters error.

In this particular example, a typo causing the ampersand not to be escaped:

1 <property name="bamboo.jms.broker.client.uri">failover:(tcp://hostname:54663?wireFormat.maxInactivityDuration=300000)?initialReconnectDelay=15000amp;maxReconnectAttempts=10</property>

See the solution below on how to correctly escape an ampersand in XML.

Solution

Since there can be any number of misconfigurations or typo in the string that cause the Invalid connect parameters error, you should inspect the string and see if you can identify it. Otherwise, consider going back to a known good default. Example:

1 <property name="bamboo.jms.broker.client.uri">failover:(tcp://hostname:54663?wireFormat.maxInactivityDuration=300000)?initialReconnectDelay=15000&amp;maxReconnectAttempts=10</property>

Any changes to the Broker URLs will require the Bamboo Server to be restarted for the change to apply, not just the agent.

Updated on March 17, 2025

Still need help?

The Atlassian Community is here for you.