I am getting the following error when searching in my Bitbucket Server:
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? :-)
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.
Premier Support Engineer
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?
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
Premier Support Engineer
I tried that with no success. However it looks like it went OK. (see picture below)
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
As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...
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!
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