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
Error "Flux not enabled" even though it is enabled by environment variable #117
Comments
Having the exact same situation. How do you get into the CLI when running as Hassio Add on? |
Looks to be an issue and will need more investigation (I can duplicate), in theory you don't need the variable as it is default |
I am using the SSH & Web Terminal add-on to get a shell on the root file system. Afterwards I am using the docker cli to start the influxdb cli within the docker container. |
Flux was working for me until v4.0.1 (or v4.0.0, not sure). I tried to enable it with the environment variable too, but without luck. Running |
The same issue :( |
Same issue here, flux was working a few weeks ago without any envvars.
|
Downgrading Chronograf to 1.8.8 appears to resolve, so would suggest its an upstream issue. |
How can this downgrade of Chronograf to 1.8.8 be done? I guess the add-on code needs to be updated and it's not something which every user should to him/herself in their local configuration? (sorry for these questions, I'm quite new in this, and I would like to understand better) For information, I'm currently having the same issues.
Configuration of InfluxDB add-on:
|
I don't have any clue how to downgrade INFLUXDB :( |
You can't, and unfortunately it also means that is unlikely there is anything we can do from an addon perspective as it looks like it needs to be fixed upstream. |
@jsternberg , I see on Github that you are part of the Influx team. Perhaps you can help out here? #daretoask
As @sinclairpaul mentioned in this issue, there would be an upstream issue, hence my reach-out to you. Thanks in advance! |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
Issue still there. Can we keep this issue open? (unstale) |
I have the same issue here. I can't even open the webui. Most of the times the addon starts and after a small amount of time it stops. Would be nice to have this corrected. |
Any progress. Same issue |
Same issue, and the
|
@sinclairpaul Since this could be an upstream bug, would you point out which GitHub issue it's related to? If there's no such an issue created in upstream GitHub repo, I can open one. |
There is no upstream issue that I have seen, the repo would be the InfluxDB one... |
Hi, I didn't see the ping for my name on this issue until this morning. Sorry for the delay. Taking a look, this issue seems to closely track with an upgrade to Chronograf 1.8.9.1 in this commit and there seem to have been some changes related to Flux that could trigger this message that seem to have originated in 1.8.9.1. I suspect these aren't unrelated. I'll see if I can either diagnose the issue or inform another person who might be able to help more. |
It looks like this change might be related: influxdata/chronograf#5631. This change says the default is v1 which should not change any part of the configuration. It seems this add-on uses the v1 version of the database so we would want to use that option. Can you check that the configuration is configured to use v1? For a running instance, i think this can be changed by going to configuration and clicking on the specific connection. |
@jsternberg According to the connection configuration I'm using v1 authentication. |
Thanks for the quick information. I took a closer look and I'm probably 90-95% certain this is a regression from adding v2 support. When the influxdb connection is specified by the command line, such as is done in this add-on, a hard-coded connection is created and it doesn't get created with a server version. Chronograf now assumes that no version means it is connected to a v2 server and determines that Flux isn't enabled. I believe this to be erroneous and I'll pass on this information to the relevant developer to determine the correct fix. I do not presently see a workaround beyond reverting back to chronograf 1.8.9.0. I'll try to get an answer by end of day for when we might expect a fix with a release so you can decide whether you want to downgrade the plugin temporarily or wait for the release. |
Thanks for your time and effort @jsternberg! |
influxdata/chronograf#5724 contains a fix |
The fix is now merged, it will work fine in the next chronograf nightly build / release. |
Will this still require a new release/push of the InfluxDB Addon to fix the issue? |
Yes, but first the Influx team has to release Chronograf v1.9.0 which will contain the fix. After that release, this home assistant add-in can be updated. |
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. |
Have you seen an roadmap that predicts when the next release of Chronograf will take place? Tried to look at the different influxdb sites and repos but could only find historical releases. |
Didn't find any info about a Chronograf v1.9.0 either. |
Seems that the Influx team released Chronograf 1.9.0 a couple of days ago. |
Yes, chronograf 1.9 is out since Monday, the add-on can be now updated to use chronograf 1.9. |
I see that @frenck is updating the add-on, to include v1.9.0 —> pull request: #187 This will resolve this issue. Update: I see that the push to Chronograf 1.9.0 is included in release v4.2.0 of this add-on. However, this release is not available (yet) in my Home Assitant supervisor: Is v4.2.0 in Beta phase? Or another reason? |
I'm patiently waiting for the version 4.2.0 as well.... |
Hi @frenck , |
Issue has been opened in HA add-ons repository, because it seems that the release bot didn't automatically take up the new version of the InfluxDB add-on: hassio-addons/repository#313 |
V4.2.1 of the add-on was released, which includes Chronograf v1.9.0 |
I tested: Now Flux works! So this issue can be closed. |
Problem/Motivation
I am not able to use the flux query language (using chronograf, I did not test the CLI). I read that I have to enable flux first. Therefore I used the environment variable INFLUXDB_HTTP_FLUX_ENABLED to enable it. But it is still not working.
Expected behavior
Using flux with chronograf should work.
Actual behavior
I get the following error message in chronograf:
400: Error flux not enabled: <nil>
I can see the following output with log_level debug in the logs:
[30/Jan/2021:21:08:05 +0100] 200 192.168.178.31, 172.30.32.1(172.30.32.2) GET /chronograf/v1/me HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0) time="2021-01-30T21:08:06+01:00" level=debug msg=Request component=server method=POST remote_addr="127.0.0.1:57164" url=/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/flux/ast time="2021-01-30T21:08:06+01:00" level=info msg="Response: OK" component=server method=POST remote_addr="127.0.0.1:57164" response_time=8.079669ms status=200 [30/Jan/2021:21:08:06 +0100] 200 fe80::bde4:7d50:285d:7074, 172.30.32.1(172.30.32.2) POST /chronograf/v1/flux/ast HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0) time="2021-01-30T21:08:06+01:00" level=debug msg=Request component=server method=POST remote_addr="127.0.0.1:57166" url="/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/sources/0/proxy/flux?path=/api/v2/query?organization%3Ddefaultorgname" time="2021-01-30T21:08:06+01:00" level=error msg="Error message Error flux not enabled: <nil>" component=server http_status =400 time="2021-01-30T21:08:06+01:00" level=info msg="Response: Bad Request" component=server method=POST remote_addr="127.0.0.1:57166" response_time="982.231µs" status=400 [30/Jan/2021:21:08:06 +0100] 400 192.168.178.31, 172.30.32.1(172.30.32.2) POST /chronograf/v1/sources/0/proxy/flux?path=/api/v2/query?organization%3Ddefaultorgname HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0) time="2021-01-30T21:08:15+01:00" level=debug msg=Request component=server method=GET remote_addr="127.0.0.1:57168" url=/api/hassio_ingress/C0cikYe5QGxOLmd4D8xjl7fwtjhdn5YQkXxt4nlfVIg/chronograf/v1/me time="2021-01-30T21:08:15+01:00" level=info msg="Response: OK" component=server method=GET remote_addr="127.0.0.1:57168" response_time="271.143µs" status=200
Steps to reproduce
Here is my configuration:
auth: true
reporting: false
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
envvars:
- name: INFLUXDB_HTTP_FLUX_ENABLED
value: 'true'
log_level: debug
I restarted the addon-on after the changes.
I can see that the environment variable is set:
[21:19:42] INFO: Kapacitor is waiting until InfluxDB is available...
[21:19:42] INFO: Chronograf is waiting until InfluxDB is available...
[21:19:42] DEBUG: Setting Env Variable INFLUXDB_HTTP_FLUX_ENABLED to true
[21:19:42] INFO: Starting the InfluxDB...
The text was updated successfully, but these errors were encountered: