# EADDRINUSE error="Address already in use - bind(2) for \\"0.0.0.0\\" port 5044"

**URL:** <https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059>\
**Category:** Elasticsearch\
**Created:** [April 2, 2019, 7:36pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059 "2019-04-02T19:36:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Phillip\_Groven](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phillip_groven/32/43326_2.png) [@Phillip\_Groven](https://discuss.elastic.co/u/Phillip_Groven)\
**Post date:** [April 2, 2019, 7:36pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059/1 "2019-04-02T19:36:56Z")

</div>

I am setting up an EFK cluster and filebeats are not being received I believe the error is due to the following EADDRINUSE error="Address already in use - bind(2) for "0.0.0.0" port 5044"  
when elasticserch and td-agent are stopped I dont see anything listening on port 5044  
When running netstat -tupln | grep 5044 I see the following  
tcp 0 0 0.0.0.0:5044 0.0.0.0:\* LISTEN 17991/ruby

I have taken out everything in the conf file for port 5044 but I still see the error.  
What is binding to port 5044?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 2, 2019, 10:45pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059/2 "2019-04-02T22:45:32Z")

</div>

You may need to use something like `lsof` to find that out.

---

<div class="post-metadata">

**Author:** ![Phillip\_Groven](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phillip_groven/32/43326_2.png) [@Phillip\_Groven](https://discuss.elastic.co/u/Phillip_Groven)\
**Post date:** [April 2, 2019, 11:19pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059/3 "2019-04-02T23:19:04Z")

</div>

When td-agent is not running port 5044 is not in use  
When td-agent is running I see the following  
root@ip-172-20-72-161 ~]# lsof -i | grep 19475  
ruby 19475 td-agent 10u IPv4 179788 0t0 TCP \*:lxi-evntsvc (LISTEN)  
ruby 19475 td-agent 11u IPv4 179789 0t0 TCP ip-172-18-72-161.us-west-2.compute.internal:24230 (LISTEN)  
ruby 19475 td-agent 15u IPv4 179792 0t0 TCP ip-172-18-72-161.us-west-2.compute.internal:td-agent (LISTEN)  
ruby 19475 td-agent 16u IPv4 170736 0t0 TCP ip-172-18-72-161.us-west-2.compute.internal:ddi-tcp-1 (LISTEN)  
ruby 19475 td-agent 17u IPv4 179793 0t0 UDP ip-172-18-72-161.us-west-2.compute.internal:td-agent

---

<div class="post-metadata">

**Author:** ![Phillip\_Groven](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/phillip_groven/32/43326_2.png) [@Phillip\_Groven](https://discuss.elastic.co/u/Phillip_Groven)\
**Post date:** [April 2, 2019, 11:28pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059/4 "2019-04-02T23:28:43Z")

</div>

Sorry maybe my last post was not clear  
When td-agent is running I see the following output  
lsof -wni tcp:5044  
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
ruby 19641 td-agent 10u IPv4 176936 0t0 TCP \*:lxi-evntsvc (LISTEN)

When it is not running I see no output

---

<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:** [April 30, 2019, 11:28pm UTC](https://discuss.elastic.co/t/eaddrinuse-error-address-already-in-use-bind-2-for-0-0-0-0-port-5044/175059/5 "2019-04-30T23:28:46Z")

</div>

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