# Influx 1.8 - Query gives me http error 500

**URL:** <https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907>\
**Category:** General\
**Tags:** docker\
**Created:** [24 March 2023 15:19 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907 "2023-03-24T15:19:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [24 March 2023 15:19 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/1 "2023-03-24T15:19:46Z")

</div>

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.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/6694a66a768a7d73ffd9d5c01d1af9864f02a01d.png)

```auto
[{"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":"127.0.0.1","port":"8086","protocol":"http","database":"analoginput","name":"Influxdb","usetls":false,"tls":"","influxdbVersion":"1.8-flux","url":"http://10.254.1.254:8086/","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:

```auto
database: analoginput
measurement: loadcell

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 March 2023 15:43 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/2 "2023-03-24T15:43:03Z")

</div>

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:

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/1/f10376492726a344f3932f2d85356634a47bd940.png)

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 March 2023 12:16 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/3 "2023-03-25T12:16:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [25 March 2023 13:03 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/4 "2023-03-25T13:03:38Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 March 2023 13:29 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/5 "2023-03-25T13:29:18Z")

</div>

> [@thalesmaoa](#):
>
> How can I test it?

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.

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [25 March 2023 15:34 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/6 "2023-03-25T15:34:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 March 2023 16:08 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/7 "2023-03-25T16:08:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![thalesmaoa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/thalesmaoa/32/17067_2.png) [@thalesmaoa](https://discourse.nodered.org/u/thalesmaoa)\
**Post date:** [25 March 2023 21:26 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/8 "2023-03-25T21:26:58Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 March 2023 21:43 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/9 "2023-03-25T21:43:45Z")

</div>

> [@thalesmaoa](#):
>
> It did work with 1.x config as you suggested, but it doesn't for 1.8

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 April 2023 21:44 UTC](https://discourse.nodered.org/t/influx-1-8-query-gives-me-http-error-500/76907/10 "2023-04-08T21:44:26Z")

</div>

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