Hallo udo1toni,
leider komme ich dort garnicht hin...
[23:45:21] openhabian@openhab:~$ Sudo /etc/influxdb/influxdb.conf
-bash: Sudo: command not found
[23:45:34] openhabian@openhab:~$ /etc/influxdb/influxdb.conf
-bash: /etc/influxdb/influxdb.conf: Permission denied
Welchen Weg könnte ich noch einschlagen? Wie kann ich die influxdb.conf noch (außer über die Konsole) ändern?
openhab + influxdb + auth Problem
-
- Beiträge: 8
- Registriert: 22. Mär 2020 19:27
Re: openhab + influxdb + auth Problem
[23:46:57] openhabian@openhab:~$ curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
OK
[23:52:14] openhabian@openhab:~$ echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
deb https://repos.influxdata.com/debian stretch stable
[23:52:24] openhabian@openhab:~$ sudo apt update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 https://repos.influxdata.com/debian stretch InRelease [4,732 B]
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Ign:4 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:5 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Hit:6 https://packages.grafana.com/oss/deb stable InRelease
Get:7 https://repos.influxdata.com/debian stretch/stable armhf Packages [924 B]
Get:8 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.0 MB in 11s (1,168 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
[23:52:47] openhabian@openhab:~$ sudo apt install influxdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
influxdb is already the newest version (1.7.10-1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
[23:52:57] openhabian@openhab:~$ apt list --upgradable
Listing... Done
binutils-arm-linux-gnueabihf/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
binutils-common/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
binutils/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
libbinutils/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
raspberrypi-sys-mods/testing 20191105 armhf [upgradable from: 20190429]
[23:53:23] openhabian@openhab:~$ sudo systemctl enable influxdb
[23:53:43] openhabian@openhab:~$ sudo systemctl start influxdb
[23:53:51] openhabian@openhab:~$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> CREATE DATABASE openhab_db
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 <database>".
OK
[23:52:14] openhabian@openhab:~$ echo "deb https://repos.influxdata.com/debian stretch stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
deb https://repos.influxdata.com/debian stretch stable
[23:52:24] openhabian@openhab:~$ sudo apt update
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Get:2 https://repos.influxdata.com/debian stretch InRelease [4,732 B]
Get:3 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Ign:4 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:5 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Hit:6 https://packages.grafana.com/oss/deb stable InRelease
Get:7 https://repos.influxdata.com/debian stretch/stable armhf Packages [924 B]
Get:8 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB]
Fetched 13.0 MB in 11s (1,168 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
5 packages can be upgraded. Run 'apt list --upgradable' to see them.
[23:52:47] openhabian@openhab:~$ sudo apt install influxdb
Reading package lists... Done
Building dependency tree
Reading state information... Done
influxdb is already the newest version (1.7.10-1).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
[23:52:57] openhabian@openhab:~$ apt list --upgradable
Listing... Done
binutils-arm-linux-gnueabihf/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
binutils-common/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
binutils/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
libbinutils/stable 2.31.1-16+rpi2 armhf [upgradable from: 2.31.1-16+rpi1]
raspberrypi-sys-mods/testing 20191105 armhf [upgradable from: 20190429]
[23:53:23] openhabian@openhab:~$ sudo systemctl enable influxdb
[23:53:43] openhabian@openhab:~$ sudo systemctl start influxdb
[23:53:51] openhabian@openhab:~$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> CREATE DATABASE openhab_db
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 <database>".
- udo1toni
- Beiträge: 15249
- Registriert: 11. Apr 2018 18:05
- Wohnort: Darmstadt
Re: openhab + influxdb + auth Problem
sudo wird klein geschrieben, wie eigentlich alle Befehle in der Bash
Achso... ich hab oben noch das nano vergessen... vollständig heißt der Befehl also
sudo bedeutet: führe den folgenden Befehl unter einem anderen User aus (wird kein User angegeben, ist dies root)
nano ist ein editor, um Textdateien zu bearbeiten (das ist der ausgeführte Befehl)
/etc/influxdb/ ist das Verzeichnis, in dem die Konfigurationsdateien für influxdb gespeichert werden.
influxdb.conf ist die Konfigurationsdatei, in der die fraglichen Parameter liegen.
Und noch ein PS: es ist keine gute Idee, alle möglichen Wege auszuprobieren, nur aus lauter Ungeduld. Im Zweifel hast Du Dir damit Dein System nachhaltig verorgelt. Nciht, was ein Experte nicht wieder richten könnte, aber das bist Du nun mal nicht (ohne Dir zu nahe treten zu wollen
) und anschließend bleibt Dir eigentlich nur die Option, die openHAB-Konfiguration zu sichern und anschließend die SD-Karte mit einer neuen SD-Karte zu ersetzen, auf der Du ein jungfräuliches openhabian Image vorbereitet hast. Dann startest Du komplett von vorne und hältst Dich peinlich genau an die Anleitungen in der offiziellen Doku...
Achso... ich hab oben noch das nano vergessen... vollständig heißt der Befehl also
Code: Alles auswählen
sudo nano /etc/influxdb/influxdb.conf
nano ist ein editor, um Textdateien zu bearbeiten (das ist der ausgeführte Befehl)
/etc/influxdb/ ist das Verzeichnis, in dem die Konfigurationsdateien für influxdb gespeichert werden.
influxdb.conf ist die Konfigurationsdatei, in der die fraglichen Parameter liegen.
Und noch ein PS: es ist keine gute Idee, alle möglichen Wege auszuprobieren, nur aus lauter Ungeduld. Im Zweifel hast Du Dir damit Dein System nachhaltig verorgelt. Nciht, was ein Experte nicht wieder richten könnte, aber das bist Du nun mal nicht (ohne Dir zu nahe treten zu wollen

openHAB4.3.3 stable in einem Debian-Container (bookworm) (Proxmox 8.3.5, LXC), mit openHABian eingerichtet
-
- Beiträge: 8
- Registriert: 22. Mär 2020 19:27
Re: openhab + influxdb + auth Problem
Hallo udo1toni,
nochmals vielen herzlichen Dank für deine Bemühungen. Hiernach langer Abwesenheit nun meine Rückmeldung.
Ich habe all deine Ratschläge umgesetzt:
1. neue SD-Karte, Image drauf
2. peinlich genau an die Anleitung halten
3. Ergebnis:
[02:32:05] openhabian@openhab:~$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> show databases
name: databases
name
----
_internal
openhab_db
> show users
user admin
---- -----
admin true
openhab false
grafana false
> exit
Es geht endlich...
*thumbs up*
nochmals vielen herzlichen Dank für deine Bemühungen. Hiernach langer Abwesenheit nun meine Rückmeldung.
Ich habe all deine Ratschläge umgesetzt:
1. neue SD-Karte, Image drauf
2. peinlich genau an die Anleitung halten
3. Ergebnis:
[02:32:05] openhabian@openhab:~$ influx
Connected to http://localhost:8086 version 1.7.10
InfluxDB shell version: 1.7.10
> show databases
name: databases
name
----
_internal
openhab_db
> show users
user admin
---- -----
admin true
openhab false
grafana false
> exit
Es geht endlich...
*thumbs up*

- udo1toni
- Beiträge: 15249
- Registriert: 11. Apr 2018 18:05
- Wohnort: Darmstadt
Re: openhab + influxdb + auth Problem

openHAB4.3.3 stable in einem Debian-Container (bookworm) (Proxmox 8.3.5, LXC), mit openHABian eingerichtet
-
- Beiträge: 1
- Registriert: 24. Mai 2020 16:28
Re: openhab + influxdb + auth Problem
udo1toni hat geschrieben: ↑23. Mär 2020 22:44 Du musst zuerst eine Datenbank anlegen.
$ influx -username admin -password test (statt test bitte das vergebene Passwort benutzen!)
danach sollten die folgenden Befehle problemlos funktionieren:
InfluxDB shell version: 0.13
> CREATE DATABASE openhab_db
> CREATE USER admin WITH PASSWORD 'SuperSecretPassword123+' WITH ALL PRIVILEGES
> CREATE USER openhab WITH PASSWORD 'AnotherSuperbPassword456-'
> CREATE USER grafana WITH PASSWORD 'PleaseLetMeRead789?'
> GRANT ALL ON openhab_db TO openhab
> GRANT READ ON openhab_db TO grafana