Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Elasticsearch connection broken

Daren Scott May 23, 2019

Elasticsearch doesn't work in my latest bitbucket server instance.  It is set up in the Bitbucket admin menus and connects fine.  It just doesn't ever have any results when I type in the search box.  I suppose this is to be expected because the size of C:\Atlassian\ApplicationData\Bitbucket\shared\search\data is very tiny, so it's not really indexing any of the source code.

Below is relevant text from the atlassian-bitbucket.log file.

2019-05-23 14:42:22,635 INFO [Caesium-1-3] c.a.b.i.s.i.IndexingSynchronizationService Beginning indexing of all projects and repositories for search.
2019-05-23 14:42:23,641 WARN [Caesium-1-3] c.a.b.i.s.i.IndexingSynchronizationService Unable to establish a connection to Elasticsearch during index synchronisation.
2019-05-23 14:42:23,642 WARN [Caesium-1-3] c.a.b.i.s.c.cluster.ClusterJobRunner Job execution failed. Rescheduling. Job key: com.atlassian.bitbucket.internal.search.indexing.jobs.ElasticsearchSynchronizeJob Job id: 3b534340-58b2-447a-9cfb-412d0e63e67d

Does anyone have anything I can take a look at to try and figure out whats wrong?

 

thanks

 

2 answers

1 accepted

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2019

Hello Daren,

Thank you for providing the logs which show the issue you’re reporting. Within the logs, it is reporting that the connection is unable to be established. This may be due to an issue with the URL used within Bitbucket for your Elastic search. If you’re using an embedded instance you will want to keep the default settings (Localhost:7992). If this is not the issue then we would suggest reviewing the troubleshooting guide to find the cause of your connection issues. You may find this guide at Troubleshooting steps for Bitbucket Server Code Search.

If you’re still having issues after running through this guide please let us know.

Regards,
Stephen Sifers

Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 30, 2019

Hello Daren,

Let's check to see if there is a file present which may be causing elasticsearch to disconnect. Please search for the presence of the following file within the following directory:

  • File: elasticsearch.pid
  • Directory: atlassian/application-data/bitbucket/log/search/

If the file is found present, please stop the Bitbucket service, delete the file and start Bitbucket again and retest.

We look forward to hearing the results to help resolve this issue.

Regards,
Stephen Sifers

Daren Scott May 30, 2019

That file was present.  I did as instructed and it's now working.   Thanks!

Like Stephen Sifers likes this
0 votes
Daren Scott May 30, 2019

Thanks for replying Stephen.  I did re-set it to localhost prior to posting this question.  I originally had it set to the static IP of the instance (Windows 10) it's running on.  Could there be somewhere in a config file I'm not seeing that may not have been updated?  It says "Successfully connected to Elasticsearch" when clicking the test button. Before, it did not of course.  I have the username set to atlbitbucket although the screenshot in your provided link shows just "bitbucket".  

I've tried running the service via local system account and atlbitbucket local account with seemingly no difference.

I don't see any other big offenders from the troubleshooting steps.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events