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

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.



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


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:

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}


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
    <property name="">...</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:

<property name="">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.


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:

<property name="">failover:(tcp://hostname:54663?wireFormat.maxInactivityDuration=300000)?initialReconnectDelay=15000&amp;maxReconnectAttempts=10</property>
tip/resting Created with Sketch.

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

Last modified on Jul 28, 2021

Was this helpful?

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