-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[0.9.4.2] Storing strings is not working #4584
Comments
@DennisBauer can you try using the CLI or direct Also, the more of the actual CLI or For example, running 0.9.4.1 I'm able to insert and query your example just fine:
|
@beckettsean Hmm, I'm on the same version as you, your example works, but when I try:
I get |
@benschwarz The format you are using is not quite right. Tags should not have double-quotes and the space in
|
@jwilder Hmm, I think we need to improve the documentation a little here.
This leads me to believe that most things should be double quoted in case of illegal characters — of course, when I go to the "reading and writing data" page, I'm presented with no information about quoting, or escaping. What do you think? Perhaps worth adding something? (Should we track this in another issue? I totally hijacked here thinking I had the same issue.) |
There is more documentation here:
Documentation issues/PRs are tracked in this repo: https://github.com/influxdb/influxdb.com |
@benschwarz that quote from the Getting Started page is indeed wrong. I'll get that fixed. The https://influxdb.com/docs/v0.9/write_protocols/write_syntax.html page is the definitive one for line protocol syntax. |
@beckettsean -- sounds like we can close this? |
@beckettsean:
|
@DennisBauer I am at a loss to explain what you are seeing. I just spun up a new 0.9.4.2 server and the exact CLI session you show works fine:
An empty return is the expected result if there are no matching records. The more concerning error is the one from the I can only conclude that there's something specific to your installation that is leading to the issues. Was What are the results of |
@beckettsean The weird thing is, that I already dropped labtest and created a new one (same name) with no difference in the result. Now I created a database with a different name (labtestnew) and everything is working fine:
Isn't data deleted when I drop database and create a new one with the same name? Does that mean everytime I drop a database because of some problems I can't use the same name again? Whats is also weird is that SHOW MEASUREMENTS and SHOW TAG KEYS is getting results in labtest:
|
It certainly should be. Perhaps the metastore isn't fully purging. Does the behavior persist through a restart of the daemon? |
Restarting the daemon helped to store data, but there is another problem now. No matter which timestamp I include, 1970-01-17 will be stored. This is independent from the database, it happens on all databases (even the ones which were working quite well) |
@DennisBauer that sounds like a units mismatch. InfluxDB stores every timestamp as a nanosecond timestamp unless otherwise configured during the write. If you were supplying microsecond timestamps without microsecond precision, that would make all timestamps appear to be from Jan 17th, 1970:
Review the Precision query string parameter from the line protocol syntax guide to see how to write microsecond timestamps. The errors caused by dropping and recreating the database are covered by #3551 and #4636, which are cleaner issues. Closing this in favor of those. |
@beckettsean I know that InfluxDB expects nanoseconds by default. Thats why I used the query which we discussed above: But still I am getting wrong timestamps. But not only in my test database, but also in older databases which were working fine before. |
@DennisBauer can you try the insert with `curl -iX POST 'http://localhost:8086/write?db=labtest&precision=n' --data-binary 'test,identifier=Testperson value="test test test" 1445944679577000000' |
@beckettsean After restarting the daemon again, everything works fine. This has been weird to me for quite a time now: sometimes influxdb works quite well, other times there is no (visible) error message and everything seems to work but indeed it's not. Well nevertheless this issue seems to be solved now. Thansk again for your support! |
@DennisBauer the latest influxdb-java was recently pushed to Maven. If you haven't updated to the most recent release that might help. |
@beckettsean Thanks for the hint, I already updated my project a couple of days ago. |
Hi,
I am trying to store strings in influxdb 0.9.4.2, using influxdb-java. Line protocol output of influxdb-java looks like:
test,identifier=Testperson value="test test test" 1445944679577000000
But no matter if I am using influxdb-java or the influxdb web interface (with the same line protocol data), the point is not stored to my database. Web interface doesn't report any error, but I can't query data by
SELECT value FROM test
, it saysSuccess! (no results to display)
then.When I change my timestamp to seconds instead of nanoseconds, everything is working fine. Also if I am storing floats instead of strings everything is fine. Am I doing something wrong or is this an error in influxdb?
Greetings
Dennis
The text was updated successfully, but these errors were encountered: