Forums

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

search on bitbucket server doesn't work

Deleted user September 24, 2019

Hello,

I have bitbucket server 6.6.1, since the update from last 5.* I see that that the search doesn't work. I'm not sure that it was working before.

In the test button (from server setting page) I have no issue, but when I do the search I got error. In the log I see

 

2019-09-24 13:55:37,158 ERROR [http-nio-7990-exec-3] XXXXX @1PVT03Ax835x1052x0 1mjaanx XXXXXXX "POST /rest/search/latest/search HTTP/1.1" c.a.b.i.s.search.rest.SearchResource Unexpected response code from Elasticsearch: 404

the bitbucket server work back a proxy in a subpath

 

 

1 answer

1 accepted

0 votes
Answer accepted
Stephen Sifers
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 25, 2019

Hello Jonathan and welcome to the Community!

We appreciate you coming to the Community with your issue and including a log output to help define exactly what the issue might be. From reviewing your notes and the logs, your issue might be tied to a corrupt Elasticsearch index post-upgrade. We would ask if you can rebuild your index by completing the following steps:

Resolution

(Recommended) Resolution #1 - trigger a reindex

POST to the /rest/indexing/latest/sync REST endpoint:

curl -u <admin-user> -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' <bitbucket-url>/rest/indexing/latest/sync

This will trigger a re-index of all repositories. Bitbucket will be available in all functionality other than search of unindexed portions of your code.  The time it takes to index depends on how much indexible content you have. This will be the amount of code contained in files under 512 KB. To give you some idea, indexing Atlassian's instance took around 9 hours.

Resolution #2 - delete the index

If the "Resolution #1" option does not resolve the problem, perform the following steps:

  1. Stop Bitbucket Server
  2. Create a backup of <bitbucket-home>/shared/search/data/bitbucket_search directory
  3. Delete the contents of <bitbucket-home>/shared/search/data/bitbucket_search directory
  4. Start Bitbucket Server

Source documentation: Rebuild the bundled Elasticsearch indexes for Bitbucket Server

If you’re still having issues after completing both of the above, please let us know.

Regards,
Stephen Sifers

Deleted user September 25, 2019

thanks issue solved with the post request

Like Stephen Sifers likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events