Michi friendica (via ActivityPub)

Problem beim Update auf die aktuelle 2022.10

Hallo zusammen

Auf meiner zweiten Instanz habe ich ein Problem beim Update auf die 2022.10 (von der alten Stable aus).
Im Apache-Log finde ich folgende Zeilen:
[Thu Oct 27 14:27:36.243856 2022] [proxy_fcgi:error] [pid 2771074:tid 139919720097536] [client 62.204.xx.xx:60503] AH01071: Got error 'PHP message: PHP Warning: include(www/friendica/vendor/composer/../smarty/smarty/libs/Smarty.class.php): Failed to open stream: No such file or directory in www/friendica/vendor/composer/ClassLoader.php on line 444PHP message: PHP Warning: include(): Failed opening 'www/friendica/vendor/composer/../smarty/smarty/libs/Smarty.class.php' for inclusion (include_path='.::www/friendica/include:www/friendica/library:www/friendica') in www/friendica/vendor/composer/ClassLoader.php on line 444', referer: https://f.freinetz.ch/network

Beim Update bei git und composer lief alles fehlerfrei durch. Jetzt habe ich nur noch einen Whitescreen.
Standardmässig nutzt ich php 7.4, habe das Ganze noch kurz mit 8.0 getestet - ohne erfolg.

Mögliche Ursachen?

Danke für eure Unterstützung im Voraus!

!Friendica Support
Michi friendica (via ActivityPub)
Habe ich gemacht, keine Fehler. Nun wiederholt:
You are using Composer 1 which is deprecated. You should upgrade to Composer 2, see https://blog.packagist.com/deprecating-composer-1-support/
Loading composer repositories with package information
Installing dependencies from lock file
Nothing to install or update
Generating optimized autoload files
18 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
Michi friendica (via ActivityPub)
I run composer with the web-user. The permissions are correct.
Michi friendica (via ActivityPub)
yes I can confirm, that the file exists.
There are other errors to other php-files:
[Thu Oct 27 15:29:37.063420 2022] [proxy_fcgi:error] [pid 2947120:tid 139931403544320] [client 2604xx0:37252] AH01071: Got error 'PHP message: PHP Warning:  require(/home/users/freinetz/www/friendica/vendor/composer/../paragonie/sodium_compat/autoload.php): failed to open stream: No such file or directory in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69PHP message: PHP Fatal error:  require(): Failed opening required '/home/users/freinetz/www/friendica/vendor/composer/../paragonie/sodium_compat/autoload.php' (include_path='.:') in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69'
[Thu Oct 27 15:29:37.248912 2022] [proxy_fcgi:error] [pid 2947120:tid 139930621695744] [client 2a00:xx1:39664] AH01071: Got error 'PHP message: PHP Warning:  require(/home/users/freinetz/www/friendica/vendor/composer/../phpseclib/phpseclib/phpseclib/bootstrap.php): failed to open stream: No such file or directory in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69PHP message: PHP Fatal error:  require(): Failed opening required '/home/users/freinetz/www/friendica/vendor/composer/../phpseclib/phpseclib/phpseclib/bootstrap.php' (include_path='.:') in /home/users/freinetz/www/friendica/vendor/composer/autoload_real.php on line 69'
Michi friendica (via ActivityPub)
I have checked the permission and run a chown -R user:www-data
Michi friendica (via ActivityPub)
yes, thats correct.
@Michi That's a bit odd name for a web-user. Do you have php-fpm or how does your web server (Apache/Nginx?) run PHP scripts?

E.g. for this sub-domain I had to specify it in the pool's configuration file:
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = vuXXXX
group = www-data

