# APM server failed to listen:listen tcp 127.0.0.1:8200

**URL:** <https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664>\
**Category:** APM\
**Created:** [October 30, 2018, 1:17pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664 "2018-10-30T13:17:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shahid](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shahid](https://discuss.elastic.co/u/shahid)\
**Post date:** [October 30, 2018, 1:17pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/1 "2018-10-30T13:17:08Z")

</div>

Hi APM Tech Team,

I have ubuntu server 18.xx LTE on EC2 and i try to install the AMP server by using the below commands ,  
But i am getting error.

# curl -L -O [https://artifacts.elastic.co/downloads/apm-server/apm-server-6.4.0-amd64.deb](https://artifacts.elastic.co/downloads/apm-server/apm-server-6.4.0-amd64.deb)

# sudo dpkg -i apm-server-6.4.0-amd64.deb

ERROR [beater]beater/beater.go:136failed to listen:listen tcp 127.0.0.1:8200: bind: address already in use  
INFO instance/beat.go:373 apm-server stopped.

Can you Please help me on this.  
Thanks

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [October 30, 2018, 1:29pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/2 "2018-10-30T13:29:13Z")

</div>

Is something else already listening on port 8200 on your machine? You can check this by running:

```auto
sudo lsof -i :8200

```

Shaunak

---

<div class="post-metadata">

**Author:** ![shahid](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shahid](https://discuss.elastic.co/u/shahid)\
**Post date:** [October 30, 2018, 2:33pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/3 "2018-10-30T14:33:49Z")

</div>

root@ip-172-31-34-100:/etc/apm-server# sudo lsof -i :8200  
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
apm-serve 12279 root 3u IPv4 3021673 0t0 TCP localhost:8200 (LISTEN)  
root@ip-172-31-36-101:/etc/apm-server#

Now m getting that response , i think so APM is running now.  
can i have the command to start and stop se service of APM and status of APM service on the server.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![shahid](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@shahid](https://discuss.elastic.co/u/shahid)\
**Post date:** [October 30, 2018, 2:43pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/4 "2018-10-30T14:43:22Z")

</div>

@shaunak but still m getting that errro while runnig this command

apm-server -e

2018-10-30T14:41:56.162Z INFO instance/beat.go:273 Setup Beat: apm-server; Version: 6.4.0  
2018-10-30T14:41:56.162Z INFO elasticsearch/client.go:163 Elasticsearch url: [http://52.34.252.500:9200](http://52.34.252.500:9200)  
2018-10-30T14:41:56.162Z INFO pipeline/module.go:98 Beat name: ip-172-31-36-99  
2018-10-30T14:41:56.162Z INFO instance/beat.go:367 apm-server start running.  
2018-10-30T14:41:56.162Z INFO [beater] beater/beater.go:172 self instrumentation is disabled  
**2018-10-30T14:41:56.163Z ERROR [beater] beater/beater.go:136 failed to listen:listen tcp 127.0.0.1:8200: bind: address already in use**  
2018-10-30T14:41:56.163Z INFO instance/beat.go:373 apm-server stopped.  
root@ip-172-31-36-99:/etc/apm-server#

---

<div class="post-metadata">

**Author:** ![shaunak](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shaunak/32/6643_2.png) [@shaunak](https://discuss.elastic.co/u/shaunak)\
**Post date:** [November 7, 2018, 1:52pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/6 "2018-11-07T13:52:58Z")

</div>

Try `sudo service apm-server stop` and then run the `sudo lsof -i :8200` command? Do you still see an `apm-server` process listening on 8200?

---

<div class="post-metadata">

**Author:** ![shiv94](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@shiv94](https://discuss.elastic.co/u/shiv94)\
**Post date:** [November 21, 2018, 3:10pm UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/7 "2018-11-21T15:10:47Z")

</div>

I faced the same issue when I stop the apm-server and run the sudo lsof -i :8200. No process is listening on 8200. Then why we are getting the error ?

---

<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:** [December 12, 2018, 11:18am UTC](https://discuss.elastic.co/t/apm-server-failed-to-listen-listen-tcp-127-0-0-1-8200/154664/8 "2018-12-12T11:18:45Z")

</div>

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