Remote Agent fails to connect to Bamboo through IIS - HTTP 500 error

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Remote Agent fails to startup with the following settings:

  • Bamboo running behind IIS server
  • Remote Agent installed with the IIS URL

The following appears in Bamboo Agent log, e.g.: atlassian-bamboo-agent.log

INFO   | jvm 2    | 2015/07/28 10:37:42 | 2015-07-28 10:37:42,327 INFO [WrapperSimpleAppMain] [AgentContext] Requesting fingerprint, url: http://<Bamboo.IIS.URL>/agentServer/GetFingerprint.action?hostName=<agent.hostname>&version=3&agentUuid=<agentUuid>
INFO   | jvm 2    | 2015/07/28 10:37:42 | Exiting due to fatal exception.
INFO   | jvm 2    | 2015/07/28 10:37:42 | com.atlassian.bamboo.agent.bootstrap.RemoteAgentHttpException: HTTP status code 500 received in response to fingerprint request.
INFO   | jvm 2    | 2015/07/28 10:37:42 | 	at com.atlassian.bamboo.agent.bootstrap.AgentContext.initFingerprint(AgentContext.java:140)
INFO   | jvm 2    | 2015/07/28 10:37:42 | 	at com.atlassian.bamboo.agent.bootstrap.AgentContext.initServerSession(AgentContext.java:102)
INFO   | jvm 2    | 2015/07/28 10:37:42 | 	at com.atlassian.bamboo.agent.bootstrap.AgentContext.run(AgentContext.java:93)
INFO   | jvm 2    | 2015/07/28 10:37:42 | 	at com.atlassian.bamboo.agent.bootstrap.AgentBootstrap.run(AgentBootstrap.java:95)

The following appears in Bamboo Server log atlassian-bamboo.log

2015-07-28 10:37:38,015 ERROR [http-apr-8086-exec-6] [ExceptionMappingInterceptor] '192.168.1.30:52963' is not an IP string literal.
java.lang.IllegalArgumentException: '192.168.1.30:52963' is not an IP string literal.
	at com.atlassian.ip.InetAddresses.forString(InetAddresses.java:64)
	at com.atlassian.ip.Subnet.forPattern(Subnet.java:60)
	at com.atlassian.ip.IPMatcher$Builder.addPattern(IPMatcher.java:202)
	at com.atlassian.security.auth.trustedapps.AtlassianIPMatcher.<init>(AtlassianIPMatcher.java:38)
	at com.atlassian.bamboo.buildqueue.RemoteAgentAuthentications$2.apply(RemoteAgentAuthentications.java:71)
	at com.atlassian.bamboo.buildqueue.RemoteAgentAuthentications$2.apply(RemoteAgentAuthentications.java:60)
	at com.google.common.base.Predicates$AndPredicate.apply(Predicates.java:338)
	at com.google.common.collect.Iterators$7.computeNext(Iterators.java:649)

Cause

IIS server set X-Forwarded-For header with the remote agent's IP address (e.g. 192.168.1.30) and port number (e.g. 52963). However, Bamboo server need IP address only.

Resolution

  1. Un-install the Remote Agent
  2. Re-install the Remote Agent with the hostname of the machine running Bamboo (without going through IIS server), e.g.:

     java -jar atlassian-bamboo-agent-installer-X.X.jar http://bamboo-host-server:8085/bamboo/agentServer/ installntservice

Last modified on Nov 30, 2017

Was this helpful?

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