1
votes

I am able to set up the elastic stack, with file beat, logstash, elasticsearch and kibana on a Unix machine. Here is the kibana part of the docker-compose.yml

kibana:
image: docker.elastic.co/kibana/kibana:6.4.2
container_name: kibana
ports:
  - 5601:5601
environment:
  - cluster.name=docker-cluster
  - elasticsearch.url=http://elasticsearch:9200
  - server.host=0.0.0.0
  - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
  - "discovery.zen.ping.unicast.hosts=elasticsearch"
networks:
  - esnet
depends_on:
  - elasticsearch

However I am able to curl kibana from the docker host machine

$ curl ***hostname***:5601
<script>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 unable to open the kibana (http://hostname:5601) from my laptop which is in the same network domain.

Please help me with this. Thanks.

1
Are you not able to connect to http://localhost:5601 from your local browser after the kibana container is up and running?gravetii
Docker host is a unix machine. Cant try hitting that url with browser. However if I do curl localhost:5601, I am getting the response.Srinivasa Prasad
does it respond when you curl it with its public ip inside the host machine too?Amir Masud Zare Bidaki
@SrinivasaPrasad If localhost:5601 works well, then I think there is nothing Docker could do with such an issue. Try if you could telnet docker host on port 5601 from you laptop. Mostly it’s the network between your laptop and docker host.Light.G

1 Answers

0
votes

Yes. The issue is not related to docker. There is firewall restriction on the port 5601, only port 22 is open for connection on the docker host machine.

So I resolved this issue with SSH tunneling. https://chamibuddhika.wordpress.com/2012/03/21/ssh-tunnelling-explained/