openhab + influxdb + auth Problem
Verfasst: 22. Mär 2020 19:46
Hallo zusammen,
ich bin ganz neu hier und erst vor kurzem das erste mal mit einem raspPi 4 und dem openhab 2.5 in Berührung gekommen. Bisher habe ich items, bindings etc. einbinden können und diese sowohl über Basic Ui und Habpanel auslesen und anzeigen lassen.
Ich bitte um eure Unterstützung für mein folgendes Problem:
Ich möchte als nächstes influxdb und grafana nutzen, um mir die Werte visualiseren zu können.
Leider bekomme ich die Nutzung von influx nicht hin, da ich sowohl über die Installationsroutine in openhab (sudo openhabian-config) als auch über Einzelinstallation einen Authentifizierung Fehler bekomme. Ich kann nicht auf influxdb mit den entsprechenden Berechtigungen zugreifen.
Hier die Fehlermeldung bei der Direktinstallation:
$ systemctl restart influxdb.service
OK Configure InfluxDB admin account... {"results":[{"statement_id":0,"error":"user already exists"}]}
OK Configure listen on localhost only...
$ sed -i -e /# Determines whether HTTP endpoint is enabled./ { n ; s/# enabled = true/enabled = true/ } /etc/influxdb/influxdb.conf
$ sed -i s/# bind-address = ":8086"/bind-address = "localhost:8086"/g /etc/influxdb/influxdb.conf
$ sed -i s/# auth-enabled = false/auth-enabled = true/g /etc/influxdb/influxdb.conf
$ sed -i s/# store-enabled = true/store-enabled = false/g /etc/influxdb/influxdb.conf
$ systemctl restart influxdb.service
OK
Setup of inital influxdb database and InfluxDB users... {"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
Wenn ich influx starte und ausführen möchte, erscheint folgende Fehlermeldung:
$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> auth
username: openhab
password:
> CREATE DATABASE mydb
ERR: authorization failed
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
----
Hier ein Auszug aus meiner Konfiguration, wenn noch etwas fehlt, lasst es mich bitte wissen:
Zugriff über PuTTY
Release = Raspbian GNU/Linux 10 (buster)
## Kernel = Linux 4.19.97-v7l+
## Platform = Raspberry Pi 4 Model B Rev 1.2
CPU Usage = 42.47% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
## CPU Load = 1m: 1.16, 5m: 0.27, 15m: 0.09
## Memory = Free: 3.32GB (86%), Used: 0.53GB (14%), Total: 3.86GB
## Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
## Root = Free: 21.73GB (78%), Used: 6.04GB (22%), Total: 28.99GB
## Updates = 0 apt updates available.
## Sessions = 1 session(s)
## Processes = 126 running processes of 32768 maximum processes
Ich habe jetzt mehrmals probiert, influx zu deinstallieren und wieder zu installieren, habe aber das Gefühl, dass noch irgendwo Einträge in Files hängen, die zu diesem Authorization Problem führen.
Wie kann ich influxdb restlos von meinem System deinstallieren (sudo apt-get remove --auto-remove influxdb und sudo apt-get purge --auto-remove influxdb habe ich bereits mehrfach ausgeführt) und welche Dateien müssen noch gelöscht werden, damit ich "jungfräulich" von vorne mit der Installation beginnen kann?
Wie und wo kann ich die Authorization einsehen oder ändern, um das Authentifizierungsproblem abszustellen?
Ich hoffe sehr auf eure Unterstützung und schnelle Hilfe... Vielen Dank vorab und viele Grüße
Alex
ich bin ganz neu hier und erst vor kurzem das erste mal mit einem raspPi 4 und dem openhab 2.5 in Berührung gekommen. Bisher habe ich items, bindings etc. einbinden können und diese sowohl über Basic Ui und Habpanel auslesen und anzeigen lassen.
Ich bitte um eure Unterstützung für mein folgendes Problem:
Ich möchte als nächstes influxdb und grafana nutzen, um mir die Werte visualiseren zu können.
Leider bekomme ich die Nutzung von influx nicht hin, da ich sowohl über die Installationsroutine in openhab (sudo openhabian-config) als auch über Einzelinstallation einen Authentifizierung Fehler bekomme. Ich kann nicht auf influxdb mit den entsprechenden Berechtigungen zugreifen.
Hier die Fehlermeldung bei der Direktinstallation:
$ systemctl restart influxdb.service
OK Configure InfluxDB admin account... {"results":[{"statement_id":0,"error":"user already exists"}]}
OK Configure listen on localhost only...
$ sed -i -e /# Determines whether HTTP endpoint is enabled./ { n ; s/# enabled = true/enabled = true/ } /etc/influxdb/influxdb.conf
$ sed -i s/# bind-address = ":8086"/bind-address = "localhost:8086"/g /etc/influxdb/influxdb.conf
$ sed -i s/# auth-enabled = false/auth-enabled = true/g /etc/influxdb/influxdb.conf
$ sed -i s/# store-enabled = true/store-enabled = false/g /etc/influxdb/influxdb.conf
$ systemctl restart influxdb.service
OK
Setup of inital influxdb database and InfluxDB users... {"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
{"error":"authorization failed"}
Wenn ich influx starte und ausführen möchte, erscheint folgende Fehlermeldung:
$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> auth
username: openhab
password:
> CREATE DATABASE mydb
ERR: authorization failed
Warning: It is possible this error is due to not setting a database.
Please set a database with the command "use <database>".
----
Hier ein Auszug aus meiner Konfiguration, wenn noch etwas fehlt, lasst es mich bitte wissen:
Zugriff über PuTTY
Release = Raspbian GNU/Linux 10 (buster)
## Kernel = Linux 4.19.97-v7l+
## Platform = Raspberry Pi 4 Model B Rev 1.2
CPU Usage = 42.47% avg over 4 cpu(s) (4 core(s) x 1 socket(s))
## CPU Load = 1m: 1.16, 5m: 0.27, 15m: 0.09
## Memory = Free: 3.32GB (86%), Used: 0.53GB (14%), Total: 3.86GB
## Swap = Free: 0.09GB (100%), Used: 0.00GB (0%), Total: 0.09GB
## Root = Free: 21.73GB (78%), Used: 6.04GB (22%), Total: 28.99GB
## Updates = 0 apt updates available.
## Sessions = 1 session(s)
## Processes = 126 running processes of 32768 maximum processes
Ich habe jetzt mehrmals probiert, influx zu deinstallieren und wieder zu installieren, habe aber das Gefühl, dass noch irgendwo Einträge in Files hängen, die zu diesem Authorization Problem führen.
Wie kann ich influxdb restlos von meinem System deinstallieren (sudo apt-get remove --auto-remove influxdb und sudo apt-get purge --auto-remove influxdb habe ich bereits mehrfach ausgeführt) und welche Dateien müssen noch gelöscht werden, damit ich "jungfräulich" von vorne mit der Installation beginnen kann?
Wie und wo kann ich die Authorization einsehen oder ändern, um das Authentifizierungsproblem abszustellen?
Ich hoffe sehr auf eure Unterstützung und schnelle Hilfe... Vielen Dank vorab und viele Grüße
Alex