# APM server is not listening in netstat tupln

**URL:** <https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540>\
**Category:** APM\
**Tags:** server\
**Created:** [October 13, 2022, 1:24pm UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540 "2022-10-13T13:24:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![lekshmir80](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lekshmir80/32/99022_2.png) [@lekshmir80](https://discuss.elastic.co/u/lekshmir80)\
**Post date:** [October 13, 2022, 1:24pm UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/1 "2022-10-13T13:24:52Z")

</div>

**Kibana version** : 7.8.0

**Elasticsearch version** : 7.8.0

**APM Server version** : 7.8.0

**APM Agent language and version** : 6.12.0

**Browser version** : Chrome 105.0.5195.125

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: apt install

**Fresh install or upgraded from other version?** Fresh install

\*\*Is there anything special in your setup?\*\*No

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/c/2c311ddfecb570e887cceafda5e9a39467571e0f.png)

When I am trying **sudo systemctl status apm-server** , showing the host and post is listening.

But when trying **netstat tupln** , port 8200 is not listening

Help me to resolve as soon as possible.

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [October 14, 2022, 2:43am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/2 "2022-10-14T02:43:19Z")

</div>

@lekshmir80 welcome to the forum!

Can you tell me what you're trying to diagnose with `netstat`? Is APM Server not accepting requests from your agents? Are the agents running on the same host?

We can see from the log that APM Server is listening on `localhost:8200` -- this is the default. Assuming your agents are on another host, you will need to tell APM Server to listen on an external address by configuring `apm-server.host` in `apm-server.yml`. For example, you can set `apm-server.host: 0.0.0.0:8200` to listen on all network interfaces.

---

<div class="post-metadata">

**Author:** ![lekshmir80](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lekshmir80/32/99022_2.png) [@lekshmir80](https://discuss.elastic.co/u/lekshmir80)\
**Post date:** [October 14, 2022, 5:30am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/3 "2022-10-14T05:30:48Z")

</div>

Thank you Andrew,  
My apm-server.yml file looks like this

```auto
apm-server:
  host: "localhost:8200"
output.elasticsearch:
   hosts: ["localhost:9200"]
   username: "elastic"
   password: "changeme"

```

But still I am getting http connection error

---

<div class="post-metadata">

**Author:** ![rachel\_gomez](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rachel_gomez/32/108615_2.png) [@rachel\_gomez](https://discuss.elastic.co/u/rachel_gomez)\
**Post date:** [October 14, 2022, 5:54am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/4 "2022-10-14T05:54:21Z")

</div>

This happens when APM Server exceeds the maximum number of requests that it can process concurrently.

HTTP 503: Request timed out waiting to be processededit  
Reduce the sample rate.  
Reduce collected stacktrace information.  
Reduce the payload size.  
Add APM Server instances.

Regards,  
Rachel Gomez

---

<div class="post-metadata">

**Author:** ![axw](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/axw/32/28197_2.png) [@axw](https://discuss.elastic.co/u/axw)\
**Post date:** [October 14, 2022, 5:55am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/5 "2022-10-14T05:55:47Z")

</div>

> [@lekshmir80](#):
>
> But still I am getting http connection error

Can you please elaborate on this? Are you attempting to connect APM Server using `curl` or something? If so, are you running this on the same machine? Otherwise, are you observing errors in an APM Agent's log? Are the agents running on the same machine?

---

<div class="post-metadata">

**Author:** ![juliana\_cg](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/juliana_cg/32/99127_2.png) [@juliana\_cg](https://discuss.elastic.co/u/juliana_cg)\
**Post date:** [October 31, 2022, 9:40am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/6 "2022-10-31T09:40:03Z")

</div>

Hello @axw,  
I've been having the same problem, but i'm using elastic agent on version 7.17.7 on docker/kubernetes. Logs show apm server is listening on [::]:8200 but everytime i try to curl from other host or even localhost i get connection refused error. From within container netstat doesn't show 8200 port at all. I have created another [topic](https://discuss.elastic.co/t/apm-host-on-standalone-elastic-agent/317695) about it.

Thanks for your time

---

<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:** [November 21, 2022, 5:40am UTC](https://discuss.elastic.co/t/apm-server-is-not-listening-in-netstat-tupln/316540/7 "2022-11-21T05:40:34Z")

</div>

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