Jira server ignores http.nonProxyHosts JVM option
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
When a JIRA application is configured to use an outbound proxy with the -Dhttp.proxyHost
JVM argument, Crowd or other service integrations are not bypassing the proxy and connection fails. This occurs even if -Dhttp.nonProxyHosts
appears to be appropriately set.
In Windows environment, JIRA can't start if a pipe character ( | ) is used for -Dhttp.nonProxyHosts
in setenv.bat.
Causes
There are a few causes for this issue:
(Unix/Linux only): The pipe character ( | ) may require backslash ( \ ) escaping so it is not translated as a shell pipeline:
1
-Dhttp.nonProxyHosts=*.atlassian.com\|localhost
(Windows only): The pipe character ( | ) can't be escaped using ( ^ ) and the host following it is not recognized as an internal or external command, operable program or batch file.
1
-Dhttp.nonProxyHosts=*.atlassian.com^|localhost
The value should not be both quoted and escaped. For example, this does not work as the backslash character is passed in as part of the value:
1
-Dhttp.nonProxyHosts="*.atlassian\|localhost"
(JIRA version < 4.3only): Your JIRA application's lib directory includes
xfire-aegis-1.2.6.jar
andxfire-core-1.2.6.jar
, but both of those jar files don't include thetransport.http.ProxyUtils
class, the controller of the JVM proxy options. This defect JRA-20715 was fixed in JIRA 4.3.
Workarounds
Due to issues with escaping,
-Dhttp.nonProxyHosts
shouldn't be defined in setenv.bat or setenv.sh. Instead, set it in <JIRA_Install>/conf/catalina.properties
as follows:1
http.nonProxyHosts=*.atlassian.com|localhost
Ensure there are no quotation marks in the value.
If you are using JIRA 4.3 or earlier:
JIRA version < 4.3 only...
Add
xfire-java5-1.2.6.jar
into<JIRA-install>/common/lib
, or replace<JIRA-Install>/common/lib/xfire-aegis-1.2.6.jar
andxfire-core-1.2.6.jar
with xfire-all-1.2.6.jar.Remove any quotations in the
JAVA_OPTS
variable.Restart your JIRA applications.
Was this helpful?