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

XMLHttpRequest after installing kibana #548

Closed
loicknuchel opened this issue Oct 4, 2013 · 3 comments
Closed

XMLHttpRequest after installing kibana #548

loicknuchel opened this issue Oct 4, 2013 · 3 comments

Comments

@loicknuchel
Copy link

Hi,

I'm new to elasticsearch and kibana and I hove some trouble getting kibana working.
I'm using the actual latests versions (elasticsearch 0.90.5 and kibana 3).

I installed and run elasticsearch (http://localhost:9200/ is responding as desired).
I put kibana in my lamp server and when I go to http://localhost/kibana/#/dashboard I go this message :
Error Could not contact Elasticsearch at http://localhost:9200. Please ensure that Elasticsearch is reachable from your system.
In the JavaScript console I have an XMLHttpRequest error :

OPTIONS http://localhost:9200/_all/_mapping Request header field X-XSRF-TOKEN is not allowed by Access-Control-Allow-Headers. app.js?r=61d0b58:8
XMLHttpRequest cannot load http://localhost:9200/_all/_mapping. Request header field X-XSRF-TOKEN is not allowed by Access-Control-Allow-Headers. 

In the config.js, I tried both elasticsearch: "http://"+window.location.hostname+":9200" and elasticsearch: "http://localhost:9200"

Do you have any idea on what I've could done wrong ?

Thanks for answering and sorry for my newbie question.

@rashidkpc
Copy link
Contributor

put the entire, fully qualified domain name and port in config.js, not "http://localhost:9200", see the comment directly above the configuration parameter

@loicknuchel
Copy link
Author

Thanks for your quick answer.

I solve my problem but it was a little bit tricky so I post here the solution :
In the config.js I have to put my hostname (and not localhost !).
And here the tricky part, when accessing to kibana, if you access with localhost it won't work. You have to put also your hostname in kibana url.

For example, if your hostname is "mycomputer" (you can have it with the command "hostname" on linux or windows).
You have tu put in config.js : elasticsearch: "http://mycomputer:9200" and access to kibana with this url : http://mycomputer/kibana/#/dashboard

@gworksmobi
Copy link

Thankyou Loicknuchel it solve my problem

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

3 participants