Unable to access Kibana on http://MYDOMAIN.com:5601

I am new to the ELK Stack. I have installed all the components (filebeat, logstash, elasticsearch and kibana), and all services are running. I am able to test elasticsearch by running curl localhost:9200. However I am unable to access kibana on 5601. curl localhost 5601 fails with the error
curl: (7) Failed connect to localhost:6501; Connection refused
My kibana server is on the cloud, so I cannot point my web browser to http://localhost:5601 to test it that way.
In the kibana.yml file I have modified the server.host parameter to point to my domain..
On googling, some suggestions were to setup a reverse proxy using nginx. Is this necessary??

Looks like you have mistyped the port number: 6501 instead of 5601.

sorry typo!
I do get the same error for 5601!
curl: (7) Failed connect to localhost:5601; Connection refused

If you have specified server.host setting, it may not be listening to the loopback interface. can you access via <your domain>:5601? What happens if you comment out the server.host setting and let Kibana bind to all interfaces?

ok! commented server.host and now curl localhost:5601 returns
curl localhost:5601

var hashRoute = '/app/kibana'; var defaultRoute = '/app/kibana'; var hash = window.location.hash; if (hash.length) { window.location = hashRoute + hash; } else { window.location = defaultRoute; But this doesn't help me access my kibana instance remotely as I cannot do http://localhost:5601 for that server! How should I set it up to access Kibana?

Can you point a browser to it? What does being able to curl it from localhost have to do with accessing it remotely?

if I point a browser to http://xx.xx.xx.xx:5601 I get a Connection Time Out error:

This site can’t be reached

xx.xx.xx.xx took too long to respond.
Search Google for xx.xx.xx.xx 5601
ERR_CONNECTION_TIMED_OUT

I CAN access the apache server on my IP:
http://xx.xx.xx.xx takes me to the test page of Apache. How else can I access the Kibana instance?

Has firewall/iptables been configured to allow traffic on the 5601 port?

I have not allowed public access to 5601, but all the servers/IPs on our network have been given access to it

Does that include the machine you are using the browser?

yes it does

Is there a way I can test this from another server on the same cloud? curl xx.xx.xx.xx:5601 from this other server should work, right? (It doesnt) . Is that a good test? Or is there something else I should try

Check which interface Kibana is bound to on the Kibana host. If that is all interfaces, this still sounds to me like a networking/firewall issue. What about iptables on the host itself?

Sorry .. could you explain this??

On the Kibana host, use netstat (assuming linux), e.g. netstat -an | grep 5601, to see which host/port Kibana binds to.

netstat -an | grep 5601
tcp 0 0 127.0.0.1:5601 0.0.0.0:* LISTEN

Is this output OK or should I make some config changes?

It is only bound to localhost, as that seem to be the default for the server.host parameter. If you set this to 0.0.0.0 it should bind to all interfaces so you can access it both locally and remotely.

7 Likes

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