Bundled elasticsearch and nginx reverse proxy Edited

Hi everyone, I've searched the forum and google for hours but it seems I can't find an answer to my problem...

I've set up bitbucket server on my machine and tested it: everything ok.

The I've configured nginx to reverse proxy all the call to /bitbucket to the port :7990. Bitbucket it's working, I've followed the guide here on atlassian and changed the configuration BUT I have a yellow alert and an error on elasticsearch.

Before the proxy setup the test button was working, now it give me this message:

Something went wrong while trying to serve your request. Try reloading the page.

Looking in the log I get this when I press the button:

2017-07-24 15:43:23,747 WARN [http-nio-7990-exec-8] diego @1W6SZCDx943x23x0 htgxj6 127.0.0.1 "POST /rest/search-admin/latest/test-connection HTTP/1.0" c.a.p.r.c.s.j.XsrfResourceFilter Additional XSRF checks failed for request: http://localhost:7990/bitbucket/rest/search-admin/latest/test-connection , origin: null , referrer: http://MYSERVER/bitbucket/mvc/admin/server-settings , credentials in request: true , allowed via CORS: false

 I tried to set CORS in the in the elasticsearch.yml to no avail using this:

http.cors.enabled: true
http.cors.allow-origin: "/.*/"

 I always get the same error message.

What can I do?

The server is a fresh Debian 9 with nginx and postgres. Confluence and Jira are also installed but not behind the reverse proxy (for now).

 

Thank you in advance

1 answer

0 vote
Craig Castle-Mead Community Champion Feb 19, 2018

Hey Diego,

If you go to your Troubleshooting and Support tools page (https://bitbucket.mycompany.com/plugins/servlet/troubleshooting/view/) then Elasticsearch, what information is displayed?

You also mention a "yellow alert" on Elasticsearch - is that referring to the Elasticsearch cluster health itself (https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html) or a Bitbucket health check against Elasticsearch such as on the /admin/server-settings page ?

CCM

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
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...

2,049 views 1 5
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