!Friendica Support
Hallo Profis, ich habe ein Problem mit meiner Instanz. In den Logs taucht folgender DB-Fehler auf:
Index for table 'post-user' is corrupt; try to repair it

Ein CHECK TABLE `post-user`; in der MariaDB Konsole zeigt folgendes:

MariaDB [friendica]> CHECK TABLE `post-user`;
+---------------------+-------+----------+-----------------------------------------------------------+
| Table               | Op    | Msg_type | Msg_text                                                  |
+---------------------+-------+----------+-----------------------------------------------------------+
| friendica.post-user | check | Warning  | InnoDB: The B-tree of index PRIMARY is corrupted.         |
| friendica.post-user | check | Warning  | InnoDB: Index uid_uri-id is marked as corrupted           |
| friendica.post-user | check | Warning  | InnoDB: Index uri-id is marked as corrupted               |
| friendica.post-user | check | Warning  | InnoDB: Index parent-uri-id is marked as corrupted        |
| friendica.post-user | check | Warning  | InnoDB: Index thr-parent-id is marked as corrupted        |
| friendica.post-user | check | Warning  | InnoDB: Index external-id is marked as corrupted          |
| friendica.post-user | check | Warning  | InnoDB: Index owner-id is marked as corrupted             |
| friendica.post-user | check | Warning  | InnoDB: Index author-id is marked as corrupted            |
| friendica.post-user | check | Warning  | InnoDB: Index causer-id is marked as corrupted            |
| friendica.post-user | check | Warning  | InnoDB: Index vid is marked as corrupted                  |
| friendica.post-user | check | Warning  | InnoDB: Index contact-id is marked as corrupted           |
| friendica.post-user | check | Warning  | InnoDB: Index event-id is marked as corrupted             |
| friendica.post-user | check | Warning  | InnoDB: Index psid is marked as corrupted                 |
| friendica.post-user | check | Warning  | InnoDB: Index author-id_uid is marked as corrupted        |
| friendica.post-user | check | Warning  | InnoDB: Index parent-uri-id_uid is marked as corrupted    |
| friendica.post-user | check | Warning  | InnoDB: Index uid_contactid is marked as corrupted        |
| friendica.post-user | check | Warning  | InnoDB: Index uid_unseen_contactid is marked as corrupted |
| friendica.post-user | check | Warning  | InnoDB: Index uid_unseen is marked as corrupted           |
| friendica.post-user | check | Warning  | InnoDB: Index uid_hidden_uri-id is marked as corrupted    |
| friendica.post-user | check | Warning  | InnoDB: Index uid_wall_received is marked as corrupted    |
| friendica.post-user | check | Warning  | InnoDB: Index author-id_created is marked as corrupted    |
| friendica.post-user | check | Warning  | InnoDB: Index owner-id_created is marked as corrupted     |
| friendica.post-user | check | Warning  | InnoDB: Index replies-id is marked as corrupted           |
| friendica.post-user | check | error    | Corrupt                                                   |
+---------------------+-------+----------+-----------------------------------------------------------+
24 rows in set (57,683 sec)

Wenn ich REPAIR TABLE `post-user`; kommt folgende Ausgabe:

MariaDB [friendica]> REPAIR TABLE `post-user`;
+---------------------+--------+----------+---------------------------------------------------------+
| Table               | Op     | Msg_type | Msg_text                                                |
+---------------------+--------+----------+---------------------------------------------------------+
| friendica.post-user | repair | note     | The storage engine for the table doesn't support repair |
+---------------------+--------+----------+---------------------------------------------------------+
1 row in set (1 min 53,258 sec)

Ich habe keinen Plan mehr. Könnt ihr mich bitte Unterstützen?

Als Antwort auf Tuxi (Backup)

Also folgender Stand:
Ich konnte gestern einen Dump der DB ziehen. Danach konnte ich seltsamerweise euch ein mysqloptimize erfolgreich und ohne Fehlermeldung ausführen. Ob das am innodb_force_recovery 4 liegt oder an was anderem, kann ich, ehrlich gesagt nicht sagen.

Die Instanz lief danach auch für eine Zeit ohne Probleme. Allerdings sind dann nach so ca. 30 Minuten wieder die gleichen Fehlermeldungen im Friendica-Log aufgetaucht.

Aktuell läuft ein Testimport der gestern exportierten Datenbank. Wenn diese erfolgreich ist, dann hätte ich zumindest Daten auf einem Stand von gestern.

Allerdings frage ich mich, ob der mysqldump korrupt ist, oder nicht?

@Michael 🇺🇦
Frage: Wenn ich den Import erfolgreich in eine andere DB durchführen konnte, kann ich dann in der local.config.php den Namen der DB einfach ändern und es ist alles lauffähig? Oder ist der Name der DB auch noch irgendwo anderes hinterlegt?

Als Antwort auf Tuxi (Backup)

2025-03-21T18:18:54Z app [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `id`, `uid`, `pid` FROM `acc

Hallo Profis,

habe eine neue Datenbank erstellt, dort die Sicherung eingespielt, die ich Ende Januar für den Serverumzug auch verwendet habe. In der "local.config.php habe ich den Namen der Datenbank auf die neue geändert.

Trotzdem funktioniert die Instanz nicht und ich habe massenhaft DB Errors im friendical.og. Wieso funktioniert die Sicherung die vor ein paar Wochen für den umzug noch funktioniert hat aufeinmal nicht mehr. Das passt doch irgendwie nicht zusammen.

Auszug aus dem friendica.log:

Als Antwort auf Tuxi (Backup)

Hallo Profis,

habe eine neue Datenbank erstellt, dort die Sicherung eingespielt, die ich Ende Januar für den Serverumzug auch verwendet habe. In der "local.config.php habe ich den Namen der Datenbank auf die neue geändert.

Trotzdem funktioniert die Instanz nicht und ich habe massenhaft DB Errors im friendical.og. Wieso funktioniert die Sicherung die vor ein paar Wochen für den umzug noch funktioniert hat aufeinmal nicht mehr. Das passt doch irgendwie nicht zusammen.

Auszug aus dem friendica.log:

2025-03-21T18:18:54Z app [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `id`, `uid`, `pid` FROM `account-user-view` WHERE (`id` = 2467202) LIMIT 1"} - {"file":"Database.php","line":675,"function":"p","request-id":"67ddad8e2bdd7","stack":"Database::p (1494), Database::select (1379), Database::selectFirst (420), DBA::selectFirst (651), Contact::getPublicAndUserContactID (178), User::isBlocked (299), Contact::getVisitorByUrl (149), UserSession::setVisitorsContacts (318), Authentication::setForUser (182), Authentication::withSession (586), App::runFrontend (32)","uid":"2bc66a","process_id":4838}
2025-03-21T18:18:54Z app [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `id`, `uid`, `pid` FROM `account-user-view` WHERE (`id` = 2468202) LIMIT 1"} - {"file":"Database.php","line":675,"function":"p","request-id":"67ddad8e2bdd7","stack":"Database::p (1494), Database::select (1379), Database::selectFirst (420), DBA::selectFirst (651), Contact::getPublicAndUserContactID (178), User::isBlocked (299), Contact::getVisitorByUrl (149), UserSession::setVisitorsContacts (318), Authentication::setForUser (182), Authentication::withSession (586), App::runFrontend (32)","uid":"2bc66a","process_id":4838}
2025-03-21T18:18:54Z worker [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `platform`, `contact-type` FROM `account-user-view` WHERE (`uri-id` = 34862127) LIMIT 1"} - {"file":"Database.php","line":675,"function":"p","request-id":"67ddad8d549a0","stack":"Database::p (1494), Database::select (1379), Database::selectFirst (420), DBA::selectFirst (2038), Contact::getDefaultAvatar (2357), Contact::updateAvatar (2924), Contact::updateFromProbeArray (2704), Contact::updateFromProbe (32), UpdateContact::execute, Worker::execFunction (374), Worker::execute (109), Worker::processQueue (75)","uid":"c10296","process_id":4897}
2025-03-21T18:18:54Z worker [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `platform`, `contact-type` FROM `account-user-view` WHERE (`uri-id` = 34862127) LIMIT 1"} - {"file":"Database.php","line":675,"function":"p","request-id":"67ddad8d6343c","stack":"Database::p (1494), Database::select (1379), Database::selectFirst (420), DBA::selectFirst (2038), Contact::getDefaultAvatar (2357), Contact::updateAvatar (2924), Contact::updateFromProbeArray (2704), Contact::updateFromProbe (2639), Contact::updateByIdIfNeeded (2654), Contact::updateByUrlIfNeeded (1763), Processor::processActivity (1691), Processor::fetchMissingActivity (34), FetchMissingActivity::execute, Worker::execFunction (374), Worker::execute (109)","uid":"00abbf","process_id":4900}
2025-03-21T18:18:54Z app [ERROR]: DB Error {"code":1356,"error":"View 'friendicadb.account-user-view' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them","params":"SELECT `id`, `uid`, `pid` FROM `account-user-view` WHERE (`id` = 4317477) LIMIT 1"} - {"file":"Database.php","line":675,"function":"p","request-id":"67ddad8e2bdd7","stack":"Database::p (1494), Database::select (1379), Database::selectFirst (420), DBA::selectFirst (651), Contact::getPublicAndUserContactID (178), User::isBlocked (299), Contact::getVisitorByUrl (149), UserSession::setVisitorsContacts (318), Authentication::setForUser (182), Authentication::withSession (586), App::runFrontend (32)","uid":"2bc66a","process_id":4838}

Seltsamerweise sagt mir ein "mysqlcheck -u root -p --check --databases friendicadb" das alles in Ordnung wäre:

mysqlcheck -u root -p --check --databases friendicadb
Enter password: 
friendicadb.2fa_app_specific_password              OK
friendicadb.2fa_recovery_codes                     OK
friendicadb.2fa_trusted_browser                    OK
friendicadb.account-suggestion                     OK
friendicadb.account-user                           OK
friendicadb.addon                                  OK
friendicadb.advancedcontentfilter_rules            OK
friendicadb.apcontact                              OK
friendicadb.application                            OK
friendicadb.application-marker                     OK
friendicadb.application-token                      OK
friendicadb.arrived-activity
note     : The storage engine for the table doesn't support check
friendicadb.attach                                 OK
friendicadb.auth_codes                             OK
friendicadb.cache                                  OK
friendicadb.challenge                              OK
friendicadb.channel                                OK
friendicadb.check-full-text-search                 OK
friendicadb.clients                                OK
friendicadb.config                                 OK
friendicadb.contact                                OK
friendicadb.contact-relation                       OK
friendicadb.conv                                   OK
friendicadb.conversation                           OK
friendicadb.delayed-post                           OK
friendicadb.delivery-queue                         OK
friendicadb.diaspora-contact                       OK
friendicadb.diaspora-interaction                   OK
friendicadb.endpoint                               OK
friendicadb.event                                  OK
friendicadb.fcontact                               OK
friendicadb.fetch-entry                            OK
friendicadb.fetched-activity
note     : The storage engine for the table doesn't support check
friendicadb.fsuggest                               OK
friendicadb.group                                  OK
friendicadb.group_member                           OK
friendicadb.gserver                                OK
friendicadb.gserver-tag                            OK
friendicadb.hook                                   OK
friendicadb.host                                   OK
friendicadb.inbox-entry                            OK
friendicadb.inbox-entry-receiver                   OK
friendicadb.inbox-status                           OK
friendicadb.intro                                  OK
friendicadb.item-uri                               OK
friendicadb.key-value                              OK
friendicadb.locks                                  OK
friendicadb.mail                                   OK
friendicadb.mailacct                               OK
friendicadb.manage                                 OK
friendicadb.notification                           OK
friendicadb.notify                                 OK
friendicadb.notify-threads                         OK
friendicadb.oembed                                 OK
friendicadb.openwebauth-token                      OK
friendicadb.parsed_url                             OK
friendicadb.pconfig                                OK
friendicadb.permissionset                          OK
friendicadb.photo                                  OK
friendicadb.post                                   OK
friendicadb.post-activity                          OK
friendicadb.post-category                          OK
friendicadb.post-collection                        OK
friendicadb.post-content                           OK
friendicadb.post-counts                            OK
friendicadb.post-delivery                          OK
friendicadb.post-delivery-data                     OK
friendicadb.post-engagement                        OK
friendicadb.post-history                           OK
friendicadb.post-link                              OK
friendicadb.post-media                             OK
friendicadb.post-origin                            OK
friendicadb.post-question                          OK
friendicadb.post-question-option                   OK
friendicadb.post-searchindex                       OK
friendicadb.post-tag                               OK
friendicadb.post-thread                            OK
friendicadb.post-thread-user                       OK
friendicadb.post-user                              OK
friendicadb.post-user-notification                 OK
friendicadb.process                                OK
friendicadb.processed-activity
note     : The storage engine for the table doesn't support check
friendicadb.profile                                OK
friendicadb.profile_check                          OK
friendicadb.profile_field                          OK
friendicadb.push_subscriber                        OK
friendicadb.register                               OK
friendicadb.report                                 OK
friendicadb.report-post                            OK
friendicadb.report-rule                            OK
friendicadb.search                                 OK
friendicadb.session                                OK
friendicadb.storage                                OK
friendicadb.subscription                           OK
friendicadb.tag                                    OK
friendicadb.tokens                                 OK
friendicadb.user                                   OK
friendicadb.user-contact                           OK
friendicadb.user-gserver                           OK
friendicadb.userd                                  OK
friendicadb.verb                                   OK
friendicadb.worker-ipc
note     : The storage engine for the table doesn't support check
friendicadb.workerqueue                            OK