Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kibana Connection error with shield #9635

Closed
bof64665 opened this issue Feb 10, 2015 · 1 comment
Closed

Kibana Connection error with shield #9635

bof64665 opened this issue Feb 10, 2015 · 1 comment

Comments

@bof64665
Copy link

Hey everybody,

i'm facing a problem at connecting Kibana to an ES-instance running behind shield.

On a testing enviroment i first set up ES and Shield with standard-options and added to new users to the esusers (i did not change any of the pre-set users like the one for kibana3). Until this point everything is running nice and smooth. i.e. a prompt is asking me to authenticate myself after calling "host:9200" and after inserting one of my new users i can see the status-site of ES.

With that working i wanted to start up a kibana3 instance running on the same host as ES does. I change one line in the "kibana.js":

elasticsearch: {server: "http://host:9200", withCredentials: true}

and also added these three lines to my "elasticsearch.yml":

http.cors.enabled: true
http.cors.allow-origin: "http://host:80/kibana"
http.cors.allow-credentials: true

But when i open my Kibana-Webpage it tells me that the "connection failed":

Possibility #1: Your elasticsearch server is down or unreachable
This can be caused by a network outage, or a failure of the Elasticsearch process. If you have recently run a query that required a terms facet to be executed it is possible the process has run out of memory and stopped. Be sure to check your Elasticsearch logs for any sign of memory pressure.
Possibility #2: You are running Elasticsearch 1.4 or higher
Elasticsearch 1.4 ships with a security setting that prevents Kibana from connecting. You will need to set the following in your elasticsearch.yml:
http.cors.enabled: true
http.cors.allow-origin to the correct protocol, hostname, and port (if not 80) that your access Kibana from. Note that if you are running Kibana in a sub-url, you should exclude the sub-url path and only include the protocol, hostname and port. For example, http://mycompany.com:8080, not http://mycompany.com:8080/kibana.
Click back, or the home button, when you have resolved the connection issue

Asked already in the Mailling bust nobody could help mi. What did i do wrong? Thanks for any suggestions!

@clintongormley
Copy link

Hi @LordFB

It looks like your allow-origin line is incorrect. Instead of:

 http.cors.allow-origin: "http://host:80/kibana"

Try:

 http.cors.allow-origin: "http://host:80"

You can check out the value sent for the Origin: header with Chrome dev tools, and just use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants