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 Bitbucket Server is running on a Windows OS, if there is more than one host that needs to bypass the outgoing proxy and you have configured Bitbucket Server 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 Bitbucket Server is failing.

環境

  • Bitbucket Server running on Windows OS only

診断

The error messages in the logs will vary based on what application you are connecting to.  Removing the -Dhttp.nonProxyHosts setting from the Java arguments allows for Bitbucket Server 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 is 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 Bitbucket Server Running as a process, .

  1. Stop Bitbucket Server
  2. Edit the <Bitbucket Server_Install>\bin\setenv.bat file
  3. Modify the -Dhttp.nonProxyHosts setting
  4. Save the file
  5. Start Bitbucket Server

To change this setting for Bitbucket Server running as a service:

  1. Stop Bitbucket Server Service
  2. At a CMD prompt, change to the <Bitbucket Server_Install>/bin directory
  3. Run tomcat8w.exe //ES//ServiceName (Default ServiceName is AtlassianBitbucket Server)
  4. Click on the Java Tab
  5. Edit the -Dhttp.nonProxyHosts setting
  6. 保存します。
  7. Start the Bitbucket Server Service

This KB does not apply to Bitbucket Server running on Linux OS's.


最終更新日 2022 年 9 月 6 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.