It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Search not working in Bitbucket Server

I am getting the following error when searching in my Bitbucket Server:

 

Server Busy

The server couldn't process your request, please try again later.

 

Looking at the request, to /rest/search/latest/search, it gives a 503 return.

I have tried following all the suggestions on this page: https://confluence.atlassian.com/bitbucketserverkb/troubleshooting-steps-for-bitbucket-server-code-search-827125334.html with no success. 

I can see the ElasticSearch server perfectly fine when going to localhost:7992, and the connection works when I test it in the Bitbucket Server settings.

I am out of ideas. Can anyone come up with some suggestion? :-)

1 answer

0 votes

Hi Patrick,

Did you take a look at the atlassian-bitbucket.log file immediately after trying the search? This should give you a better idea of why the 503 error is being thrown.

Cheers,

Christian

Premier Support Engineer

Atlassian

Hi Christian!

Thank you for your suggestion. The following is the log entry I get:

2017-11-30 14:31:03,410 ERROR [http-nio-7990-exec-6] patrickreck @9JSHV0x871x4678x0 15tsx2r 192.168.2.15 "POST /rest/search/latest/search HTTP/1.1" c.a.b.s.internal.rest.SearchResource Unexpected response code from Elasticsearch: 404

 Do you have an idea why ElasticSearch is throwing a 404?

Hi Patrick,

That suggests that perhaps the index doesn't exist in Elasticsearch. You can try deleting and recreating the index using the instructions in https://confluence.atlassian.com/bitbucketserverkb/bitbucket-code-search-is-unable-to-find-results-from-some-or-all-repositories-858783145.html

Cheers,

Christian

Premier Support Engineer

Atlassian

I tried that with no success. However it looks like it went OK. (see picture below)

Skærmbillede 2017-11-30 kl. 14.43.08.png

The log entries for the two commands were:

2017-11-30 14:58:59,961 INFO [I/O dispatcher 1129] c.a.b.s.s.t.DefaultElasticsearchConnectionTester Connected to Elasticsearch version 2.3.1
2017-11-30 14:58:59,965 INFO [Caesium-1-4] c.a.b.s.i.i.j.c.SearchIndexCheck Rescheduling Startup Checks to ensure the bitbucket-search Elasticsearch index will be recreated.
2017-11-30 14:58:59,969 INFO [Caesium-1-4] c.a.b.s.i.c.DefaultClusterJobManager Attempting to schedule an ad-hoc for StartupChecksJob
2017-11-30 14:58:59,969 INFO [Caesium-1-4] c.a.b.s.i.c.DefaultClusterJobManager There are currently 2 to select from
2017-11-30 14:58:59,977 INFO [Caesium-1-1] c.a.b.s.i.cluster.ClusterJobRunner Job is already taken, no action is required. Job key: com.atlassian.bitbucket.search.internal.indexing.jobs.StartupChecksJob
2017-11-30 14:58:59,977 INFO [Caesium-1-4] c.a.b.s.j.c.i.HealthCheckRunner Health checks will run again after PT5M


2017-11-30 15:02:09,454 INFO [http-nio-7990-exec-4] patrickreck @9JSHV0x902x4904x0 0:0:0:0:0:0:0:1 "POST /rest/indexing/latest/sync HTTP/1.1" c.a.b.s.i.c.DefaultClusterJobManager Attempting to schedule an ad-hoc for ElasticsearchSynchronizeJob
2017-11-30 15:02:09,454 INFO [http-nio-7990-exec-4] patrickreck @9JSHV0x902x4904x0 0:0:0:0:0:0:0:1 "POST /rest/indexing/latest/sync HTTP/1.1" c.a.b.s.i.c.DefaultClusterJobManager There are currently 2 to select from
2017-11-30 15:02:09,462 INFO [Caesium-1-1] c.a.b.s.i.cluster.ClusterJobRunner Job is already taken, no action is required. Job key: com.atlassian.bitbucket.search.internal.indexing.jobs.ElasticsearchSynchronizeJob

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

1,099 views 3 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you