I have some trouble with the installation of influxdb+grafana.
I see this line sin the openhab-log:
2019-11-12 10:20:35.475 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {“error”:“authorization failed”}
at org.influxdb.impl.InfluxDBErrorHandler.handleError(InfluxDBErrorHandler.java:19) ~[influxdb-java-2.2.jar:?]
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:242) ~[retrofit-1.9.0.jar:?]
at org.influxdb.impl.$Proxy134.writePoints(Unknown Source) ~[?:?]
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151) ~[influxdb-java-2.2.jar:?]
at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171) [influxdb-java-2.2.jar:?]
at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144) [influxdb-java-2.2.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_222]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_222]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_222]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_222]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222]
Okay, but what is the problem?
I tried to see the influxdb and started “influx” in a putty-session. But i get only the same error for all inputs i do. For example, i will see all databases with “show databases” and it show this error:
show databases
ERR: unable to parse authentication credentials
Warning: It is possible this error is due to not setting a database.
Please set a database with the command “use ”.
:edit: I got it running, i connected with the worng user. After i connect with correct user i could create the database und now ist running.
I have a problem with influxdb i can not make a database or a user it always say’s
ERR: error authorizing query: no user provided
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
I searched the forum but cant find a working solution?
Anyone have an idea what could be wrong?
It is working i did a fresh installation of influxdb and did the following
sudo service influxdb stop
Enable authentication in the [http] section of the configuration file /etc/influxdb/influxdb.conf :
[http]
enabled = true
bind-address = ":8086" # change to a specific interface if needed
auth-enabled = false # will enforce authentication
Now I am having different Devices. The height of 20 e.g. is fitting perfect by tablet. How can I use a “auto” sizing for different devices like mobile phone or browser without creating different sitemaps? The app is adjusting the “standard” chart item graphs without any problems (each device is putting correct chart in), but not the Webview items. Can someone tell me if this is possible to have an auto height based on the device?
I’ve been trying for 3 days now to setup InfluxDB, tried everything I read in several posts, but still I get the ERR=authorization failed in the Influx CLI.
Also chris669 suggestions didn’t work.
Don’t know what to try next… think I already re-installed 4 times the InfluxDB+Grafana via sudo openhabian-config. Carefully noted all users and passwords, tried different users and passwords in the “influx -port 8086 -username …” command and all to no avail
@shutterfreak thank you for your quick reply. That was what I was feared of. I want to avoid creating different sitemaps. I have one wall mounted tablet I use with habPanel. The other devices I would like to feed with one sitemap using autoscale as it is for standard charts.
If there is no solution I will continue using standard charts for the App and Grafana for the wall mounted habPanel solution.
Hi, yes - of course. I always try to avoid pre-defined installations as in most cases you’ll get older packages that (only) work in a specific configuration.
In case you’re running Debian Buster / planning to run Debian Buster, there’s of course also a Buster repo @ https://repos.influxdata.com/debian/dists/buster/, just modify the entry in influxdb.list.
Im at a loss here, i have this “authorization failed” error as well.
Im running openhab etc on a laptop running ubuntu 18 (so not the most used raspi3), installed influxdb &grafana using the script in the openhabian installer
trying your solution already stops me at the second line: sudo chown openhab:openhabian /etc/openhab2/services/influxdb.cfg
gives error chown: invalid group: ‘openhab:openhabian’
user rights management is total rocket science for me with ubuntu.
any pointers to what i can try? how to find out the correct user/group combo?
If you are running on Ubuntu you probably are not running openHABian. It if you are, the manual installation instructions do not create an openhabian user. Use your login in place of openhabian on that command.
I’ve run into the DB setup on a Pi4 as well. Turns out the setup script is not waiting long enough for influxdb to come up before trying to create the users.
The fix is simple, in /opt/openhabian/functions/influxdb+grafana.bash search for the lines: