Fail to get kibana version: HTTP GET request to http:/localhost:5600/api

Hi all,
I am running elasticsearch and kibana in a container and i am trying to link filebeat to kibana but I am having an error. I am still a noob in this.However, I succesfully had results when i installed them locally but this seems difficult for me to run it in a container. below are my commands and error message that i get when running the last command. Maybe i am doing something wrong here.

docker network create -d bridge mynetwork
docker run --network=mynetwork --name elasticsearch -p 9200:9200 -p 9300:9300 -e 
docker run --network=mynetwork --name kibana -p 5601:5601 --link elasticsearch:elasticsearch  
-e "ELASTICSEARCH_URL=http://elasticsearch:9200"
docker run --network=mynetwork --link elasticsearch:elasticsearch --name filebeat  setup -E filebeat.input.paths=/var/jenkins_home -E

And here is the error message when i run the last command

Index setup complete.
Loading dashboards (Kibana must be running and reachable)
Exiting: error connecting to Kibana: fail to get the Kibana version: HTTP GET request to 
http://localhost:5601/api/status fails: fail to execute the HTTP GET request: Get 
http://localhost:5601/api/status: dial tcp [::1]:5601: connect: cannot assign requested address. 
Response: .

Your help is highly appreciated.

It looks like you're telling filebeat that Kibana is on localhost, but in this context wouldn't localhost be the container running filebeat? What happens if you point filebeat at kibana:5601 instead?

It was now able to connect to kibana when I changed it to kibana:5601. However, it runs and disconnects after some few seconds. Any reason for this behavior ? Here is output after runnning the last command

Index setup complete.
Loading dashboards (kibana must be running and reachable)
Loaded dashboards
Loaded machine learning job configurations
PS C:\Users\mymachine>

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