Jira server ignores http.nonProxyHosts JVM option

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

tip/resting Created with Sketch.

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:

  1. (Unix/Linux only): The pipe character ( | ) may require backslash ( \ ) escaping so it is not translated as a shell pipeline:

    -Dhttp.nonProxyHosts=*.atlassian.com\|localhost
  2. (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.

    -Dhttp.nonProxyHosts=*.atlassian.com^|localhost
  3. 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:

    -Dhttp.nonProxyHosts="*.atlassian\|localhost"
  4. (JIRA version < 4.3 only): Your JIRA application's lib directory includes xfire-aegis-1.2.6.jar and xfire-core-1.2.6.jar, but both of those jar files don't include the transport.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:

    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...
    1. Add xfire-java5-1.2.6.jar into <JIRA-install>/common/lib, or replace <JIRA-Install>/common/lib/xfire-aegis-1.2.6.jar and xfire-core-1.2.6.jar with xfire-all-1.2.6.jar.
    2. Remove any quotations in the JAVA_OPTS variable.
    3. Restart your JIRA applications.
Description

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.

Last modified on Sep 25, 2019

Was this helpful?

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