Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ElasticSearch Windows Service won't start when Upgrading to 5.6.2

andyspears February 6, 2018

I'm in a Windows environment upgrading Bitbucket from v4.14.4 to 5.6.2.  I used the Windows installer to perform the update. The Bitbucket windows service starts fine and I'm able to hit the site.  When I attempt to start the Elasticsearch windows service, it fails with the error 

Unable to access 'path.home' (c:\Atlassian\Bitbucket\5.6.2\elasticsearch\bin)

The windows service runs under the atlbitbucket windows account that the installer created and I verified that it has full access to that folder.  

Any ideas would be greatly appreciated!

 

EDIT: No responses as of yet, so I'll backup a bit and ask a more generic question - Does anyone have any advice on how to troubleshoot the "Atlassian Bitbucket ElasticSearch 2.3.1 (AtlassianBitbucketElasticsearch)" windows service?

 

Edit 2: I'll attempt to add some log entries that I found:

bitbucket_search.log

java.lang.IllegalStateException: Unable to access 'path.home' (c:\Atlassian\Bitbucket\5.6.2\elasticsearch\bin)

at org.elasticsearch.bootstrap.Security.addPath(Security.java:316)

at org.elasticsearch.bootstrap.Security.addFilePermissions(Security.java:243)

at org.elasticsearch.bootstrap.Security.createPermissions(Security.java:212)

at org.elasticsearch.bootstrap.Security.configure(Security.java:118)

at org.elasticsearch.bootstrap.Bootstrap.setupSecurity(Bootstrap.java:196)

at org.elasticsearch.bootstrap.Bootstrap.setup(Boostrap.java:167)

at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:270)

at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:35)

Cased by: java.nio.file.AccessDeniedException: c:\Atlassian\Bitbucket\5.6.2\elasticsearch\bin

AtlassianBitbucketElasticsearch_2018-02-09.log

Running 'AtlassianBitbucketElasticsearch' Service...

Inside ServiceMain...

reportServiceStatusE: 2, 2, 3000, 0

Starting service...

loading jvm 'C:\Program Files\Java\jre8\bin\server\jvm.dll'

Jvm Option[0] -XX:+UseParNewGC

...

argv[0] = start

Java Worker thread started 

org/elasticsearch/bootstrap/Elasticsearch:main

Java started org/elasticsearch/bootstrat/Elasticserach

Service started in 1411ms.

reportServiceStatusE: 4, 0, 0, 0

Waiting for worker to finish...

Exception has been thrown

Java worker thread finished

org/elasticsearch/bootstrap/Elasticsearch:main with status=6

Worker finished.

Waiting for all threads to exit

reportServiceStatusE: 3, 0, 0, 0

JVM destroyed

reportServiceStatusE: 1, 1066, 0, 1

Run service finished

 

1 answer

1 accepted

0 votes
Answer accepted
Mark A.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 13, 2018

HI Andy,

Can you verify that the user *{{atlbitbucket}}* is the owner and has permissions to the Bitbucket Home and Installation paths?

In some cases, we’ve seen where the user has permissions to the directories but was not the owner causing a failure in accessing the files on Windows. 

Regards,

Mark

andyspears February 14, 2018

Thanks for the response, I changed the owner of the Home and Installation paths but I'm getting the same error.  Any other possible suggestions?

Mark A.
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 14, 2018

No problem, Andy.

Does the user also have execute permission for the files in bin?

I want to eliminate the service from the equation, if you were to navigate to your installation directory and open the bin folder, does Elasticsearch launch if you started Bitbucket with the start-bitbucket.bat file?

Ensure you do this either as Administrator or as the user atlbitbucket.

Is this on a mounted drive?

I've been searching for other potential resolutions but those using Elasticsearch experiencing this error was due to a permission issue with the user not having the permissions, not being able to access or execute on the mount, OR not being able to create files and folders in the target directory.

Thanks,

Mark

andyspears February 15, 2018

Thanks for your help on this.  It turns out that the atlbitbucket user had access to the home folder, but it did not have access to one of the parent folders.  Once I gave it access to the root "Atlassian" folder, I was able to start it up successfully.  Running Bitbucket from the command line also helped run down a few other configuration issues that I had to clean up.  

Searching is now working, thanks again!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events