Kibana url gives connection refused from outside machine

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: "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.

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.

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?

I can access elastic but not kibana.

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.

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.

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 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 evm seems set but is a DNS service running behind for others machines in your LAN ?

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 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?


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 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, your machines (localy) will result blabla with your loopback.

I hope I was clear in my remarks. :slight_smile:

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.

1 Like

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

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