Forums

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

Unable to search in bitbucket hosted but there is no elasticsearch installe

apollopt1
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 22, 2020

Hello,

We have a bitbucket hosted server v6.6.1, where we are unable to search anything on it, we receive a message saying:

Bitbucket Server Code Search is unable to find results from some or all repositories

And after checking documentation at atlassian, I notice that I have lots of elasticsearch connection atempts:

2020-10-21 23:47:58,107 INFO [Caesium-1-4] c.a.b.i.s.i.jobs.StartupChecksJob Running startup jobs for search
2020-10-21 23:47:58,108 WARN [Caesium-1-4] c.a.b.i.s.i.IndexingSynchronizationService Unable to establish a connection to Elasticsearch during index synchronisation.
2020-10-21 23:47:58,109 WARN [Caesium-1-4] c.a.b.i.s.c.cluster.ClusterJobRunner Job execution failed. Rescheduling. Job key: com.atlassian.bitbucket.internal.search.indexing.jobs.StartupChecksJob Job id: 0ee5718c-ac1b-42fe-86c0-5012635167d3 

But we dont have any elasticsearch running, or even ever had elasticsearch configurated before.

I have even netstat on this server machine and that port 7992 have no service running as expected, so I was unable to use those curl commands at 7992.

As a work around I have also tried "restart indexing" step, but there was no difference on frontend.

At <BitbucketHome>/shared/search/bucker/buckler.yml I have a default login there.

On frontend troubleshooting and support tools, in System Information, I have also this:

Elasticsearch

base-url: http://localhost:7992/

connection-result: CONNECTION_ERROR

In Server Settings, I have the base-url setup, and cannot remove it:

Screenshot_6.jpgAnyone knows, how can it be possible to bypass that error?

 

1 answer

0 votes
Stephen Garber
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 22, 2020

A couple things could be causing this.

 

First make sure you are not starting bitbucket as root. Instead you'll want to use a dedicated bitbucket user.

https://confluence.atlassian.com/bitbucketserver/running-bitbucket-server-with-a-dedicated-user-776640047.html

 

This document can help you troubleshoot elasticsearch issues: https://confluence.atlassian.com/bitbucketserverkb/troubleshooting-connection-issues-for-elasticsearch-826900037.html

 

Last tip that I have is to make sure that you are starting bitbucket using the correct script. You'll want to make sure that you use the /bin/start-bitbucket.sh file, because this file starts both bitbucket and elasticsearch.

Suggest an answer

Log in or Sign up to answer