db-art/mysql-statsd

mysql_statsd listens on UDP:20981 - why?

Closed this issue · 3 comments

I installed mysql_statsd via pip and just noticed that when it runs it listens on *:20981 - why does it do that? I cannot find anything in the code or in the docs to indicate that it listens for anything.
Also is there a way to bind it to a specifig IP?

I tried to reproduce this and I got a different port. However it is not listening on that port, but actually sending. If you use netstat -tulpen you can see that it probably is not in the LISTENING state.

When I tried to create another (test) application using the statsd object from Pystatsd it happened as well so I suspect it is the sending part inside the Pystatsd object. See also:
https://github.com/sivy/pystatsd

Hi @darookee thanks for your questions.
As for the "is there any way to bind it to a specific ip" question, could you clarify a bit more what you mean with "it" in this case? mysql statsd is built with a couple components, and I would like to understand what your question is about. What are you trying to achieve, or which problems are you running into which led you to these questions.

Thanks in advance!

@art-spilgames Thanks for the insight, I normaly use lsof to check for open ports and I overlooked that it says '(LISTEN)' after the portnumber when displaying actual listening ports.
I'll close this... :-)