(while xxxx is a four-digit number).
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Yes I use php-fpm. Where can I find the pool configuration file?
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Da habe ich nicht viel. Da sind nur Warnungen wie diese:
[27-Oct-2022 18:29:39 UTC] PHP Warning:  Trying to access array offset on value of type bool in /home/users/freinetz/www/friendica/src/Module/Notifications/Ping.php on line 193
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Versuche nun das #Backup einzuspielen. Beim Datenbank Import habe ich nun auch ein Problem:
ERROR 1005 (HY000) at line 1785: Can't create table `freinetz_db1`.`contact` (errno: 121 "Duplicate key on write or update")

Wenn ich im sql-dump den entsprechenden Bereich anschaue:
Zur besseren Übersicht: https://privatebin.freinetz.ch/?1db85aa2e0b9c5da#DuQc4oFSYLbPM5LUq7afcfYgfUyabfoFoibm4KCSqWCe

DROP TABLE IF EXISTS `contact`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'sequential ID',
  `uid` mediumint(8) unsigned NOT NULL DEFAULT 0 COMMENT 'Owner User id',
  `created` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `updated` datetime DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of last contact update',
  `self` tinyint(1) NOT NULL DEFAULT 0 COMMENT '1 if the contact is the user him/her self',
  `remote_self` tinyint(1) NOT NULL DEFAULT 0,
  `rel` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'The kind of the relation between the user and the contact',
  `duplex` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Deprecated',
  `network` char(4) NOT NULL DEFAULT '' COMMENT 'Network of the contact',
  `protocol` char(4) NOT NULL DEFAULT '' COMMENT 'Protocol of the contact',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name that this contact is known by',
  `nick` varchar(255) NOT NULL DEFAULT '' COMMENT 'Nick- and user name of the contact',
  `location` varchar(255) DEFAULT '',
  `about` text DEFAULT NULL,
  `keywords` text DEFAULT NULL COMMENT 'public keywords (interests) of the contact',
  `gender` varchar(32) NOT NULL DEFAULT '' COMMENT 'Deprecated',
  `xmpp` varchar(255) NOT NULL DEFAULT '' COMMENT 'XMPP address',
  `attag` varchar(255) NOT NULL DEFAULT '',
  `avatar` varchar(255) NOT NULL DEFAULT '',
  `photo` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo of the contact',
  `thumb` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo (thumb size)',
  `micro` varchar(255) DEFAULT '' COMMENT 'Link to the profile photo (micro size)',
  `site-pubkey` text DEFAULT NULL COMMENT 'Deprecated',
  `issued-id` varchar(255) NOT NULL DEFAULT '' COMMENT 'Deprecated',
  `dfrn-id` varchar(255) NOT NULL DEFAULT '' COMMENT 'Deprecated',
  `url` varchar(255) NOT NULL DEFAULT '',
  `nurl` varchar(255) NOT NULL DEFAULT '',
  `addr` varchar(255) NOT NULL DEFAULT '',
  `alias` varchar(255) NOT NULL DEFAULT '',
  `pubkey` text DEFAULT NULL COMMENT 'RSA public key 4096 bit',
  `prvkey` text DEFAULT NULL COMMENT 'RSA private key 4096 bit',
  `batch` varchar(255) NOT NULL DEFAULT '',
  `request` varchar(255) DEFAULT NULL,
  `notify` varchar(255) DEFAULT NULL,
  `poll` varchar(255) DEFAULT NULL,
  `confirm` varchar(255) DEFAULT NULL,
  `poco` varchar(255) DEFAULT NULL,
  `aes_allow` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Deprecated',
  `ret-aes` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Deprecated',
  `usehub` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Deprecated',
  `subhub` tinyint(1) NOT NULL DEFAULT 0,
  `hub-verify` varchar(255) NOT NULL DEFAULT '',
  `last-update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last try to update the contact info',
  `success_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last successful contact update',
  `failure_update` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'Date of the last failed update',
  `name-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `uri-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `avatar-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `term-date` datetime NOT NULL DEFAULT '0001-01-01 00:00:00',
  `last-item` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'date of the last post',
  `priority` tinyint(3) unsigned NOT NULL DEFAULT 0 COMMENT 'Feed poll priority',
  `blocked` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Node-wide block status',
  `block_reason` text DEFAULT NULL COMMENT 'Node-wide block reason',
  `readonly` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'posts of the contact are readonly',
  `writable` tinyint(1) NOT NULL DEFAULT 0,
  `forum` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'contact is a forum. Deprecated, use ''contact-type'' = ''community'' and ''manually-approve'' = false in>
  `prv` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'contact is a private group. Deprecated, use ''contact-type'' = ''community'' and ''manually-approve'' = tr>
  `contact-type` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Person, organisation, news, community, relay',
  `hidden` tinyint(1) NOT NULL DEFAULT 0,
  `archive` tinyint(1) NOT NULL DEFAULT 0,
  `pending` tinyint(1) NOT NULL DEFAULT 1 COMMENT 'Contact request is pending',
  `deleted` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Contact has been deleted',
  `rating` tinyint(4) NOT NULL DEFAULT 0 COMMENT 'Automatically detected feed poll frequency',
  `unsearchable` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Contact prefers to not be searchable',
  `sensitive` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Contact posts sensitive content',
  `baseurl` varchar(255) DEFAULT '' COMMENT 'baseurl of the contact',
  `reason` text DEFAULT NULL,
  `closeness` tinyint(3) unsigned NOT NULL DEFAULT 99 COMMENT 'Deprecated',
  `info` mediumtext DEFAULT NULL,
  `profile-id` int(10) unsigned DEFAULT NULL COMMENT 'Deprecated',
  `bdyear` varchar(4) NOT NULL DEFAULT '',
  `bd` date NOT NULL DEFAULT '0001-01-01',
  `notify_new_posts` tinyint(1) NOT NULL DEFAULT 0,
  `fetch_further_information` tinyint(3) unsigned NOT NULL DEFAULT 0,
  `subscribe` varchar(255) DEFAULT NULL,
  `gsid` int(10) unsigned DEFAULT NULL COMMENT 'Global Server ID',
  `ffi_keyword_denylist` text DEFAULT NULL,
  `failed` tinyint(1) DEFAULT NULL COMMENT 'Connection failed',
  `last-discovery` datetime NOT NULL DEFAULT '0001-01-01 00:00:00' COMMENT 'date of the last follower discovery',
  `manually-approve` tinyint(1) DEFAULT NULL COMMENT 'Contact requests have to be approved manually',
  `header` varchar(255) DEFAULT NULL COMMENT 'Header picture',
  `matrix` varchar(255) NOT NULL DEFAULT '' COMMENT 'Matrix address',
  `uri-id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the item-uri table entry that contains the contact url',
  PRIMARY KEY (`id`),
  KEY `uid_name` (`uid`,`name`(190)),
  KEY `self_uid` (`self`,`uid`),
  KEY `pending_uid` (`pending`,`uid`),
  KEY `blocked_uid` (`blocked`,`uid`),
  KEY `uid_rel_network_poll` (`uid`,`rel`,`network`,`poll`(64),`archive`),
  KEY `uid_network_batch` (`uid`,`network`,`batch`(64)),
  KEY `gsid` (`gsid`),
  KEY `attag_uid` (`attag`(96),`uid`),
  KEY `network_uid_lastupdate` (`network`,`uid`,`last-update`),
  KEY `uid_network_self_lastupdate` (`uid`,`network`,`self`,`last-update`),
  KEY `uid_lastitem` (`uid`,`last-item`),
  KEY `alias_uid` (`alias`(128),`uid`),
  KEY `addr_uid` (`addr`(128),`uid`),
  KEY `nurl_uid` (`nurl`(128),`uid`),
  KEY `nick_uid` (`nick`(128),`uid`),
  KEY `batch_contact-type` (`batch`(64),`contact-type`),
  KEY `baseurl` (`baseurl`(64)),
  KEY `uid_contact-type` (`uid`,`contact-type`),
  KEY `uid_self_contact-type` (`uid`,`self`,`contact-type`),
  KEY `self_network_uid` (`self`,`network`,`uid`),
  KEY `uri-id` (`uri-id`),
  CONSTRAINT `contact_ibfk_1` FOREIGN KEY (`gsid`) REFERENCES `gserver` (`id`),
  CONSTRAINT `contact_ibfk_2` FOREIGN KEY (`uid`) REFERENCES `user` (`uid`) ON DELETE CASCADE,
  CONSTRAINT `contact_ibfk_3` FOREIGN KEY (`uri-id`) REFERENCES `item-uri` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=1002645 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='contact table';
