Nextcloudpi redis-server und HPB down?

1 Antwort

Vom Fragesteller als hilfreich ausgezeichnet
was kann man da machen?
  1. Den Fehler genau beschreiben. Hat NCP bei Dir schon mal funktioniert? Was hast Du gemacht zwischen dem letzten funktionierenden Status und dem jetzigen nicht mehr funktionierenden Status? Hast Du ein Update von NCP gemacht? Wie?
  2. Den Fehler beheben. Du solltest zunächst in das Protokoll von Redis schauen. Das sollte zu finden sein im Verzeichnis

/var/log/redis

Alternativ schaust Du, welcher Pfad in der Konfigurationsdatei angegeben ist:

grep logfile /etc/redis/redis.conf

Anschließend schaust Du auf das Ende der Logdatei:

tail -f /var/log/redis/datei.log

(datei.log musst Du natürlich durch den korrekten Namen ersetzen.)

Nun startest Du in einem zweiten Terminalfenster den Redis-Server neu:

systemctl restart redis-server

Die jetzt neu geschriebene Zeilen sind die interessanten. Die bitte einmal hierher.

Mensch4 
Fragesteller
 06.06.2022, 19:43

bei mir hat das immer funktioniert, heute habe ich den server neugestartet, vor dem letzten neustart hab ich den logs ordner gelöscht und wiedererstellt weil er sehr groß war, jetzt ist die cloud wegen reid und hpb nicht mehr online, wahrscheinlich haben die ihre logsateien nicht neu erstellt und funktionieren nicht mehr, redis server starten funktioniert nicht, da kommt nur die übliche fehlermeldung See "systemctl status redis-server.service" and "journalctl -xe" for details, ...und das ist

● redis-server.service - Advanced key-value store
     Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2022-06-06 19:40:39 CEST; 2min 9s ago
       Docs: http://redis.io/documentation,
             man:redis-server(1)
    Process: 19399 ExecStart=/usr/bin/redis-server /etc/redis/redis.conf --supervised systemd --daemonize no (code=exited, status=1/FAILURE)
   Main PID: 19399 (code=exited, status=1/FAILURE)
        CPU: 75ms

Jun 06 19:40:39 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Jun 06 19:40:39 nextcloudpi systemd[1]: Stopped Advanced key-value store.
Jun 06 19:40:39 nextcloudpi systemd[1]: redis-server.service: Start request repeated too quickly.
Jun 06 19:40:39 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun 06 19:40:39 nextcloudpi systemd[1]: Failed to start Advanced key-value store.


0
franzhartwig  06.06.2022, 19:48
@Mensch4
bei mir hat das immer funktioniert, heute habe ich den server neugestartet, vor dem letzten neustart hab ich den logs ordner gelöscht und wiedererstellt weil er sehr groß war,

Einfach einen Ordner löschen und neu anlegen ist eine verdammt schlechte Idee. Wenn die Rechte nicht stimmen und demzufolge darin nicht geschrieben werden kann, kommt es zwangsläufig zu Fehlern. Wer am System manipuliert, sollte sich vorher über die Folgen informieren. Einmal bitte

ls -l /var/
ls -l /var/log/

Bei Start von redis-server sollte die Datei neu angelegt werden. Was ist denn die Ausgabe von

grep logfile /etc/redis/redis.conf
1
Mensch4 
Fragesteller
 06.06.2022, 19:51
@franzhartwig
pi@nextcloudpi:~ $ ls -l /var/
insgesamt 1048624
drwxr-xr-x  2 root root        4096  4. Jun 06:25 backups
drwxr-xr-x 17 root root        4096  6. Jun 16:54 cache
drwxr-xr-x  2 root root        4096 26. Mär 22:43 hdd.log
drwxr-xr-x 56 root root        4096  6. Jun 16:54 lib
drwxrwsr-x  2 root staff       4096 11. Dez 18:25 local
lrwxrwxrwx  1 root root           9 28. Jan 03:58 lock -> /run/lock
drwxr-xr-x 11 root root        4096  6. Jun 19:40 log
drwxrwsr-x  2 root mail        4096  6. Jun 19:50 mail
drwxr-xr-x  2 root root        4096 28. Jan 03:58 opt
lrwxrwxrwx  1 root root           4 28. Jan 03:58 run -> /run
drwxr-xr-x  7 root root        4096 26. Mär 22:08 spool
-rw-------  1 root root  1073741824  1. Apr 21:40 swap
drwxrwxrwt  6 root root        4096  6. Jun 19:40 tmp
drwxr-xr-x  7 root root        4096  6. Jun 19:26 www
pi@nextcloudpi:~ $ ls -l /var/log/
insgesamt 6344
-rw-r--r-- 1 root root         416  6. Jun 18:25 alternatives.log
drwxr-xr-x 2 root root        4096  6. Jun 17:12 apache2
drwxr-xr-x 2 root root        4096  6. Jun 17:38 apt
-rw-r----- 1 root adm       266980  6. Jun 19:50 auth.log
-rw------- 1 root root       17248  6. Jun 18:24 boot.log
-rw-rw---- 1 root utmp           0  6. Jun 18:21 btmp
drwxr-x--- 2 root lp          4096  6. Jun 18:22 cups
-rw-r----- 1 root adm      2415174  6. Jun 19:50 daemon.log
drwxr-xr-x 2 root root        4096  6. Jun 16:53 dbconfig-common
-rw-r----- 1 root adm         5988  6. Jun 18:25 debug
-rw-r--r-- 1 root root       20760  6. Jun 17:38 dpkg.log
-rw------- 1 root root       10100  6. Jun 19:26 fail2ban.log
-rw-r----- 1 root adm        86636  6. Jun 18:25 kern.log
-rw-rw-r-- 1 root utmp      296296  6. Jun 18:26 lastlog
drwx------ 2 root root        4096  6. Jun 18:03 letsencrypt
drwx--x--x 2 root root        4096  6. Jun 18:24 lightdm
-rw-r----- 1 root root      756237  6. Jun 00:28 lynis.log
-rw-r----- 1 root root       76808  6. Jun 00:28 lynis-report.dat
-rw-r----- 1 root adm        26263  6. Jun 19:50 mail.info
-rw-r----- 1 root adm        26263  6. Jun 19:50 mail.log
-rw-r----- 1 root adm          242  6. Jun 18:24 mail.warn
-rw-r----- 1 root adm        74766  6. Jun 18:25 messages
-rw-r----- 1 root www-data    3746  6. Jun 19:27 ncp.log
-rw------- 1 root root         466  6. Jun 18:24 php7.4-fpm.log
drwx------ 2 root root        4096  6. Jun 18:21 private
drwxr-xr-x 2 root root        4096  6. Jun 19:40 redis
-rw-r----- 1 root adm      2536949  6. Jun 19:50 syslog
-rw-r--r-- 1 root root           0  6. Jun 18:24 ufw.log
drwxr-xr-x 2 root root        4096  6. Jun 18:22 unattended-upgrades
-rw-r----- 1 root adm         6288  6. Jun 18:25 user.log
-rw-r----- 1 root adm            0  6. Jun 00:00 vsftpd.log
-rw------- 1 root root         488  5. Jun 12:02 vsftpd.log.1
-rw-rw-r-- 1 root utmp       11200  6. Jun 19:32 wtmp
-rw-r--r-- 1 root root       13721  6. Jun 18:25 Xorg.0.log
-rw-r--r-- 1 root root       14061  6. Jun 18:24 Xorg.0.log.old
0
franzhartwig  06.06.2022, 19:55
@Mensch4

Ich sehe das Verzeichnis /var/log/redis

Was liegt da drin?

Die Dateien /var/log/daemon.log und /var/log/syslog scheinen sehr schnell zu wachsen. Da liegt was im Argen. Deshalb mal bitte die Ausgaben von

grep redis /var/log/syslog
1
Mensch4 
Fragesteller
 06.06.2022, 19:59
@franzhartwig

Jun 6 19:57:55 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:57:56 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:57:57 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:57:58 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:57:59 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:00 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:01 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:02 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:03 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:04 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:05 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:06 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:07 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:08 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:09 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:10 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:11 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:12 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:13 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:14 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:15 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:16 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:17 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:18 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:19 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:20 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:21 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:22 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:23 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:24 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:25 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:26 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:27 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:28 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:29 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:30 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:31 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:32 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:33 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:34 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:35 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

Jun 6 19:58:36 nextcloudpi notify_push[1520]: Failed to setup redis subscription: Error while running redis query

0
franzhartwig  06.06.2022, 20:01
@Mensch4
nextcloudpi notify_push

Das kommt meines Wissens von HPB. Die Nichtfunktion von HBP hängt also wohl mit der Nichtfunktion des Redis-Servers zusammen.

Dann mal bitte

grep redis /var/log/syslog | grep -v notify_push
1
Mensch4 
Fragesteller
 06.06.2022, 20:12
@franzhartwig

ich verstehs nicht ganz, was passiert da?

