How to update the JVM configuration for a Windows service

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: 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 は除く

目的

Sometimes existing JVM arguments must be changed, and others must be added. This is usually done within the start script of the application, but when the application runs as a Windows Service, the argument must be set directly into the service configuration. For example, updating %JAVA_HOME% or enabling DEBUG logging at startup.

ソリューション

Open the service configuration window

How to open the service configuration from Bitbucket 5.x:

  1. Stop the service.
  2. In the "Windows Start Menu" find the "Configure Bitbucket Service" shortcut (this is a shortcut for the bservmgr.exe executable, including the service name argument E.g: //ES/AtlassianBitbucket)

  3. Update the configuration parameter(s) (see below) and click Apply
  4. Start the service

How to open the service configuration manually, for Bitbucket up to version 4.x, or for Elasticsearch:

  1. Stop the service.
  2. Find the "Short Name" of the Windows service in the Windows Services list. (Under service properties)
  3. Open a Command Prompt "with Administrative Rights".

  4. Find the service executable:

    1. For the Bitbucket service: It is located in the following directory <Bitbucket Server Installation Path>\bin

    2. For the Elasticsearch service: It is located in the following directory <Bitbucket Server Installation Path>\elasticsearch\bin

  5. Run ONE of the following commands:

    For Bitbucket Server up to version 4.14.5
    tomcat8w.exe //ES//%SERVICENAME%
    Bitbucket Server バージョン 5.0+
    bservmgr.exe //ES/%SERVICENAME%
    For Elasticsearch
    elasticsearch-service-mgr.exe //ES/%SERVICENAME%

    Replace %SERVICENAME% with the name of your service found earlier.

  6. Update the configuration parameter(s) (see below) and click Apply
  7. Start the service

Update the service configuration

  1. The JVM Windows service configuration window will open.
  2. Go to the Java tab and add/update the parameter(s) in the Java Options field:

    <ARGUMENT>="<value>"
  3. To configure the pre-installed version of JVM set the Java Virtual Machine to the right DLL file. 

    e.g. 
    C:\Program Files\Java\jdk1.8.0_162\jre\bin\server\jvm.dll
  4. Click Apply and then Start the service.

最終更新日 2019 年 9 月 4 日

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

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