# Failed to connect to apmX port 8200: Connection refused

**URL:** <https://discuss.elastic.co/t/failed-to-connect-to-apmx-port-8200-connection-refused/142800>\
**Category:** APM\
**Created:** [August 2, 2018, 7:07pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-apmx-port-8200-connection-refused/142800 "2018-08-02T19:07:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 2, 2018, 7:07pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-apmx-port-8200-connection-refused/142800/1 "2018-08-02T19:07:13Z")

</div>

I'm getting following error (through my app's logs):

`sending transactions failed: sending request for SendTransactions failed: Post http://apmX:8200/v1/transactions: dial tcp 10.0.10.187:8200: connect: connection refused`

yet, apm-server seems to be up and running:

```
# docker exec -it apmX sh
sh-4.2$ curl localhost:8200
404 page not found
sh-4.2$ 

```

I even tried accessing it from

```
# docker run -it --network Y alpine sh
/ # apk add -q curl
/ # curl -v apmX:8200
* Rebuilt URL to: apmX:8200/
* Trying 10.0.10.187...
* TCP_NODELAY set
* connect to 10.0.10.187 port 8200 failed: Connection refused
* Failed to connect to apmX port 8200: Connection refused
* Closing connection 0
curl: (7) Failed to connect to apmX port 8200: Connection refused
/ # 

```

it's like it's running on `localhost` instead of `0.0.0.0`

Please advise.

---

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [August 2, 2018, 7:17pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-apmx-port-8200-connection-refused/142800/2 "2018-08-02T19:17:56Z")

</div>

Per [Configuration file | APM Server Reference | Elastic](https://www.elastic.co/guide/en/apm/server/current/apm-server-configuration.html#apm-server-configuration)

```
# head -2 apm-server.yml
apm-server:
        host: 0.0.0.0:8200
#
```

---

<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 23, 2018, 3:18pm UTC](https://discuss.elastic.co/t/failed-to-connect-to-apmx-port-8200-connection-refused/142800/3 "2018-08-23T15:18:09Z")

</div>

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