# Installing Kibana to connect to Elasticsearch production server

**URL:** https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027
**Category:** Kibana
**Created:** [November 14, 2016, 9:48pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027 "2016-11-14T21:48:05Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 14, 2016, 9:48pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/1 "2016-11-14T21:48:05Z")

</div>

Hello,

First post, so there is a likelihood that I may not understand how things work in connecting Kibana and Elasticsearch in a secure production environment.

So, I have a live website that has access to our closed local network. The live website connects to our elasticsearch instance which is configured in the elasticsearch.yml to be 191.168.32.200:9200

I make a call from our live server to 191.168.32.200:9200 to make a query. This works great.

When I connect to Kibana on191.168.32.200, I get an error showing that it is not able to connect to elasticsearch on localhost:9200. This seems an obvious case since elasticsearch is configured to map to 191.168.32.200.

How do I reconcile this?

On my web server I am using the Elasticsearch PHP client library to connect to the elasticsearch node which is not of course localhost in relation to the live server. It would be insecure to install elasticsearch directly on a live server that has access to the open web. Therefore a client using the PHP API would never use localhost:9200. Am I right?

Of course If I do change my elasticsearch.yml to point to 127.0.0.1, then Kibana comes up properly, but then... bang, no remote access from my live client server.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 14, 2016, 10:02pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/2 "2016-11-14T22:02:49Z")

</div>

What config changes have you made to ES and KB around the network interfaces it listens to?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 15, 2016, 5:29pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/4 "2016-11-15T17:29:33Z")

</div>

Only changes to the elasticsearch.yml and kibana.yml

ES:  
network.host: 191.168.32.200  
KB  
elasticsearch.url: "[http://191.168.32.200:9200](http://191.168.32.200:9200)"

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 17, 2016, 4:08pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/5 "2016-11-17T16:08:22Z")

</div>

Was that just a rhetorical question about the config changes, or was there anything else that could be adjusted?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 19, 2016, 3:01am UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/6 "2016-11-19T03:01:14Z")

</div>

No, I just have a day job that I need to do as well 😉  
And having the info means someone else might be able to jump in and help.

But there doesn't appear to be anything wrong with that. Can you `curl 191.168.32.200:9200` from the KB host?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 21, 2016, 12:35pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/7 "2016-11-21T12:35:57Z")

</div>

Sorry, wasn't meant as a criticism, just wondering it it meant there was something to be adjusted, or if it was just for general information sake.

And yes, you are right... more info means others can jump in. Thank you

The answer is yes, If I curl 191.168.32.200:9200 from the local machine, I get the elasticsearch server info. If I curl 191.168.32.200, I get the Kibana authentication notification.

Thanks again,

Brian

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 21, 2016, 9:14pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/8 "2016-11-21T21:14:14Z")

</div>

> [@BrianAnderson](#):
>
> The answer is yes, If I curl 191.168.32.200:9200 from the local machine, I get the elasticsearch server info.

And is `191.168.32.200` the local machine, aka the machine with ES and KB running on it?  
Just wanting to make sure I am clear on things 😉

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 21, 2016, 9:30pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/9 "2016-11-21T21:30:30Z")

</div>

Yes, the machine at that IP is also the machine that ES and KB are installed on.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 21, 2016, 11:04pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/10 "2016-11-21T23:04:48Z")

</div>

It's not a firewall is it?  
What if you stop ES and KB, start ES, wait for green, then start KB?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 22, 2016, 10:43pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/11 "2016-11-22T22:43:29Z")

</div>

Well, I disabled ufw and verified it was inactive for testing purposes. I stopped both ES and KB, then restarted ES and then KB. Still, I am getting the same error.

Status: Red

plugin:kibana Ready  
**plugin:elasticsearch Unable to connect to Elasticsearch at [http://localhost:9200](http://localhost:9200).**  
plugin:kbn\_vislib\_vis\_types Ready  
plugin:markdown\_vis Ready  
plugin:metric\_vis Ready  
plugin:spyModes Ready  
plugin:statusPage Ready  
plugin:table\_vis Ready

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 22, 2016, 10:57pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/12 "2016-11-22T22:57:12Z")

</div>

Can you paste (or use gist/pastebin/etc) the entire KB config file, as it is, comments and all?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 22, 2016, 11:17pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/13 "2016-11-22T23:17:13Z")

</div>

[http://pastebin.com/0YGjSPfa](http://pastebin.com/0YGjSPfa)

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 22, 2016, 11:18pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/14 "2016-11-22T23:18:35Z")

</div>

You haven't uncommented `elasticsearch.url`?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 22, 2016, 11:24pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/15 "2016-11-22T23:24:51Z")

</div>

what in that entire file needs to be uncommented and what remains commented?

---

<div class="post-metadata">

### Author: ![BrianAnderson](https://avatars.discourse-cdn.com/v4/letter/b/82dd89/32.png) [@BrianAnderson](https://discuss.elastic.co/u/BrianAnderson)
#### Post date: [November 22, 2016, 11:25pm UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/16 "2016-11-22T23:25:45Z")

</div>

now I restarted all my services and cant recall my kibana dashboard password. I need to figure how to reset.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [November 23, 2016, 12:34am UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/17 "2016-11-23T00:34:50Z")

</div>

You need to edit it and remove the `#` in front of `server.host: "191.168.32.200"`, then restart KB.

---

<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: [December 21, 2016, 12:34am UTC](https://discuss.elastic.co/t/installing-kibana-to-connect-to-elasticsearch-production-server/66027/18 "2016-12-21T00:34:58Z")

</div>

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