Bitbucket Server Windows service fails to start - The system cannot open the file
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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.
*Except Fisheye and Crucible
Problem
After making modifications to the Windows service, starting the service fails and generates the following error event (see Event Viewer > Windows Logs > System):
General
The Atlassian Bitbucket Server AtlassianBitbucket Server service terminated with the following service-specific error:
The system cannot open the file.
Details
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
- 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...
Cause
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.
Resolution
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
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.
Was this helpful?