Agents getting countless "connection refused" errors before they can connect to Bamboo. Any idea?

So, when I start up an Agent I can see the "A remote agent is loading in..." message. But the agent (nearly) always gets the "java.net.ConnectException: Connection refused: connect" error and has to retry. The funny thing is, it will connect eventually. But sometimes it takes 10 minutes before the agent manages to register itself to Bamboo and at other times it takes up to one hour or even more!

I know this never was a problem earlier on but I don't know what version of Bamboo we were running back then or if it has anything to do with the problem at all. We're running 3.4.3 now and I installed the newest agents. What's really startling me is that it works eventually. It would be another thing if it just couldn't connect at all. Then, I'd suspect the network to be the culprit. But at this point I really don't think so.

Here is what I've done allready:

  • Installed the newest agents: no change
  • First enabled the clients on Bamboo and then deactivated remote authentication completely just to be sure.
  • Checked the firewall rules between the different subnets: no problems there
  • Moved the agent machine into the same subnet as the bambooserver: no change
  • Deactivated the firewalls on the agent and bamboo server completly: even though they're in the same subnet now and no firewalls are activated at all; still got the "connection refused" .
  • Ping from client to bamboo and vice versa works
  • My next and last idea was a DNS problem. That could also explain why the connection sometimes works and sometimes it doesn't. So, I reinstalled the agents but used the IP instead of the URL which should rule out DNS problems

After all this the problem still exists and I'm running out of ideas.

Sure hope anyone of you has any suggestions. I'd be really appreciated!

1 answer

1 accepted

It seems to have been a DNS problem after all. I used the IP on the Agent servers but I also had to set it in the bamboo.cfg.xml file on the bamboo server. The bamboo.jms.broker.client.uri, to be precise. Just in case anyone else encounters this problem.

I had a similar problem. It looks like Bamboo sends the broker URL to the agent & it was sending it's local hostname, which isn't the same as the external hostname the agent needed to use. I've updated bamboo.cfg.xml & the Bamboo server hostname so it's all good. Thanks for the tip!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,786 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you