# Error setting up reverse proxy for Kibana

**URL:** <https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071>\
**Category:** Kibana\
**Created:** [April 29, 2017, 1:24am UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071 "2017-04-29T01:24:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericfu88](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@ericfu88](https://discuss.elastic.co/u/ericfu88)\
**Post date:** [April 29, 2017, 1:24am UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/1 "2017-04-29T01:24:34Z")

</div>

I try to setup a reverse nginx proxy by following advice on this thread: [Auto authenticating to an embedded Kibana dashboard (on Elastic.co CLOUD)](https://discuss.elastic.co/t/auto-authenticating-to-an-embedded-kibana-dashboard-on-elastic-co-cloud/71248/10)

I am using Elastic Cloud for both Kibana.

And got this error  
{  
error: {  
root\_cause: [  
{  
type: "illegal\_argument\_exception",  
reason: "No endpoint or operation is available at [kibana]"  
}  
],  
type: "illegal\_argument\_exception",  
reason: "No endpoint or operation is available at [kibana]"  
},  
status: 400  
}

Here's my nginx configuration.

```
server {
	listen 443;
	server_name localhost;
	ssl on;
	ssl_certificate /etc/nginx/ssl/nginx.crt;
    ssl_certificate_key /etc/nginx/ssl/nginx.key;
	ssl_session_cache shared:SSL:1m;
	ssl_session_timeout 5m;
	ssl_ciphers HIGH:!aNULL:!MD5;
	ssl_prefer_server_ciphers on;

	location / {
	     proxy_set_header X-Found-Cluster XXXXXX;
         proxy_set_header Host $host;
         proxy_set_header X-Real-IP $remote_addr;
         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
         proxy_set_header Authorization "Basic YYYYYY";
         proxy_pass https://XXXXXX.eu-west-1.aws.found.io;
     }
}

```

Any idea?

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 1, 2017, 4:27pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/2 "2017-05-01T16:27:35Z")

</div>

Hi,

Can you set your endpoint here to Kibana and let us know what is happening?  
proxy\_pass [https://XXXXXX.eu-west-1.aws.found.io](https://XXXXXX.eu-west-1.aws.found.io);

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![ericfu88](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@ericfu88](https://discuss.elastic.co/u/ericfu88)\
**Post date:** [May 1, 2017, 5:59pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/3 "2017-05-01T17:59:10Z")

</div>

@bhavyarm proxy\_pass is already set to the kibana endpoint specified in Elastic Cloud.

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 1, 2017, 6:01pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/4 "2017-05-01T18:01:16Z")

</div>

Hi Eric,

Am confused. In your nginx config above your proxy\_pass is set to es\_cluster.

```
location / {
     proxy_set_header X-Found-Cluster XXXXXX;
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header Authorization "Basic YYYYYY";
     **proxy_pass https://XXXXXX.eu-west-1.aws.found.io;**
 }

```

}

Can we try setting this to Kibana end point?

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![ericfu88](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@ericfu88](https://discuss.elastic.co/u/ericfu88)\
**Post date:** [May 1, 2017, 6:39pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/5 "2017-05-01T18:39:32Z")

</div>

It is set to the Kibana end point. I've attached two screenshots. One is the Kibana URL I got from Elastic cloud. The other is my nginx configuration. Proxy\_pass is set to exactly the kibana URL in the Elastic Cloud.

![](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54c68e4d641da0f56430a0260bf6059d1fc8e4c0.png)

 ![](https://us1.discourse-cdn.com/elastic/original/3X/c/c/cc47b61f91df86077ce3319135c64de9fc96136f.png)

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 1, 2017, 6:48pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/6 "2017-05-01T18:48:08Z")

</div>

Ah.Gotcha. What happens when you add this "/app/kibana" at the end of the endpoint there?  
I might also be taking you on a wild goose chase. I have asked the dev team to take a look at this.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![ericfu88](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@ericfu88](https://discuss.elastic.co/u/ericfu88)\
**Post date:** [May 1, 2017, 7:00pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/7 "2017-05-01T19:00:24Z")

</div>

@bhavyarm. No worries I really like to get this working.

Updated nginx:  
proxy\_pass [https://27c0xxxxxxxxx.us-west-2.aws.found.io/app/kibana;](https://27c0xxxxxxxxx.us-west-2.aws.found.io/app/kibana;)

Here's the URL given to me from the Kibana to show a dashboard in iframe:  
[https://27c0xxxxxxxxx.us-west-2.aws.found.io/app/kibana#/dashboard/e2e4b060-2c30-11e7-ac0b-c98d5271b0ae?embed=true&\_g=()](https://27c0xxxxxxxxx.us-west-2.aws.found.io/app/kibana#/dashboard/e2e4b060-2c30-11e7-ac0b-c98d5271b0ae?embed=true&_g=())

Here's the URL I used to get to the same iframe through my Nginx proxy:  
[https://mycompany-domain.com/app/kibana#/dashboard/e2e4b060-2c30-11e7-ac0b-c98d5271b0ae?embed=true&\_g=()](https://mycompany-domain.com/app/kibana#/dashboard/e2e4b060-2c30-11e7-ac0b-c98d5271b0ae?embed=true&_g=())

Here's the response the link above:  
{  
error: {  
root\_cause: [  
{  
type: "index\_not\_found\_exception",  
reason: "no such index",  
resource.type: "index\_expression",  
[resource.id](http://resource.id): "app",  
index\_uuid: "_na_",  
index: "app"  
}  
],  
type: "index\_not\_found\_exception",  
reason: "no such index",  
resource.type: "index\_expression",  
[resource.id](http://resource.id): "app",  
index\_uuid: "_na_",  
index: "app"  
},  
status: 404  
}

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 1, 2017, 7:02pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/8 "2017-05-01T19:02:40Z")

</div>

Sorry no progress 🙂 Will keep you posted.

Cheers,  
Bhavya

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 8, 2017, 9:10pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/9 "2017-05-08T21:10:03Z")

</div>

Hi Eric,

My apologies for the delay. I couldn't really reproduce this in my local. I will try to get some help and buzz you.

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![ericfu88](https://avatars.discourse-cdn.com/v4/letter/e/d9b06d/32.png) [@ericfu88](https://discuss.elastic.co/u/ericfu88)\
**Post date:** [May 8, 2017, 9:35pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/10 "2017-05-08T21:35:29Z")

</div>

I resolved this myself. Basically the error is the cluster ID entered in the nginx config must be cluster id of Kibana, not Elasticsearch.

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [May 9, 2017, 1:16pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/11 "2017-05-09T13:16:21Z")

</div>

Ahhhh...thanks for posting the solution here.

Cheers,  
Bhavya

---

<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:** [June 6, 2017, 1:31pm UTC](https://discuss.elastic.co/t/error-setting-up-reverse-proxy-for-kibana/84071/12 "2017-06-06T13:31:26Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
