# Not able to access 9200, 5601, 8200 port from outside the installed ELK APM server

**URL:** <https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [June 13, 2019, 2:45pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678 "2019-06-13T14:45:50Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Susmit07](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/susmit07/32/47309_2.png) [@Susmit07](https://discuss.elastic.co/u/Susmit07)\
**Post date:** [June 13, 2019, 2:45pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/1 "2019-06-13T14:45:50Z")

</div>

Hi Team,

I am able to view the kibana dashboard from the sever where they are being installed but not from outside the server. Can you please help me out to solve the issue

Did a netstat :

[root@potman1 ~]# netstat -nat | grep 9200  
tcp6 0 0 :::9200 :::\* LISTEN  
[root@potman1 ~]# netstat -nat | grep 5601  
tcp6 0 0 :::5601 :::\* LISTEN

## docker-compose.yml

version: '2.2'

services:  
delete-indexes:  
image: playdingnow/delete-outdated-es-indexes:1.3  
environment:  
- eshost=elasticsearch  
- esport=9200  
- esmaxdays=15  
elasticsearch:  
image: [docker.elastic.co/elasticsearch/elasticsearch:6.5.1](http://docker.elastic.co/elasticsearch/elasticsearch:6.5.1)  
environment:  
- xpack.security.enabled=false  
- ES\_JAVA\_OPTS=-Xms512m -Xmx512m  
ports:  
- 9200:9200  
healthcheck:  
test: ['CMD', 'curl', '-f', '[http://0.0.0.0:9200](http://0.0.0.0:9200)']  
interval: 10s  
timeout: 5s  
retries: 3  
kibana:  
image: [docker.elastic.co/kibana/kibana:6.5.1](http://docker.elastic.co/kibana/kibana:6.5.1)  
ports:  
- 5601:5601  
healthcheck:  
test: ['CMD', 'curl', '-f', '[http://0.0.0.0:5601](http://0.0.0.0:5601)']  
interval: 10s  
timeout: 5s  
retries: 3  
depends\_on:  
elasticsearch:  
condition: service\_healthy  
apm-server:  
image: [docker.elastic.co/apm/apm-server:6.5.1](http://docker.elastic.co/apm/apm-server:6.5.1)  
ports:  
- 8200:8200  
environment:  
- output.elasticsearch.hosts=['[http://elasticsearch:9200](http://elasticsearch:9200)']  
- apm-server.host="0.0.0.0:8200"  
- apm-server.secret\_token="xxVpmQB2HMzCL9PgBHVrnxjNXXw5J7bd79DFm6sjBJR5HPXDhcF8MSb3vv4bpg44"  
- setup.kibana.host="kibana:5601"  
- setup.template.enabled=true  
- logging.to\_files=false  
depends\_on:  
elasticsearch:  
condition: service\_healthy  
kibana:  
condition: service\_healthy

How can i enable the ports to make is accessible from outside as well.

Thanks,  
Susmit

---

<div class="post-metadata">

**Author:** ![MiTschMR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mitschmr/32/48254_2.png) [@MiTschMR](https://discuss.elastic.co/u/MiTschMR)\
**Post date:** [June 24, 2019, 12:31pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/2 "2019-06-24T12:31:07Z")

</div>

Hi @Susmit07

To me this sounds like a firewall problem. I'm sorry for the silly question, but did you change the configuration of iptables/firewalld or whatever firewall you are using to allow access on these ports?

If yes, which OS are you using?

Hope this helps.

MiTschMR

---

<div class="post-metadata">

**Author:** ![Susmit07](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/susmit07/32/47309_2.png) [@Susmit07](https://discuss.elastic.co/u/Susmit07)\
**Post date:** [June 27, 2019, 8:04pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/3 "2019-06-27T20:04:43Z")

</div>

Hi @MiTschMR I am using a windows VM, firewall is not the issue, still I am stuck with the issue. It's quite frustrating ☹

---

<div class="post-metadata">

**Author:** ![MiTschMR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mitschmr/32/48254_2.png) [@MiTschMR](https://discuss.elastic.co/u/MiTschMR)\
**Post date:** [June 28, 2019, 9:25am UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/4 "2019-06-28T09:25:32Z")

</div>

Hi @Susmit07

I did a quick search and only found [this](https://stackoverflow.com/questions/53081553/how-to-connect-to-a-docker-container-running-on-a-remote-host) solution on stackoverflow. It looks like Windows only binds the port to localhost, so you have to specify the port like 0.0.0.0::. If I am not mistaken this solution should also work in the docker compose files.

Because I am using CentOS 7 I can't reproduce your error, I'm sorry.

Hope this helps.

MiTschMR

---

<div class="post-metadata">

**Author:** ![Susmit07](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/susmit07/32/47309_2.png) [@Susmit07](https://discuss.elastic.co/u/Susmit07)\
**Post date:** [June 28, 2019, 10:45am UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/5 "2019-06-28T10:45:48Z")

</div>

Hi @MiTschMR I am already using 0.0.0.0 so it can be accessed across all network interfaces. Please find my docker-compose.yml I have attached above. Will be awaiting for your response ~ BR, Susmit

---

<div class="post-metadata">

**Author:** ![MiTschMR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mitschmr/32/48254_2.png) [@MiTschMR](https://discuss.elastic.co/u/MiTschMR)\
**Post date:** [June 29, 2019, 1:15pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/6 "2019-06-29T13:15:03Z")

</div>

Hi @Susmit07

Please try this form of the „ports“ setting on every port you publish:

```
ports: 
  - 0.0.0.0:5601:5601 

```

This is the solution given from the thread I referenced to.

Hope this helps.

MiTschMR

---

<div class="post-metadata">

**Author:** ![iukea](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iukea/32/49083_2.png) [@iukea](https://discuss.elastic.co/u/iukea)\
**Post date:** [June 29, 2019, 9:16pm UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/7 "2019-06-29T21:16:54Z")

</div>

```
ports:
- 8200:8200
- 9200:9200
- 5601:5601 

```

in your docker compose file under APM

---

<div class="post-metadata">

**Author:** ![kmohd](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kmohd/32/49090_2.png) [@kmohd](https://discuss.elastic.co/u/kmohd)\
**Post date:** [June 30, 2019, 6:32am UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/8 "2019-06-30T06:32:36Z")

</div>

I had the same issue using windows too, i have set the below in **kibana.yml** which gave me access from outside the server through a browser (ServerIP:5601)

> server.port: 5601  
> server.host: "actual server ip here"

---

<div class="post-metadata">

**Author:** ![Susmit07](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/susmit07/32/47309_2.png) [@Susmit07](https://discuss.elastic.co/u/Susmit07)\
**Post date:** [July 4, 2019, 5:17am UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/9 "2019-07-04T05:17:38Z")

</div>

@iukea & @MiTschMR I am already using it. Please see my updated docker-compose.yml

version: '2'  
services:  
zookeeper:  
image: [wce-gateways-docker-dev.artifactory.swg-devops.com/dev-zookeeper](http://wce-gateways-docker-dev.artifactory.swg-devops.com/dev-zookeeper)  
ports:  
- "2181:2181"  
kafka:  
image: [wce-gateways-docker-dev.artifactory.swg-devops.com/dev-kafka](http://wce-gateways-docker-dev.artifactory.swg-devops.com/dev-kafka)  
ports:  
- "9092:9092"  
environment:  
KAFKA\_ADVERTISED\_HOST\_NAME: [b2bisand1.fyre.ibm.com](http://b2bisand1.fyre.ibm.com)  
KAFKA\_ZOOKEEPER\_CONNECT: zookeeper:2181  
volumes:  
- /var/run/docker.sock:/var/run/docker.sock  
elk:  
image: [wce-gateways-docker-dev.artifactory.swg-devops.com/dev-elk](http://wce-gateways-docker-dev.artifactory.swg-devops.com/dev-elk)  
ports:  
- "5601:5601"  
- "9200:9200"  
- "5044:5044"

Now I am able to access 9200 and 5044, but Kibana showing error

# Kibana did not load properly. Check the server output for more information.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 1, 2019, 5:17am UTC](https://discuss.elastic.co/t/not-able-to-access-9200-5601-8200-port-from-outside-the-installed-elk-apm-server/185678/10 "2019-08-01T05:17:38Z")

</div>

Closed on August 1, 2019, 5:17am UTC

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