Unable to connect to kibana localhost refused to connect

Hello,
i am new to elk stack and setting up on my local server. I ran the elastic search and tried the localhost:9200 in browser and elastic search worked fine for me.
But i tried to run kibana using localhost:5601 but it is showing me ERR_CONNECTION_REFUSED.
Please Help me to fix. thanks

Where are you seeing ERR_CONNECTION_REFUSED, in the browser when you open localhost:5601, or as part of the output when you start the Kibana server?

when i open localhost:5601 in the browser

Does the server start up when you run bin/kibana? Do you see any error messages when it does?

Actually i am new to ELK . can you please tell me how to run this command?

Sure. In much the same way you had to start the Elasticsearch server, you also need to start the Kibana server. It is its own process, completely separate from Elasticsearch.

If you downloaded one of the compressed packages (tar.gz or zip), you uncompress it and cd into the resulting path, just like with Elasticsearch. From there, run ./bin/kibana on linux/osx or .\bin\kibana.bat on windows.

If you're using one of the packages (RPM for example), the service should start automatically. If it does not, you should still have some system level service you can run. I don't know offhand what the command is, but I don't think you're using a package anyway. If I'm wrong, let me know what OS you're on and I can hunt down the answer for you.

Note that you'll need to run both Elasticsearch and Kibana, so you will have two server running. One on port 9200 (Elasticsearch, you already have this working) and one on port 5601 (Kibana, which will talk to your Elasticsearch server).

Let me know if any of that isn't clear.

i used this command to run kibana and it does not show me any errors in command line
sudo docker run -d --name kibana -p 5601:5601 -e ELASTICSEARCH_URL=http://elasticsearch:9200 --net host kibana

Ah, you're using the Docker image. It looks like you're forwarding the port correctly, but the option for the Elasticsearch looks wrong. elasticsearch:9200 isn't a valid hostname... it might be in the image, but I doubt it.

Are you also running Elasticsearch in a Docker image? I don't know much about making Docker containers talk to one another, but from the Kibana Docker docs, it looks like you want to use --link to link that container with the Elasticsearch one. I don't know how to use that option, but I suspect it's just a name matching. Assuming that container is just named elasticsearch, maybe something like this would work?

sudo docker run -d --name kibana -p 5601:5601 --link elasticsearch:elasticsearch --net host kibana

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