Java オプション "-Dhttp.nonProxyHosts" が Windows OS で動作しない
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
When Stash is running on a Windows OS, if there are more than one host that needs to bypass the outgoing proxy and you have configured Stash to use an outbound proxy with the -Dhttp.nonProxyHosts JVM argument, connections to those sites are not bypassing the proxy and the connection between the application running on those servers and Stash is failing.
診断
環境
- Windows OS only
The error messages in the logs will vary based on what application that you are connecting to. Removing the -Dhttp.nonProxyHosts setting from the Java arguments allows for Stash to communicate with the servers correctly (but causes features like manage add-ons to loose connection to the Marketplace.
原因
The -Dhttp.nonProxyHosts setting for Java are defined incorrectly
ソリューション
Change the
- -Dhttp.nonProxyHosts=localhost|additionalhost1|*.yourdoman.com
または
- -Dhttp.nonProxyHosts="localhost\|additionalhost1\|*.yourdomain.com"
to
- -Dhttp.nonProxyHosts="localhost|additionalhost1|*.yourdomain.com"
(Note that the entire list of exceptions is enclosed in the " characters and the | (or) is not escaped with the \ character
To change this setting for Stash Running as a process, .
- Stop Stash
- Edit the <Stash_Install>\bin\setenv.bat file
- Modify the -Dhttp.nonProxyHosts setting
- Save the file
- Start Stash
To change this setting for Stash running as a service:
- Stop Stash Service
- At a CMD prompt, change to the <Stash_Install>/bin directory
- Run tomcat8w.exe //ES//ServiceName (Default ServiceName is AtlassianStash)
- Click on the Java Tab
- Edit the -Dhttp.nonProxyHosts setting
- 保存します。
- Start the Stash Service
This KB does not apply to Stash running on Linux OS's.