Update 25 auf 26 mit Fehlern

Hallo,

ich habe vorhin meine Nextcloud von Version 25 auf 26 geupdatet bekomme aber jetzt unter Sicherheit folgendes angezeigt :

Es gibt einige Warnungen zu Ihrer Systemkonfiguration.

In der Datenbank fehlen einige Indizes. Auf Grund der Tatsache, dass das Hinzufügen von Indizes in großen Tabellen einige Zeit in Anspruch nehmen kann, wurden diese nicht automatisch erzeugt. Durch das Ausführen von "occ db:add-missing-indices" können die fehlenden Indizes manuell hinzugefügt werden, während die Instanz weiter läuft. Nachdem die Indizes hinzugefügt wurden, sind Anfragen auf die Tabellen normalerweise schneller.
    Fehlender Index "fs_parent" in der Tabelle "oc_filecache".

Wie kann ich das beheben ?

Mark-Peter

occ db:add-missing-indices

Ausführen

Klappt nicht, da bekomme ich die Meldung:

Command ‘occ’ not found, but there are 22 similar ones.

An dieser Stelle wäre es nun tatsächlich gut zu wissen, welches System Du hast, denn so kann Dir hier nicht weiter geholfen werden.

Liebe Nutzer des deutschen Subforums.

Es passiert leider häufig genug, dass ganz wesentliche Infos bei vielen Threads fehlen. Dabei weiß niemand außer Euch selbst, wie ihr eure Maschine(n) konfiguriert habt. Doch Informationen sind wesentlich für eventuelle Helfer.

Bitte beachtet beim Posten deshalb folgende kleine Hinweise - die erleichtern allen die Fehlersuche. Und sparen allen Zeit. Und auch Nerven :wink:

  • Bei welchen Anbieter? Was für ein Server? v-server, shared, root, usw. Oder Lokal?
  • Auf welcher Hardware? PC, Raspberry PI, Banana, NAS usw…
  • Betriebssystem sowie Version ALLER beteiligten Systeme
  • Nextcloud Version: <bitte ausfüllen>
  • PHP Version: <bitte ausfüllen>
  • Welche Datenbank? MySql,Engine X (Nginx),MariaDB usw…
  • Apache version, usw.
  • Läuft NC in Docker,Snap oder VM
  • Netzwerk Aufgliederung: zb. Router>Switch>PI>
  • Wurden vor kurzen Server Updates gemacht? Wenn ja von was?
  • Habt ihr die Logs angesehen von Nextcloud und von System?
  • Bei was für einer Aktion ist der Fehler aufgetreten?

Das ist ein umfangreicher Fragenkatalog. Nicht immer ist es sinnvoll ALLES zu beantworten. Generell aber sollte gelten, lieber mehr Infos als wenig Infos.

Bei vielem hilft euch die App issue template aus dem App-Store.

Hallo,

OK, dann lege ich mal los.

Raspberry PI3b+
Raspberry OS (Debian 11)
Nextcloud 26.0.1
PHP Version 8.1.2
mysql Ver 15.1 Distrib 10.6.12-MariaDB
Apache/2.4.52

Das ganze läuft auf einem kleinen Server bei mir zuhause.

Dann solltest Du per SSH-Zugang auf den Raspi gehen und den folgenden Befehl mit angepasstem Pfad ausführen.

sudo -u http php81 /pfad-zur-nextcloud/nextcloud/occ db:add-missing-indices

Mhhhhh, wie ist denn der standard Pfad zur Nextcloud ? Ich glaube ich habe den nicht geändert. Oder kann man den über Putty raus bekommen ?

Das kannst nur Du wissen, welchen Pfad Du damals verwendet hast.
Eine mögliche Variante wäre

/var/www/html/nextcloud

Falls Du es nicht mehr genau weißt, dann musst Du halt danach suchen.

cd /
find -name occ
/var/www/html/nextcloud/occ

OK, ist der original Pfad. Wenn ich den Befehl jedoch dann ausführe bekomme ich gemeldet:

sudo: unknown user http
sudo: error initializing audit plugin sudoers_audit

Eventuell musst Du vorher noch Root-Rechte haben.

user@raspi:~ # sudo -i
root@raspi:~ # cd /
root@raspi:/ # find -name occ
/var/www/html/nextcloud/occ
root@raspi:/ # sudo -u http php81 /var/www/html/nextcloud/occ db:add-missing-indices
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Check indices of the oc_mounts table.
Done.
root@raspi:/ # 

Die Nextcloud sollte doch mit dem Benutzer “http” laufen, oder?

Edit:
Versuch einmal an Stelle von “http” den Benutzer “www-data”

Seit wann ist HTTP ein Benutzer ?

Leider kommt der Fehler weiterhin :frowning:

sudo: unknown user http
sudo: error initializing audit plugin sudoers_audit

Oder was ist mit Benutzer HTTP gemeint ?

Habe es mit einer anderen Installation verwechselt, da ist der Nextcloud-Benutzer “http”.
Versuch einmal an Stelle von “http” den Benutzer “www-data”, siehe oben.

sudo -u www-data php81 /var/www/html/nextcloud/occ db:add-missing-indices

OK, nun kommt : sudo: php81: command not found

Wenn Du Dich mit Putty auf Deinem Raspi anmeldest und dann die folgenden Befehle eingibst.

cd /
cd /var/www/html/nextcloud
ls -al

Was steht dann dort zum Beispiel?

drwxrwxr-x 4 www-data www-data 4096 18. Apr 11:03 .


In HTML ist garnichts drin.
In var/www/nextcloud aber.

Okay, also ganz anders als ähnliche Installationen.
Deine Nextcloud liegt also im Ordner “/var/www/nextcloud”. Jetzt wäre nur noch der Benutzer interessant und der wäre ganz rechts im Bild gewesen.

2023-05-15 13_38_57-html - raspberrypi root - WinSCP

Bei einer Nextcloud-Installation sollte es www-data:www-data sein, es geht aber auch anders.

Wenn php als Umgebungsvariable definiert ist dann funktioniert das so:

cd /var/www/nextcloud
sudo -u www-data php occ db:add-missing-indices

Genau das sollte jetzt bei @MarkPeter zum Ziel führen, falls die Nextcloud mit diesem Benutzer installiert wurde.

Hallo FreeFun,

vielen Dank, damit hat es nun ohne Fehlermeldung geklappt.

Check indices of the share table.
Check indices of the filecache table.
Adding additional parent index to the filecache table, this can take some time…
Filecache table updated successfully.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Check indices of the oc_preferences table.
Check indices of the oc_mounts table.

Hättest Du die Antwort auf den Befehl

find -name occ

hier gleich gepostet, dann wäre ich nicht mit dem Pfad in die Irre geführt worden und die Lösung hättest Du schon eine Stunde früher gehabt. :wink: