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

Unknown error while connecting to ElasticSearch #7

Closed
mastropi opened this issue Jan 29, 2016 · 2 comments
Closed

Unknown error while connecting to ElasticSearch #7

mastropi opened this issue Jan 29, 2016 · 2 comments

Comments

@mastropi
Copy link

Hello,

I have downloaded the kibana-4.3.1-windows.zip file from the github page and copied its contents to the www directory of my WAMP server.

When I open the index.html file at the kibana4-static/public directory I get the following error message:

kibanaerror

Note the following:

  1. This is the same error message I get when the ElasticSearch server is not running (and of course in my case it is running, as verified by going to localhost:9200 and seeing the correct page)
  2. The config file of kibana has the elasticsearch option pointing to the correct address:
    "elasticsearch": "http://localhost:9200/"
  3. I am able to work with dynamic Kibana 4.3.1 (Build 9517) without any problems.

Thanks in advance for your assistance!
Daniel

Versions:
Elasticsearch-2.1.1
Kibana-4.3.1
Firefox 44.0
Windows 8.1

@mastropi
Copy link
Author

Hi Nagarajan,

No, I haven’t got any answers unfortunately…

I have ElasticSearch running only on localhost:9200.

When you say, “you are facing the same issue now”, do you mean that before you were able to work fine with Kibana static? If so, what changed in between?

Daniel

From: Nagarajan Sivaraman [mailto:notifications@github.com]
Sent: 15 February 2016 08:09
To: kibana-community/kibana4-static
Cc: Daniel Mastropietro
Subject: Re: [kibana4-static] Unknown error while connecting to ElasticSearch (#7)

Hi! Have you got any answer ?

Are you using elasticsearch in other than localhost:9200 ??

I am facing the same issue now


Reply to this email directly or view it on GitHub #7 (comment) . https://github.com/notifications/beacon/ALjiQODR7qPCVU_lCPT-ONwyvq88q4Ubks5pkXETgaJpZM4HPJiR.gif

@mastropi
Copy link
Author

I was finally able to solve this problem by performing the following steps:

Step 1: Solve the problem of "unknown error while connecting to ElasticSearch"

This problem can be solved by changing the ElasticSearch configuration file at config/elasticsearch.yml located in the ElasticSearch installation directory.
Edit the file and add the following two lines at the end:
http.cors.enabled: true
http.cors.allow-origin: "*"
Ref: https://gist.github.com/rmoff/379e6ce46eb128110f38

This makes sense as, if one uses the debugging tools in the web browser of choice to see what happens when launching Kibana4-static before doing the above changes, one sees the following warning message under the Console tab:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:9200/. (Reason: CORS header 'Access-Control-Allow-Origin' missing).

Step 2: Solve the window size problem in Kibana

This problem can be solved by opening the public/index.js file in Kibana4's installation directory and replacing the line 87923 with the following line:
size: 10000
Ref: elastic/kibana#5904

UPDATE for Step 2: This issue is resolved with the newest version of Kibana4-static released in Mar-2016 with the latest patch that solves compatibility with ElasticSearch 2.x (Ref: #10).

HTH
Daniel

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

1 participant