influxdb icon indicating copy to clipboard operation
influxdb copied to clipboard

InfluxDB 2.4 Closes TCP Connection On Receiving Bad HTTP Request

Open AmitParmar2005 opened this issue 3 years ago • 1 comments

Hi Friends,

We are planning to use InfluxDB for our upcoming project for storing realtime tools data. Our tools sends data at every 20 milliseconds to InfluxDB using HTTP 1.1 over TCP. Our software is built using QT/ C++. It seems everything working fine until our program sends bad data/requests due to formatting issues or tool malfunctioning or any other reason. In that case InfluxDB closes TCP connection and stop collecting data. My question is, Is there any way I can override this behaviour so, InfluxDB ignore bad requests, keeps TCP connection open and keeps collecting data? I looked into InfluxDB documents, open/close questions, tutorials but could not find any answer.

Here's the details about problem: O.S. : Ubuntu 20.04 InfluxDB Version: 2.4 Installed from packages Query Type: Write Request Http Response: HTTP/1.1 400 Bad Request Content-Type: application/json; charset=utf-8 X-Influxdb-Build: OSS X-Influxdb-Version: v2.4.0 X-Platform-Error-Code: invalid Date: Fri, 11 Nov 2022 07:52:28 GMT Transfer-Encoding: chunked

a74 {"code":"invalid","message":"unable to parse 'POST /api/v2/write?org=ABC\u0026bucket=Mocart\u0026precision=ns HTTP/1.1\r': invalid boolean\nunable to parse 'Host: localhost:8086\r': invalid field format\nunable to parse 'Connection: Keep-Alive\r': invalid field format\nunable to parse 'Authorization: ....... ### Response is very long} 0

HTTP/1.1 400 Bad Request Content-Type: text/plain; charset=utf-8 Connection: close

Please let me know if you need more information. Due to company policy, I wont be able to post any code. I hope you understand.

Thanks In Advance, Amit

AmitParmar2005 avatar Nov 14 '22 07:11 AmitParmar2005

Same issue on influxdb 2.7. Any solutions? Or does influxdb not support such fast data reads and writes.

CheeseUnknown avatar Sep 25 '24 06:09 CheeseUnknown