Line protocol sample on docu not working

greetings

Why would the line protocol provided in the influxdb documentation not work?

iot-devices,building=5a temperature=72.3,humidity=34.1 1664647260000000000
iot-devices,building=5a temperature=72.1,humidity=33.8 1664733660000000000
iot-devices,building=5a temperature=72.2,humidity=33.7 1664820060000000000

Thanks!

@yosiasz That’s the blog, not the docs, but either way, the line protocol looks valid. How is it not working?

1 Like

gotcha

this is how I am trying it

Ok, and what error are you getting?

1 Like

image

this is the error I see and nothing in the cli

Are you copying the line protocol from a text editor on a Windows machine?

I am copying it from the blog directly, even if I save it to a csv file or text file, it throws the same error.

Are you on a Windows machine?

yes sir, sorry did not add that in the initial post

so, I installed influxdb on a different windows machine and importing the data in first post works just fine.

My guess it is has something to do with newline characters that Windows uses by default. Line protocol treats a newline (\n) as the line delimiter. Windows, by default, uses the carriage return + newline (\r\n) character sequence for newlines which causes the line protocol parser to fail. Typically when I see issues with raw line protocol not working on a Windows machine, these whitespace characters are the cause.

1 Like