Skip to content

Instantly share code, notes, and snippets.

@rmoff
Last active August 14, 2020 18:39
Show Gist options
  • Select an option

  • Save rmoff/379e6ce46eb128110f38 to your computer and use it in GitHub Desktop.

Select an option

Save rmoff/379e6ce46eb128110f38 to your computer and use it in GitHub Desktop.
Kibana 3 and Elasticsearch 1.4 - CORS problem

Kibana 3 against ElasticSearch 1.4 throws an Connection Failed screen. The error text says to set http.cors.allow-origin, but it misses out the important http.cors.enabled: true

Working config:

$ grep cors elasticsearch-1.4.0.Beta1/config/elasticsearch.yml
http.cors.allow-origin: "/.*/"
http.cors.enabled: true
@reshefsharvit

Copy link
Copy Markdown

hey guys,
I'm ruinning kibana and elasticsearch on the same servers, tried adding:
http.cors.allow-origin: "/.*/"
http.cors.enabled: true

but it still won't work.

any ideas?

EDIT:
I suggest everyone who's facing this problem reads "https://www.digitalocean.com/community/tutorials/how-to-use-logstash-and-kibana-to-centralize-and-visualize-logs-on-ubuntu-14-04"
though it's a little out-dated in terms of elasticsearch version, it made me understand what I did wrong (elasticsearch configuration).

@SamyaMaiti2012

Copy link
Copy Markdown

looks like I am also doing the same mistake. Can you tell me how you resolved.

@aseev-xx

Copy link
Copy Markdown

Thanks a lot!

@cta101

cta101 commented Jan 3, 2015

Copy link
Copy Markdown

After you added the cors settings in elasticsearch config don't reload the kibana page but click back or home button as the webpage says.
If you click refresh you just reload the same "kibana/index.html#/connectionFailed" error page.

@naisanza

naisanza commented Jan 5, 2015

Copy link
Copy Markdown

I just ran into this problem last night. And it's also good to know one other thing

This didn't work:
http.cors.allow-origin: *

But this did:
http.cors.allow-origin: "*"

Be sure to have "http.cors.enabled: true" included in your .yml file as well.

@100star

100star commented Feb 4, 2015

Copy link
Copy Markdown

Thanks a lot, it work :)

@hmorgado

Copy link
Copy Markdown

yeah, it worked for me! thanks =)

@akaluzinski

Copy link
Copy Markdown

Thank you! It's very useful solution!

@isanjaykp

Copy link
Copy Markdown

Hmm... Worked for me.

@khoan

khoan commented Jul 22, 2015

Copy link
Copy Markdown

not working for ES 1.6 on AWS

@russray2008

Copy link
Copy Markdown

Thank you very much for your suggestion. This helped me fixed my issue.

@nsteblay

Copy link
Copy Markdown

Yes. For OS X El Capitan 10 using Chrome browser.
Adding the two lines to /usr/local/etc/elasticsearch/elasticsearch.yml
http.cors.allow-origin: "*"
http.cors.enabled: true
resolved the issue.

@sirLoaf

sirLoaf commented Mar 25, 2016

Copy link
Copy Markdown

thx. worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment