influxdata / influxdb

Scalable datastore for metrics, events, and real-time analytics
https://influxdata.com
Apache License 2.0
28.59k stars 3.54k forks source link

'influx write' returns 'bad timestamp' with valid line protocol #17314

Open sanderson opened 4 years ago

sanderson commented 4 years ago

When using influx write to write data to InfluxDB 2.0, it returns a bad timestamp error for valid line protocol. If you add the same line protocol through the UI, it works.

Steps to reproduce:

  1. Run the following commands:
    curl https://raw.githubusercontent.com/influxdata/influxdb2-sample-data/master/bird-migration-data/bird-migration.line --output ./tmp-data
    influx write -b test-bucket @./tmp-data

Expected behavior: I expect the data to write successfully.

Actual behavior: It returned a bad timestamp error for each line of line protocol.

Environment info:

Output example:

': bad timestamp'migration,id=91823A,s2_cell_id=468e554 lat=61.3295,lon=24.6195 1560931200000000000
': bad timestamp'migration,id=91823A,s2_cell_id=468e554 lat=61.32967,lon=24.61917 1560974400000000000
': bad timestamp'migration,id=91823A,s2_cell_id=468e554 lat=61.32967,lon=24.61917 1561017600000000000
': bad timestamp'migration,id=91823A,s2_cell_id=468e554 lat=61.32967,lon=24.61917 1561039200000000000
': bad timestamp'migration,id=91823A,s2_cell_id=468e554 lat=61.33017,lon=24.62 1561060800000000000
': bad timestamp.migration,id=91823A,s2_cell_id=468e554 lat=61.33033,lon=24.61933 1561093200000000000
sanderson commented 4 years ago

Possibly related to #15829

sanderson commented 4 years ago

I'm also seeing what I believe to be related behavior in the UI. If I try to upload a file of line protocol (~800kb), the UI locks up and I have to hard refresh. However, if I copy and paste the contents of that file into the UI as just straight line protocol, it will write successfully.