Outbound proxy jira server

Gayan Gunapala January 15, 2021

Hi, 

We are trying out the Jira server in a docker container. We use a proxy server for internet access for the container host. Inside the container, we can access the Atlassian marketplace and other internet endpoints. However, Jira Server itself cannot access the internet.

We have started the server as below

 

/usr/lib/jvm/java-1.8-openjdk/bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms384m -Xmx2048m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=512m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dorg.dom4j.factory=com.atlassian.core.xml.InterningDocumentFactory -XX:-OmitStackTraceInFastThrow -Djava.locale.providers=COMPAT -Djira.home=/var/atlassian/jira -Datlassian.plugins.startup.options=-fg -Dhttp.proxyHost=http://proxy.sy.com.au -Dhttps.proxyHost=http://proxy.sy.com.au -Dhttp.proxyPort=3128 -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=localhost\|169.254.169.254\|169.254.170.2\|127.0.0.1 -Djdk.tls.ephemeralDHKeySize=2048 -Djava.protocol.handler.pkgs=org.apache.catalina.webresources -Dorg.apache.catalina.security.SecurityListener.UMASK=0027 -Xloggc:/opt/atlassian/jira/logs/atlassian-jira-gc-%t.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintGCCause -Dignore.endorsed.dirs= -classpath /opt/atlassian/jira/bin/bootstrap.jar:/opt/atlassian/jira/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap -Dhttp.proxyHost=http://proxy.sy.com.au -Dhttps.proxyHost=http://proxy.sy.com.au -Dhttp.proxyPort=3128 -Dhttps.proxyPort=3128 -Dhttp.nonProxyHosts=localhost|169.254.169.254|169.254.170.2|127.0.0.1 start

and in the logs

2021-01-15 21:23:35,971 UpmScheduler:thread-1 WARN anonymous [c.a.upm.pac.PacClientImpl] Error when querying application info from MPAC: com.atlas
sian.marketplace.client.MpacException: org.apache.http.conn.ConnectTimeoutException: Connect to marketplace.atlassian.com:443 [marketplace.atlassian.c
om/13.236.8.160, marketplace.atlassian.com/13.236.8.159, marketplace.atlassian.com/13.236.8.158] failed: connect timed out

 

Any help would be highly appreciated.

 

BR,

Gayan

 

2 answers

1 accepted

0 votes
Answer accepted
mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 20, 2021

Hi @Gayan Gunapala,

Can I know how you are passing the JVM arguments? Are you editing the setenv.sh file or you are passing them as environment variables?

According to this article, it looks like editing the file would work.

Thanks,
Moga

Gayan Gunapala January 20, 2021

Hi @mogavenasan 

Yes, passing via command line didn't work but editing setenv.sh worked. 

 

BR,

Gayan

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2021

Glad to hear that!

Please mark this thread as solved if you are happy with the solution.

Thanks.

Gayan Gunapala January 21, 2021

It's good it worked. But this is not covered in Atlassian documentation. The suggested method in the documentation doesn't work.

Like mogavenasan likes this
mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2021

I'm not sure where you are getting the Docker image for Jira. However, there's one that is being maintained by Atlassian (still not officially supported by Atlassian yet); https://hub.docker.com/r/atlassian/jira-software.

On this page, Outbound Proxy is not covered which means we will need to configure it manually. I'm not sure which documentation you are referring to.

Gayan Gunapala January 21, 2021

https://confluence.atlassian.com/jirakb/configure-an-outbound-proxy-for-use-in-jira-server-247857187.html

This document says to pass as arguments which I did as the docker start up command. Anyway, it's all good for the moment as we hard coded it into the docker image.

Thanks

mogavenasan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 21, 2021

That document did not cover anything to do with Docker (I can't even find the word "Docker" on that page). I think there was a misunderstanding and glad to know that we cleared that up! :)

0 votes
Northrop Marklund February 16, 2022

I can't figure out what the problem is yet. In principle, I don't understand how proxy servers work, but I often use them. In theory, it would be nice to figure out how it all works from a programming point of view, but I always don't have enough time for this. So far, I'm using https://soax.com/, since this is the most convenient service for me. I like how they work and have never had any problems using this proxy. So I can't advise you anything specific yet, because I don't understand the topic

Suggest an answer

Log in or Sign up to answer