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 Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

675 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot