[SOLVED] Influx funktioniert nach Neustart/Backup nicht mehr

wusa

New Member
Jan 17, 2022
19
1
3
36
Hallo Zusammen,

kurz zu mir, ich bin in der Proxmox Gegend total neu. Kannte Proxmox vorher noch nicht aber finde ich absolut interessant.
Daher habe ich gleich mal einen Fall für mich versucht umzusetzen.
Ich erkläre hier einfach kurz, wie und was ich installiert habe, weiter unten dann schildere ich noch den Fehler.

1642491225692.png

1642491242618.png
1642491272650.png
1642491289352.png
1642491314513.png

Nachdem der LXC gestartet ist, mache ich ein apt update && apt upgrade
Das ganze läuft auch erfolgreich durch.

Dann nutze ich die offizielle Influxdb Doku zum installieren. -> Influx Doku

wget -qO- https://repos.influxdata.com/influxdb.key | gpg --dearmor > /etc/apt/trusted.gpg.d/influxdb.gpg
Fehler der hier auftritt ist:
Code:
Command 'gpg' not found, but can be installed with:
apt install gpg
Das ganze wird dann installiert und läuft auch ohne Fehler durch: apt install gpg
Dann werden die nächsten 2 Schritte erfolgreich ausgeführt.
export DISTRIB_ID=$(lsb_release -si); export DISTRIB_CODENAME=$(lsb_release -sc) echo "deb [signed-by=/etc/apt/trusted.gpg.d/influxdb.gpg] https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" > /etc/apt/sources.list.d/influxdb.list

Jetzt kommt wieder ein apt update && apt install influxdb
Läuft ohne Fehler durch.

Als nächstes systemctl unmask influxdb.service und systemctl start influxdb
Kontrolliert wurde das ganze mit
systemctl start influxdb
Ausgabe:
Code:
root@pct-influxdb:~# systemctl status influxdb
* influxdb.service - InfluxDB is an open-source, distributed, time series database
     Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-01-18 07:43:51 UTC; 2min 12s ago
       Docs: man:influxd(1)
   Main PID: 3837 (influxd)
      Tasks: 7 (limit: 9243)
     Memory: 7.5M
        CPU: 176ms
     CGroup: /system.slice/influxdb.service
             `-3837 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Somit ist bei der Installation alles in Ordnung.
Als nächstes installiere ich noch apt install influxdb-client
Dies läuft auch ohne Fehler durch und ich kann influx starten: influx

Jetzt spiele ich eine vorhandene Datenbank zurück, damit ich Daten zum testen in Influx habe. Das ganze mache ich mit influxd restore -portable -db iobroker /var/lib/influxdb
Nachdem Kontrolliere ich kurz ob in Grafana Daten ankommen.

1642494834664.png
1642494849724.png

1642494941742.png

Auch hier keine Probleme zu sehen.


Jetzt kommt der eigentliche Fehler:

Ich habe den LXC neu gestartet. reboot
Gebe ich jetzt influx ein, erscheint folgender Fehler:
Code:
root@pct-influxdb:~# influx
Failed to connect to http://localhost:8086: Get "http://localhost:8086/ping": dial tcp [::1]:8086: connect: connection refused
Please check your connection settings and ensure 'influxd' is running.

Heißt nach eine Neustart funktioniert Influx nicht mehr.
Das ganze ist mir auch von einem Backup aus zurück schon passiert.
Hier noch die Ausgabe von netstat -lpnt
Code:
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      90/systemd-resolved
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      292/master        
tcp6       0      0 :::22                   :::*                    LISTEN      1/init            
tcp6       0      0 ::1:25                  :::*                    LISTEN      292/master

Ich nutzte Proxmox noch nicht produktiv, aber teste momentan einfach die Möglichkeiten.

Kurz Anmerkung, momentan läuft Influx auf einem anderen Rechner im Docker. Hier habe ich das Problem nicht. Ich kann Docker oder auch den ganzen Rechner neu starten, ohne Probleme. Das Problem ist jetzt bei Proxmox oder LXC das erstmal bei mir aufgetreten.

Gibt es zu diesem Fehler eine Hilfe?

Danke
 
Last edited:
was sagt den ein systemctl status influxd nach dem Reboot,
vielleicht musst du einfach nur den Dienst aktivieren damit er automatisch startet
also systemctl enable influxd


Bei mir sieht das so aus, ich nutze influx (ohne Docker usw) für Grafana mit einem Debian lxc

* influxdb.service - InfluxDB is an open-source, distributed, time series database Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-01-17 11:02:43 UTC; 23h ago Docs: https://docs.influxdata.com/influxdb/ Process: 147 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=0/SUCCESS) Main PID: 155 (influxd) Tasks: 9 (limit: 154328) Memory: 330.8M CPU: 9min 14.163s CGroup: /system.slice/influxdb.service `-155 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
 
Last edited:
systemctl status influxd
Bringt folgende Aussgabe:
Code:
root@pct-influxdb:~# systemctl status influxd
x influxdb.service - InfluxDB is an open-source, distributed, time series database
     Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2022-01-18 08:51:00 UTC; 1h 26min ago
       Docs: man:influxd(1)
    Process: 141 ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS (code=exited, status=1/FAILURE)
   Main PID: 141 (code=exited, status=1/FAILURE)
        CPU: 13ms

Jan 18 08:51:00 pct-influxdb systemd[1]: influxdb.service: Main process exited, code=exited, status=1/FAILURE
Jan 18 08:51:00 pct-influxdb systemd[1]: influxdb.service: Failed with result 'exit-code'.
Jan 18 08:51:00 pct-influxdb systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 5.
Jan 18 08:51:00 pct-influxdb systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Jan 18 08:51:00 pct-influxdb systemd[1]: influxdb.service: Start request repeated too quickly.
Jan 18 08:51:00 pct-influxdb systemd[1]: influxdb.service: Failed with result 'exit-code'.
Jan 18 08:51:00 pct-influxdb systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.

systemctl enable influxd
Bringt diese Ausgabe:
Code:
Failed to enable unit: Refusing to operate on alias name or linked unit file: influxd.service

Auch ein systemctl start influxd
Funktioniert leider nicht. Selber Fehler wie oben
 
256 RAM reichen wohl nicht?
 
ja also meiner nutzt aktuell ca 400 MB von 2 GB und hat noch Grafana mit installiert
256 MB sind etwas wenig aber da es ja nach der Installation startet sollte es eher an den Rechten liegen
 
cat /etc/systemd/system/influxd.service
Code:
[Unit]
Description=InfluxDB is an open-source, distributed, time series database
After=network.target
Documentation=man:influxd(1)

[Service]
User=root
Group=root
LimitNOFILE=65536
EnvironmentFile=-/etc/default/influxdb
ExecStart=/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS
KillMode=control-group
Restart=on-failure

[Install]
WantedBy=multi-user.target
Alias=influxd.service

Ich habe User und Group auf rootgesetzt. Aber was das jetzt genau für Auswirkungen hat, verstehe ich leider nicht.
Es läuft aber momentan nach einen Reboot.


Bezüglich der 256 MB RAM. Ich bin mit 512 MB gestartet und habe gesehen, dass nicht so viel benötigt wird.
Daher habe ich ein wenig reduziert. Momentan nicht ganz 60MB
1642502576365.png
 
bei mir läuft es mit dem User influxdb
das Problem ist wohl bei dir das der Ordner "/var/lib/influxdb" nicht dem user influxdb gehört
wenn du das systemd script wieder auf den user influixdb stellst und die Rechte am Ordner änderst sollte es auch ohne root gehen

also "chown -c -R influxdb:influxdb /var/lib/influxdb"

das ist auf jeden Fall sicherer dann anstatt es als root laufen zu lassen
 
  • Like
Reactions: wusa
Das Teste ich gleich mal. Danke vorerst für die Hilfe
 
Last edited:
Hab die Recht jetzt geändert und sehe momentan keine Probleme.
Kann Influx starten und auch nach einem Reboot funktioniert das ganze noch.

Viele Dank für die ganze Hilfe!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!