Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

BB ElasticSearch Status Page

Is there a status page we can use to validate that ElasticSearch is running?

Trying to figure out how to validate that ElasticSearch is running.  Is there a PID file that gets written when the process is running ?

For example, in BB you can hit the http://localhost:9006/xxx/status and it will provide you a value of RUNNING, ERROR, FIRST_RUN etc....

1 answer

1 accepted

0 votes
Answer accepted
Dave Chevell Atlassian Team May 08, 2020

Hey @Ken Ng

There are a couple of ways you can do this. One is "supported", one is a bit of a hack – I'll leave it to you which one you think is appropriate.

1. Hit the Elasticsearch service directly

Out of the box, Bitbucket Server comes with a bundled Elasticsearch instance. It runs on port 7992, bound to localhost (meaning it won't accept connections over the network) and it's protected via basic auth. 

The basic auth username and password can be found in $BITBUCKET_HOME/shared/search/buckler/buckler.yml, and looks something like this:

auth.basic.http.enabled: "true"
auth.basic.password: "randomlygeneratedpassword"
auth.basic.tcp.enabled: "true"
auth.basic.username: "bitbucket"

You can connect to it locally via http://localhost:7992 and see if it's running like so:

$ curl -u bitbucket:randomlygeneratedpassword http://localhost:7992/
"name" : "bitbucket_bundled",
"cluster_name" : "bitbucket_search",
"cluster_uuid" : "705tZVP2QM-rVskYJaM_pA",
"version" : {
"number" : "7.5.2",
"build_flavor" : "oss",
"build_type" : "zip",
"build_hash" : "8bec50e1e0ad29dad5653712cf3bb580cd1afcdf",
"build_date" : "2020-01-15T12:11:52.313576Z",
"build_snapshot" : false,
"lucene_version" : "8.3.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
"tagline" : "You Know, for Search"

But what if you want to test it externally? Well, you could reconfigure the bundled Elasticsearch to listen on all network interfaces, but I wouldn't recommend that for various security reasons. Bitbucket has a way to test connectivity from the UI under Bitbucket Admin > Server settings > Elasticsearch > Test connection, but that doesn't help you if you want to automate it.

There's no officially documented or supported method to automate this, but you can essentially reproduce what the above "Test connection" button does via curl: 

2. Hit an undocumented API to get Bitbucket to test Elasticsearch for you

You can send a POST request to Bitbucket, along with the Elasticsearch URL you want Bitbucket to test (i.e. http://localhost:7992). In my example, I'll assume I'm running an instance at and the Bitbucket username/password admin:admin

$ curl -i -u $BITBUCKET_USER:$BITBUCKET_PASS -X POST -H 'X-Atlassian-Token: no-check' -H 'Content-Type: application/json' -d '{"url":"http://localhost:7992/","username":"bitbucket","password":null}' $BITBUCKET_URL/rest/search-admin/latest/test-connection
HTTP/1.1 200
X-AREQUESTID: @1QLYW2Vx708x125x0
X-Content-Type-Options: nosniff
vary: accept-encoding
Content-Type: application/json
Transfer-Encoding: chunked
Date: Fri, 08 May 2020 11:48:59 GMT

A successful request should return a HTTP status of 200. An unsuccessfull one should return a 40X response. Note that in my example above, I'm specifying the username for the bundled Elasticsearch instance, but no password. If you've left the bundled Elasticsearch instance to its defaults, the above command should work without any modification, excepting the Bitbucket URL and user credential variables.

Note that this method is not officially supported, and not a documented public API. This means it's subject to change with no warning. Bear that in mind!

I hope that helps Ken_Ng.



Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

244 views 2 9
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