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

Testing connection by sending two spaces breaks some Carbon implementations #34

Closed
tkirill opened this issue Feb 28, 2023 · 0 comments · Fixed by #35
Closed

Testing connection by sending two spaces breaks some Carbon implementations #34

tkirill opened this issue Feb 28, 2023 · 0 comments · Fixed by #35

Comments

@tkirill
Copy link
Contributor

tkirill commented Feb 28, 2023

Hi!

I'm using carbon-clickhouse implementation of Carbon. I discovered that it doesn't accept first datapoint from a collection which I pass to graphiteClient.SendAsync.

After some research I found out that the reason is two spaces before first datapoint. They come from testing connection procedure. I reproduced the problem with netcat:

# this datapoint will be ignored because of leading spaces
echo "  test.some.metric 275 `date +%s`" | nc localhost 2003 -vN

What do you think about changing space to LF (0x0A) for testing connection purposes? Since plaintext protocol is line-based it looks safer. I tried it with both original Carbon and clickhouse-carbon and it works wihtout any errors in logs or datapoint loss:

# this datapoint will be successfully accepeted
echo -e "\n\ntest.some.metric 275 `date +%s`" | nc localhost 2003 -vN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant