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 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

21,781 views 26 11
Join discussion

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