It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to configure proxy server settings in Bamboo?

Haani Niyaz Jan 04, 2016

 

I can't seem to find any instructions to set the proxy server settings for Bamboo.

For testing purposes I'm just performing a simple wget www.google.com in a task.

 

Note that the following does work from the console:

wget -e use_proxy=yes -e http_proxy=10.101.101.10:8080 www.google.com

 

I followed the JIRA doc below:

https://confluence.atlassian.com/display/JIRAKB/How+to+Configure+an+Outbound+HTTP+and+HTTPS+Proxy+for+JIRA+applications

All configurations set in:

bin/setenv.sh

:

Attempt 1:

Added properties to JVM_SUPPORT_RECOMMENDED_ARGS

 

JVM_SUPPORT_RECOMMENDED_ARGS="-Dbamboo.paths.set.allowed=true -Dhttp.proxyHost=10.101.101.10 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=10.101.101.10 -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=10.20.*.*\|localhost"

 

Did not work and linking between apps failed.

 

Attempt 2 (as per comment in link above):

Added properties to JAVA_OPTS

 

JAVA_OPTS="-Xms${JVM_MINIMUM_MEMORY} -Xmx${JVM_MAXIMUM_MEMORY} ${JAVA_OPTS} ${JVM_REQUIRED_ARGS} ${JVM_SUPPORT_RECOMMENDED_ARGS} -Dhttp.proxyHost=10.101.101.10 -Dhttp.proxyPort=8080 -Dhttps.proxyHost=10.101.101.10 -Dhttps.proxyPort=8080 -Dhttp.nonProxyHosts=10.208.78.*\|localhost" #${BAMBOO_HOME_MINUSD}"

 

Did not work and linking between apps failed.

I have also looked at this question:

https://answers.atlassian.com/questions/27768

But I can't find the file wrapper.conf 

 

Any suggestions on how this can be set correctly?

3 answers

1 accepted

1 vote
Answer accepted
Haani Niyaz Jan 05, 2016

Looks like the instructions I posted above works after all. A couple of things to note:

 

  1. Environment variables need to be set as arguments within the tasks. Adding JAVA_OPTS has no impact on your tasks.
  2. the  -Dhttp.nonProxyHosts wildcard does not seem to work. This needs added individually (seperated by pipes) to get the app linking to work. 
    https://jira.atlassian.com/browse/JRA-38498

 

1 vote
Thiago Bomfim Atlassian Team Jan 04, 2016

Haani,

If you're trying to set up an outbound proxy so UPM will reach the internet for your server, the steps you took are correct.

Have you restarted your application after changing setenv.sh?

Best,
Thiago

0 votes
Dewald Batt Nov 29, 2017 • edited

Sry, i don't have an answer. Bumping this post because i have the same problem and desperately need an answer. (How was this post marked as "Solved" without a solution btw?)

I'm trying to setup the proxy settings in bamboo so that i can add a linked repository via Bitbucket Cloud.
(Side note: my bamboo installation is running as a docker image)

I too have been trying to set the proxy settings in the JVM_SUPPORT_RECOMMENDED_ARGS variable in the bin/setenv.sh file:
e.g.
-Dhttps.proxyHost=
-Dhttps.proxyPort=
-Dhttps.proxyUser=
-Dhttps.proxyPassword=
-Dhttps.nonProxyHosts=

When Bamboo starts up i can look at the "Environment Variables", i can see the JAVA_OPTS variable populated with the relevant proxy values.

Yet, as soon as i try to add a linked repository it fails with some sort of proxy error.
Trying various configurations i either get one of these errors:

----------------------------------------------------------------------------

1.) "Failed to load data from Bitbucket. com.atlassian.bamboo.plugins.bitbucket.api.BitbucketApiException: HTTP 407"

"The following error was encountered while trying to retrieve the URL: https://api.bitbucket.org/*

Cache Access Denied.

Sorry, you are not currently allowed to request https://api.bitbucket.org/* from this cache until you have authenticated yourself."

----------------------------------------------------------------------------

2.) "Failed to load data from Bitbucket. [502 Proxy Error]" on the frontend accompanied by the following in the logs:

[DefaultHttpClient] I/O exception (java.net.SocketException) caught when connecting to {s}->https://api.bitbucket.org:443: Network is unreachable (connect failed)

----------------------------------------------------------------------------

I have also configured the proxy on the environment itself and am able to connect to the Bitbucket Cloud repository using curl and make a successful call, but i can't seem to get the poxy settings to work in the JVM for Bamboo.

Any insight would be appreciated.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Marketplace Apps & Integrations

Webinar alert! An IT Admin's Guide to Securing Collaboration at Scale

Hello, Atlassian Community! My name is Dave Meyer and I'm a Principal Product Manager at Atlassian. I wanted to give this community a heads up about an upcoming Webinar that might be of interest...

179 views 2 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you