# Kibana url gives connection refused from outside machine

**URL:** <https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067>\
**Category:** Kibana\
**Created:** [March 1, 2018, 1:20pm UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067 "2018-03-01T13:20:35Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 1, 2018, 1:20pm UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/1 "2018-03-01T13:20:36Z")

</div>

From localhost I can curl fine. But from my desktop curl gives connection refused.  
I have no firewall on the server.  
My kibana.yml file:  
server.host: "evm"  
logging.dest: /var/log/kibana/kibana.log

I can open the log file, and every time I access kibana from localhost the log is updated, but when accessing from other machine the log does not say anything.

I host elasticsearch in the same maching with kibana.  
Also can access elasticsearch from my desktop on port 9200, but can't access kibana!

I am so confused please help.

Edit:  
Here is a screenshot of my terminals, left is kibana log file, up right I curl from localhost, down right I curl form my desktop.

 ![Screenshot%20from%202018-03-05%2009-05-38](https://us1.discourse-cdn.com/elastic/original/3X/4/c/4c733224b4cf302efd897bd681191563ed2538a0.png)

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [March 1, 2018, 9:15pm UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/2 "2018-03-01T21:15:35Z")

</div>

This sounds like a network issue. If it's working from localhost (ie. the machine that is running Kibana), but not from external machines, are you sure the port is open on the machine running Kibana? And are you sure that the external machines are correctly resolving whatever hostname you are using?

---

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 3, 2018, 10:16am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/3 "2018-03-03T10:16:06Z")

</div>

I can access elastic but not kibana.

---

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 3, 2018, 10:18am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/4 "2018-03-03T10:18:13Z")

</div>

It was working fine. The only thing I did was changing the IP of the server. But I restarted all the services after.  
I will try to restart the machine.

---

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 5, 2018, 7:19am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/5 "2018-03-05T07:19:08Z")

</div>

Hi @Joe_Fleming thanks for the reply, I am sure other machines resolve the hostname correctly, and I uploaded a screenshot of my terminals please see them and tell me what you think.

---

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 5, 2018, 7:42am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/6 "2018-03-05T07:42:54Z")

</div>

Hi dude,

Looks you got a network Issue as we can see with "logs"

> Failed to connect to evm port 5601: Connection refused

Could you check some settings for me ?

Like : kibana.yml

` server.host: ip/hostname.domain.tld`

With net-tools package : `netstats -tpnl | grep 560` \> Should result Kibana's Port

If you are on CentOS/RHEL : `firewall-cmd --list-port` \> Should return `5601/tcp` in all your opened ports

Else try to check if you opened the port 5601 with `iptables`

Edit : your `server.host: evm` seems set but is a DNS service running behind for others machines in your LAN ?

---

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 5, 2018, 8:08am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/7 "2018-03-05T08:08:56Z")

</div>

> [@Ben96](#):
>
> DNS service running behind for

Thank you @Ben96 for the reply, The Issue was solved:

I am still making a demo so didn't think of putting the IP in the DNS.

The problem was that I set the hostname "evm" in /etc/hosts to 127.0.0.1 which is a loopback address. So outer machines are not allowed to access kibana.

I think I should use /etc/hostname for that purpose instead of /etc/hosts, right?

---

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 5, 2018, 8:20am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/8 "2018-03-05T08:20:53Z")

</div>

Hi,

Mhm, your doing it right, as your said, if you set up your hostname with loopback, you are the only one who can access Kibana.

For your case, if people want to access your Kibana,

Set up `server.host: your_lan_ip`

With this, people typing your\_lan\_ip:5601 in brower will get access to kibana succefully (if firewall is configured too !)

`/etc/hostname` is the current name of the machine, with `hosts` you can set any names to any ip's that's a bit different !

Example : you can set : blabla 127.0.0.1, your machines (localy) will result blabla with your loopback.

I hope I was clear in my remarks. 🙂

---

<div class="post-metadata">

**Author:** ![Obay\_Abdelgader](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/obay_abdelgader/32/43161_2.png) [@Obay\_Abdelgader](https://discuss.elastic.co/u/Obay_Abdelgader)\
**Post date:** [March 5, 2018, 8:27am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/9 "2018-03-05T08:27:13Z")

</div>

> [@Ben96](#):
>
> hope I was clear in my

Yes, I didn't use hosname files for a long time, that I completely forgot about /etc/hostname I think this post should be closed now, thank you @Ben96 and @Joe_Fleming for your help.

---

<div class="post-metadata">

**Author:** ![Ben96](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ben96/32/28334_2.png) [@Ben96](https://discuss.elastic.co/u/Ben96)\
**Post date:** [March 5, 2018, 8:31am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/10 "2018-03-05T08:31:42Z")

</div>

No problem, good to know this helping you to resolve in your Issue 🙂

---

<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:** [April 2, 2018, 8:31am UTC](https://discuss.elastic.co/t/kibana-url-gives-connection-refused-from-outside-machine/122067/11 "2018-04-02T08:31:43Z")

</div>

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