Closed Peekayy closed 1 month ago
I've investigated this with a simple test application (see attached) writing data to OSS InfluxDB2 over localhost and then monitoring loopback traffic with wireshark. Even with the test app running for 4 hours, I've been unable to recreate this issue. In all sampled packets (see attached) the Unicode degree character is sent as utf-8 0xcb20
. I've not seen any packets with extended-ascii encoding. All batches are sent with the header content-type: text/plain; charset=utf-8
and this gets set in the internal transport implementation of the client library.
Also looking at the code-base where escape.measurement()
prepares the final encoding of the measurement, also tested locally with special Unicode characters, this also uses the expected utf-8
encoding.
TestPacketRandom1.txt TestPacketEarly.txt TestPacketLast.txt
These tests were made on a system with Ubuntu 22.04.
Works for me.
@karel-rehor Thanks for your investigation. However I had to make sure I could reproduce it using your script or at least a very similar one. And after 19h44min it happened again. See for yourself :
The script ran from 2024-10-15 22:36 CEST until 2024-10-16 21:24 CEST and data stopped being ingested at 2024-10-16 18:20 CEST Notice the new Measurement tag that was created "�C" however it doesn't contain any data.
The ts script I used : idbTest.ts.txt
And the console output : idsTest.log
Can you have a look? thanks
@karel-rehor Good news I found the root cause !
This is a nodejs regression in 22.7.0 : https://github.com/nodejs/node/issues/54521
Sorry for the false issue but big thanks again for your investigation as it put me on the track to find the solution !
Specifications
Code sample to reproduce problem
This is pseudo-script, I didn't actually run it but it reflects my implementation.
Expected behavior
HTTP payload format should be stable even after days.
Actual behavior
It seems that the ° character is sent as utf8 0xc2b0 but after some time it is sent as ASCII 0xb0.
Additional info
Hi, I made a small nodeJs app that fetches data from my heat pump and stores it in influxdDb. I then use Grafana to have nice graphs. Basically the app gathers data every minute based on a setInterval call. It works perfectly for a day or two and then suddenly data doesn't show up anymore in Grafana. No obvious reason for it. And a simple restart of the app gets it back on rails, until next failure. After a lot of investigation on influxdb, heavy logging on nodejs. I found out that the setInterval was actually running and that influxDb was getting data. So I went on the wireshark road. And here are the results : Extract of relevant part of normal behaviour http payload :
Extract of relevant part of faulty behaviour http payload :
The main difference between the 2 situations is at offset 0 : normal behaviour sends c2b0 which is utf8 '°' while faulty behaviour sends b0 which is also '°' but in ASCII. This makes influxdb reject the values...
Any idea why ? Any idea of things I could try ?