Jun  6 19:38:15 nextcloudpi redis-server[19110]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:38:15 nextcloudpi redis-server[19110]: Reading the configuration file, at line 260
Jun  6 19:38:15 nextcloudpi redis-server[19110]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:38:15 nextcloudpi redis-server[19110]: Can't open the log file: No such file or directory
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 4.
Jun  6 19:38:15 nextcloudpi redis-server[19113]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:38:15 nextcloudpi redis-server[19113]: Reading the configuration file, at line 260
Jun  6 19:38:15 nextcloudpi redis-server[19113]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:38:15 nextcloudpi redis-server[19113]: Can't open the log file: No such file or directory
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Start request repeated too quickly.
Jun  6 19:38:15 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:38 nextcloudpi redis-server[19382]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:40:38 nextcloudpi redis-server[19382]: Reading the configuration file, at line 260
Jun  6 19:40:38 nextcloudpi redis-server[19382]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:38 nextcloudpi redis-server[19382]: Can't open the log file: Permission denied
Jun  6 19:40:38 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:40:38 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:38 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 1.
Jun  6 19:40:39 nextcloudpi redis-server[19390]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:40:39 nextcloudpi redis-server[19390]: Reading the configuration file, at line 260
Jun  6 19:40:39 nextcloudpi redis-server[19390]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:39 nextcloudpi redis-server[19390]: Can't open the log file: Permission denied
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 2.
Jun  6 19:40:39 nextcloudpi redis-server[19393]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:40:39 nextcloudpi redis-server[19393]: Reading the configuration file, at line 260
Jun  6 19:40:39 nextcloudpi redis-server[19393]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:39 nextcloudpi redis-server[19393]: Can't open the log file: Permission denied
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 3.
Jun  6 19:40:39 nextcloudpi redis-server[19396]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:40:39 nextcloudpi redis-server[19396]: Reading the configuration file, at line 260
Jun  6 19:40:39 nextcloudpi redis-server[19396]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:39 nextcloudpi redis-server[19396]: Can't open the log file: Permission denied
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 4.
Jun  6 19:40:39 nextcloudpi redis-server[19399]: *** FATAL CONFIG FILE ERROR (Redis 6.0.16) ***
Jun  6 19:40:39 nextcloudpi redis-server[19399]: Reading the configuration file, at line 260
Jun  6 19:40:39 nextcloudpi redis-server[19399]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:39 nextcloudpi redis-server[19399]: Can't open the log file: Permission denied
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Main process exited, code=exited, status=1/FAILURE

0
Mensch4 
Fragesteller
 06.06.2022, 20:13
@Mensch4
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Failed with result 'exit-code'.
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Scheduled restart job, restart counter is at 5.
Jun  6 19:40:39 nextcloudpi systemd[1]: redis-server.service: Start request repeated too quickly.
0
franzhartwig  06.06.2022, 20:29
@Mensch4
Jun  6 19:40:38 nextcloudpi redis-server[19382]: >>> 'logfile /var/log/redis/redis-server.log'
Jun  6 19:40:38 nextcloudpi redis-server[19382]: Can't open the log file: Permission denied

Und ich sag noch ...

Behebe also das Berechtigungsproblem.

chmod 2750 /var/log/redis
chown redis.adm /var/log/redis
touch /var/log/redis/redis-server.log
chmod 660 /var/log/redis/redis-server.log
chown redis.adm /var/log/redis/redis-server.log
systemctl start redis-server
1
Mensch4 
Fragesteller
 06.06.2022, 20:33
@franzhartwig

oh wow vielen Dank es funktioniert, eben noch maintenance mode deaktiviert, wünsche dir noch einen schönen tag ;)

0
franzhartwig  06.06.2022, 20:39
@Mensch4

Merke: Am System herumpfuschen ohne sich der Folgen bewusst zu sein, ist eine schlechte Idee.

Merke: Logfiles enthalten wertvolle Informationen.

Unterm Strich hätte ich bei direktem Zugriff auf das Gerät keine 5 Minuten für die Lösung benötigt. Die wesentliche Information, dass Du ein Systemverzeichnis gelöscht hast, wäre direkt zu Beginn auch wertvoll gewesen.

0
Mensch4 
Fragesteller
 06.06.2022, 20:44
@franzhartwig

ich hätte nicht gedacht dass das solche verheerende auswirkungen hat, ich dachte alle programme würden einfach neue logfiles erstellen, weil ich nicht wusste woran es liegt war ich schon datei die nextcloud aus einem backup wiederherzustellen, das ist dann ebenfalls gefailt ich hatte keine ahnung warum, jetzt weiß ich die lösung und die funktioniert, aber die daten der nextcloud sind jetzt teilweise corrupted, völlig durcheinander, etc. ich werde mich den restlichen abend hinsetzten und das backup nochmal reinlaufen lassen, danach ist dann wieder alles wie gestern(da hab ich glücklicherweise das backup gemacht)

vielen dank dir, das war ein sehr guter tipp

0
franzhartwig  06.06.2022, 22:36
@Mensch4
ich hätte nicht gedacht dass das solche verheerende auswirkungen hat,

Dann hast Du jetzt eine wichtige Erfahrung gesammelt.

aber die daten der nextcloud sind jetzt teilweise corrupted, völlig durcheinander, etc. ich werde mich den restlichen abend hinsetzten und das backup nochmal reinlaufen lassen,

Du kannst die Dateien neu indizieren. Dann werden die Datenbankeinträge neu aufgebaut:

sudo -u www-data php /var/www/nextcloud/occ files:scan --all
0