How to bypass the server proxy on remote agent connection
Purpose
It is possible to avoid agent communication problems bypassing the reverse proxy Bamboo uses.
If you are attempting this in order to fix artifact transfer problems (rejections, timeouts, etc.). Make sure the proxy server supports HTTP/1.1: Agent upload of artifacts fails to set Content-Length in HTTP/1.1. Guiding questions:
- Is HTTP/1.0 compatibility turned on?
- Are there any configuration options turned on related to chunked transfer encoding?
Solution
Remote agents
- Stop Bamboo
- Edit the <Bamboo_Install>/conf/server.xml file
- Add a new connector without the attributes (proxyName and proxyPort)
- Start Bamboo
Stop the remote agent
- Update the <URL:PORT> used by your agent to match new connector added (How to update the Bamboo server URL on an installed agent)
- Restart the agent
Elastic agents
- Stop the Bamboo server
Add the following system property in your Bamboo startup JVM (more details on Configuring your system properties)
setenv.sh-Dbamboo.ec2.agent.endpoint=http://localhost:8085
Make sure you update the 8085 to match the Tomcat port configured in your Bamboo instance to receive HTTP connections.
You may need to update
bamboo.jms.broker.client.uri
to match the non-proxied URL.- Restart your EC2 agent