Influx 1.8 - Query gives me http error 500

Hi, I have docker influxdb 1.8 running. I can sucessfully store data and view using grafana. The problem is when I try to query from NodeRed.

[{"id":"93d03ea5c59355ad","type":"influxdb in","z":"eeef2179bcd058a1","influxdb":"5c6a15490a97bf37","name":"","query":"show measurments","rawOutput":false,"precision":"","retentionPolicy":"","org":"organisation","x":570,"y":140,"wires":[["71a6f0fe68b5ee74"]]},{"id":"4a89f8bf1164738f","type":"inject","z":"eeef2179bcd058a1","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":140,"wires":[["93d03ea5c59355ad"]]},{"id":"71a6f0fe68b5ee74","type":"debug","z":"eeef2179bcd058a1","name":"debug 20","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":800,"y":140,"wires":[]},{"id":"5c6a15490a97bf37","type":"influxdb","hostname":"","port":"8086","protocol":"http","database":"analoginput","name":"Influxdb","usetls":false,"tls":"","influxdbVersion":"1.8-flux","url":"","rejectUnauthorized":true}]

First, it requested to enable flux-enabled=true. I did!
Now, it gives me HttpError: 500 Internal Server Error : {"error":"type error 1:1-1:5: undefined identifier \"show\""}.

I think this is not an auth problem, since the configuration is the same. I've filled user and pass.
I have no clues!

My struct:

database: analoginput
measurement: loadcell

How is InfluxDB configured? To use Flux or to use the older line input format? I think you need to set your InfluxDB config back and tell the node to use the v1.x mode:


Do you specifically want to use the flux language rather than the sql like language? If not then don't use v1.8-flux, use 1.x (which includes 1.8 non flux).

Also, for the query, you have show measurments which has a spelling error, I don't think that is flux syntax and I am not sure you can run that sort of query via the influx node even when in non-flux mode.

Sorry @Colin, but I'm confused. version 1.8 should be fluxQL. Is that correct? Probably this is my mistake.

I'm saying that because inside Grafana, the requests work. Also, influx cli works. But only requests inside nodered fail.

Hi @TotallyInformation, I think it is configured for the older format. I can successfully write to database with 1.8.

From your both answers, probably, there is a problem with language request. How can I test it? I mean, how to be sure that this is not a problem from nodered?

Appreciate your help

How can you test what?

If you mean test that you can query from within node red then change the node-red configuration so that it is not using flux (select 1.x as the server type) and then give it a valid query.

Hi @Colin, I was asking if there is a way to be sure which query language is configured in my influx server. I will try as you suggested.

If influxdb is 1.8 then it will respond to the original query language, and can respond to flux if correctly configured. Get it working in node-red with the original language, then if you want to use flux move on to that.

1 Like

It did work with 1.x config as you suggested, but it doesn't for 1.8.
I can't get it. Probably I'm missing some info from the docs.
Now I have two configs. One with 1.x for query and other with 1.8 (originally created) for writing. Is there a way to keep only one config. In my case, 1.8? For example, how to I force original query language for 1.8 config?

I think you are misunderstanding the three options.
1.x is for any 1.x version, including 1.8, using the original query language.
1.8-flux is for 1.8 if you want to use the flux query language. Anything less than 1.8 cannot do flux at all.
2.0 is for v2.0+, which only allows flux.

So if you want to use Influxdb 1.8 and use the original query language then use the 1.x configuration, for writing and querying. Forget about the 1.8-flux option unless you want to learn about flux or have a specific query which you cannot perform in the original language.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.