HTTP API returns 204 but persists no data, works with influx CLI

Hi,

My current setup is Influx 0.13 (Dan’t blame me, pretty old) and Ubuntu 16.04.

I’m experiencing a silly issue. When POSTing data through the HTTP API, I get a 204 but actually no data is inserted. A SELECT query returns an empty set.
However, when using the influx CLI for inserting the very same data, it works properly. I basically do a tcpdump to capture the data sent by my connector (Influxdb-java) and paste it into influx with a leading INSERT.

POST /write?u=root&p=root&db=mydb&rp=default&precision=n&consistency=one

myserie,customer=22222222,aaa=00000000000002,version=2 bbb=0i,bbb=0i,ddd=0i,eee=240i,fff=120i,ggg=360i,hhh=2812i,iii=52i,jjj=105i,kkk=140i,lll=9i,mmm=6i,nnn=42i,ooo=0i,ppp=71i,qqq=0i,rrr=3237i,sss=10i,ttt=5i,uuu=15i,vvv=0i,www=0i,xxx=10i,yyy=0i,zzz=10i,a2=5i,b2=15i,c2=" NO DATA    ",d2=7200i,e2=3600i,e3=10800i,e4=6i,e5=0i,e6=0i,e7=0i,e8=6i,e9=0i,e10=3i,e11="Morning    ",e12="test 2      ",e13=1489050907448i,e14=138i,e15="   A0800",e16=230i,e17=0i,e18=0i 1489050906000000000

Converted to :
INSERT myserie,customer=22222222,aaa=00000000000002,version=2 bbb=0i,bbb=0i,ddd=0i,eee=240i,fff=120i,ggg=360i,hhh=2812i,iii=52i,jjj=105i,kkk=140i,lll=9i,mmm=6i,nnn=42i,ooo=0i,ppp=71i,qqq=0i,rrr=3237i,sss=10i,ttt=5i,uuu=15i,vvv=0i,www=0i,xxx=10i,yyy=0i,zzz=10i,a2=5i,b2=15i,c2=" NO DATA ",d2=7200i,e2=3600i,e3=10800i,e4=6i,e5=0i,e6=0i,e7=0i,e8=6i,e9=0i,e10=3i,e11="Morning ",e12="test 2 ",e13=1489050907448i,e14=138i,e15=" A0800",e16=230i,e17=0i,e18=0i 1489050906000000000

I’ve just seen that there is a logged issue in Github (https://github.com/influxdata/influxdb/issues/8049) but this seems a very old issue and it sounds weird to me than so few people experienced it.

Any ideas ?

Make sure that the timestamp you’re writing is not in the future. I believe in 0.13, queries add a where time < now() criteria. If you are writing into the future, you may need to add where time < now() + 30d to see that data.

In 1.1 (or 1.2), we changed the default end time for non-aggregate queries so the data should be returned if it was written into the future.

Hi Jason,

1489050906000000000 is not in the future (it’s 2017, March 9th). Inserting a similar point (just timestamped a few seconds later than the failing one) in a brand new database works fine.
Quite puzzling.

Hi, did you solve the issue?

I am seeing the same thing.
I am inserting data in a bash shell loop, and out of my 1000 inserts there are a few (~4) that’s data cannot later be found in the database - although I received an OK response:

before insert logging data: quotes_details_data2 usertype=“Employee”,totalSupportAmount=73000,totalServicesAmount=203000,getCommonOfferLoadingTime=3587,numberOfAccounts=1,OfferNumber=1011750307,perf=76.94452188458321,total=276000,value=1 1510631963
http call response:
HTTP/1.1 204 No Content
Content-Type: application/json
Request-Id: 6c87e1d9-c9f7-11e7-822c-000000000000
X-Influxdb-Version: 1.3.5
Date: Wed, 15 Nov 2017 11:23:37 GMT

how can I locate what happened to that Request-Id: 6c87e1d9-c9f7-11e7-822c-000000000000?
I also tried the logs, but they are completely empty

Thank you
Carmit

Hi,
No sorry, couldn’t fix this unfortunately…