# Kibana - Connection Failed with Shield

**URL:** <https://discuss.elastic.co/t/kibana-connection-failed-with-shield/21988>\
**Category:** Elasticsearch\
**Created:** [February 5, 2015, 11:03am UTC](https://discuss.elastic.co/t/kibana-connection-failed-with-shield/21988 "2015-02-05T11:03:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabian\_Bohm](https://avatars.discourse-cdn.com/v4/letter/f/ebca7d/32.png) [@Fabian\_Bohm](https://discuss.elastic.co/u/Fabian_Bohm)\
**Post date:** [February 5, 2015, 11:03am UTC](https://discuss.elastic.co/t/kibana-connection-failed-with-shield/21988/1 "2015-02-05T11:03:00Z")

</div>

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](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://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](http://mycompany.com:8080), not  
> [http://mycompany.com:8080/kibana](http://mycompany.com:8080/kibana).  
> Click back, or the home button, when you have resolved the connection issue

What did i wrong? Thanks for any suggestions!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/710e9f6f-691c-47bf-aaa0-a1530cf5c9d6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/710e9f6f-691c-47bf-aaa0-a1530cf5c9d6%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Deepak\_Kumar1](https://avatars.discourse-cdn.com/v4/letter/d/57b2e6/32.png) [@Deepak\_Kumar1](https://discuss.elastic.co/u/Deepak_Kumar1)\
**Post date:** [February 13, 2015, 12:06pm UTC](https://discuss.elastic.co/t/kibana-connection-failed-with-shield/21988/2 "2015-02-13T12:06:52Z")

</div>

Hi,  
I am also facing the same issue. Has anyone make it work?

Regards,  
Deepak

On Thursday, February 5, 2015 at 4:33:01 PM UTC+5:30, Fabian Böhm wrote:

> 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](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://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](http://mycompany.com:8080), not  
> > [http://mycompany.com:8080/kibana](http://mycompany.com:8080/kibana).  
> > Click back, or the home button, when you have resolved the connection  
> > issue
> 
> What did i wrong? Thanks for any suggestions!

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8cb1e070-120b-488c-9de2-9d924e20fb78%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8cb1e070-120b-488c-9de2-9d924e20fb78%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:32am UTC](https://discuss.elastic.co/t/kibana-connection-failed-with-shield/21988/3 "2017-07-06T00:32:59Z")

</div>


