This seems like a bug to me, I would open a new issue.
You could use Telegraf as a workaround, I recommend using the nightly builds so that you have #7210. You then would need to comment out all the DDL & DML lines since Telegraf doesn’t support them and setup the tail input and the influxdb output.
I agree, this seems a bug to me too, but, anyway, I found a workaround that I am explaining here for any user who is experiencing the same issue.
I read the same tutorial that i followed 2 years ago (you can find it here: Getting Started: Writing Data to InfluxDB | InfluxData). This webpage is about converting csvs in line protocol files (as I did) and sending them to an influxdb server.
that is the very same exact start string I’ve used before and that ended up in the above error (in fact, I tried the import writing no detail on retention policy in both DML and DDL, but again the error showed up).
So I tried the donk way: I literally copied the above preamble and pasted it on top of my line protocol file, and magic happened. Import worked flawlessly.
I don’t know the cause of the issue I’ve encountered. Maybe some special character I used for carriage return, or line feed. I really do not know. I tried to compare both versions of the preamble (the one I produced with the python script and the one I copied from Github page) with Notepad++, and they looked the same.