/*!40101 SET character_set_client = @saved_cs_client */;


Leider finde ich nicht heraus, was das Problem ist und wie ich es lösen könnte.

#mysql #mariadb
This entry was edited (5 months ago)
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Was bedeutet Duplicate key on write or update in diesem Abschnitt? Was soll hie doppelt vorhanden sein und zu einem Fehler führen?
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Ich kriege das nicht hin. Ich habe nun versucht von dieser Instanz die contact-table zu exportieren und habe sie zu verglichen. Die sieht ganz anders aus - vielleicht durch das Update.

Weiter komme ich selber nun wirklich nicht und bitte um Unterstützung von #datenbank #Profis ;-) Wer kennst sich mit der friendica-db aus?
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Darf ich dich @Michael Vogel fragen? Ich glaube du bist im Bereich der DB ein Fachmann, oder?
Friendica Support reshared this.
Michael Vogel friendica (via ActivityPub)
Das erste zunächst: Sind Deine Composer-Probleme beseitigt?
Friendica Support reshared this.
Michi friendica (via ActivityPub)
@Michael Vogel @Friendica Support
Also ich möchte erstmals zurück zur letzten funktionierenden Version, sprich des Backup einspielen. Die Dateien waren kein Problem, bei der DB klemmt es. Ich denke composer sollte da ja auch keine Probleme mehr machen.
Friendica Support reshared this.
Michi friendica (via ActivityPub)
@Michael Vogel @Friendica Support Als Hinweis, diese Instanz, von welcher ich hier schreibe läuft auf dem gleichen Server.
Friendica Support reshared this.
Michael Vogel friendica (via ActivityPub)
Und Du hast jetzt Probleme beim Einspielen des Backups? Am besten erstellst Du eine neue Datenbank, löscht aber nicht die alte Datenbank (man weiß ja nie). Dann sollte das Einspielen auch klappen.
Friendica Support reshared this.
Michi friendica (via ActivityPub)
@Michael Vogel @Friendica Support
Siehe den Post oben, ich bekomme diese Fehlermeldung: ERROR 1005 (HY000) at line 1785: Can't create table freinetz_db1.contact (errno: 121 "Duplicate key on write or update")

In eine neue DB einspielen habe ich noch nicht versucht. Das probiere ich mal, danke.
Friendica Support reshared this.
Michi friendica (via ActivityPub)
Vielen Dank für deinen Hinweis mit der neuen Datenbank. Ich habe immer versucht, die alte Datenbank mit dem Backup zu überschreiben und das ging nicht. Jetzt hat es funktioniert! Merci!

Ich werde bei Gelegenheit das Update auf die neue Stable nochmals versuchen. Ich hoffe, es funktioniert!
Friendica Support reshared this.
Michael Vogel friendica (via ActivityPub)
Im Zweifel teste es auf einer Datenbankkopie.
Friendica Support reshared this.
@Michi Mine are located here: /etc/php/7.4/fpm/pool.d/
Friendica Support reshared this.
Michi friendica (via ActivityPub)
No problem, thank you for your help. Now I want to restore the backup, but I have a problem with the db import.
Friendica Support reshared this.