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 は除く
プラットフォームについて: 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:
- Stop the service.
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)
- Update the configuration parameter(s) (see below) and click Apply
- Start the service
How to open the service configuration manually, for Bitbucket up to version 4.x, or for Elasticsearch:
- Stop the service.
- Find the "Short Name" of the Windows service in the Windows Services list. (Under service properties)
Open a Command Prompt "with Administrative Rights".
Find the service executable:
For the Bitbucket service: It is located in the following directory
<Bitbucket Server Installation Path>\bin
For the Elasticsearch service: It is located in the following directory
<Bitbucket Server Installation Path>\elasticsearch\bin
Run ONE of the following commands:
For Bitbucket Server up to version 4.14.5tomcat8w.exe //ES//%SERVICENAME%
Bitbucket Server バージョン 5.0+bservmgr.exe //ES/%SERVICENAME%
For Elasticsearchelasticsearch-service-mgr.exe //ES/%SERVICENAME%
Replace %SERVICENAME% with the name of your service found earlier.
- Update the configuration parameter(s) (see below) and click Apply
- Start the service
Update the service configuration
- The JVM Windows service configuration window will open.
Go to the Java tab and add/update the parameter(s) in the Java Options field:
<ARGUMENT>="<value>"
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
- Click Apply and then Start the service.