Bitbucket Server Windows service fails to start - The system cannot open the file
問題
After making modifications to the Windows service, starting the service fails and generates the following error event (see Event Viewer > Windows Logs > System):
一般
The Atlassian Bitbucket Server AtlassianBitbucket Server service terminated with the following service-specific error:
The system cannot open the file.
詳細
- System
- Provider
[ Name] Service Control Manager
[ Guid] {555908d1-a6d7-4695-8e1e-26931d2012f4}
[ EventSourceName] Service Control Manager
- EventID 7024
[ Qualifiers] 49152
Version 0
Level 2
Task 0
Opcode 0
Keywords 0x8080000000000000
- TimeCreated
[ SystemTime] 2015-03-20T18:53:19.575025700Z
EventRecordID 4343
Correlation
- Execution
[ ProcessID] 656
[ ThreadID] 7516
Channel System
Computer drohan-pc
Security
- EventData
param1 Atlassian Bitbucket Server AtlassianBitbucket Server
param2 %%4
410074006C00610073007300690061006E00530074006100730068000000
--------------------------------------------------------------------------------
Binary data:
In Words
0000: 00740041 0061006C 00730073 00610069
0010: 0053006E 00610074 00680073 0000
In Bytes
0000: 41 00 74 00 6C 00 61 00 A.t.l.a.
0008: 73 00 73 00 69 00 61 00 s.s.i.a.
0010: 6E 00 53 00 74 00 61 00 n.S.t.a.
0018: 73 00 68 00 00 00 s.h...
原因
There are blank lines and/or blank characters (spaces) after the defined properties for the service in the "Java Options" section of the "Java" tab.
ソリューション
- In order to edit the service, you must run the following:
- Bitbucket Server 4.x
<Bitbucket Server installation directory>/bin/tomcat8w //ES//AtlassianBitbucket Server
- Bitbucket Server 5.x or newer
<Bitbucket Server installation directory>/bin/bservmgr //ES//AtlassianBitbucket
- Bitbucket Server 4.x
In the Atlassian Bitbucket Properties screen, click on the "Java" tab.
Remove any trailing spaces and/or blank lines from the "Java Options" text area.
- Click OK to confirm the changes.
- Go back to Windows Services and Start the AtlassianBitbucket service.