Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management port is sensitive to packetization of input #317

Open
philandstuff opened this issue Jul 30, 2013 · 2 comments
Open

Management port is sensitive to packetization of input #317

philandstuff opened this issue Jul 30, 2013 · 2 comments
Labels
bug A bug within statsd or it's bundled proxies

Comments

@philandstuff
Copy link

If I enter an interactive netcat session with the statsd management port, I can enter multiple commands one by one:

$ nc 127.0.0.1 8126
counters
{ 'statsd.bad_lines_seen': 0, 'statsd.packets_received': 0 }
END

gauges
{}
END

quit

However, if I try to script this session, the management port doesn't understand:

$ echo -e "counters\ngauges\nquit" | nc 127.0.0.1 8126
ERROR

I think that this is because the management port assumes that each incoming line will be in a separate packet. But here it's getting a single packet with three separate lines in it, which it doesn't understand.

@philandstuff
Copy link
Author

I had a brief look at using node's readline module to fix this, but that seems to do way more than just the line-buffering that is desirable here.

@draco2003
Copy link
Contributor

Correct. The current implementation doesn't do any packet parsing for multiple commands.
We're looking to extract the management code out of the main stats.js into a module and at that point, we can look into adding or implementing something similar to this : https://github.com/pgte/carrier

@mrtazz mrtazz added the bug A bug within statsd or it's bundled proxies label Jan 22, 2015
@coykitten coykitten added this to the v1.0.0 Release milestone Mar 23, 2016
@coykitten coykitten self-assigned this Mar 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug within statsd or it's bundled proxies
Projects
None yet
Development

No branches or pull requests

4 participants