Synapse est HS après la migration

What type of hardware are you using: Raspberry Pi 3, 4+
What YunoHost version are you running: 12.0.14
What app is this about: synapse

Describe your issue

English message below

Salut à tous,
J’ai donc lancé la migration de mon serveur vers yunohost 12, qui c’est passé presque sans encombre : tout fonctionne sauf synapse.
Juste après avoir terminé la migration j’ai remarqué que les services synapse et postgresql ne tournaient pas.
J’ai donc tenté de désinstaller synapse pour le restaurer à partir de la dernière sauvegarde qui date de 2 semaines avant la migration, ce qui ne marche pas non plus. Voici donc l’état de la situation :

  • Synapse est installé mais le service n’est pas disponible
  • le service postgresql est disponible et tourne bien.

English message

Hi,

I updated my server to yunohost 12 and everything went almost fine : All apps work except synapse.
When the migration was done I noticed that the synapse and postgresql services were not running.
So I uninstalled synapse and restaured it from the latest back up which is from 2 weeks before the migration, but it didn’t work either. Here is the current situation

  • Synapse is installed but the service is not available
  • The postgresql service is available and is running

Anyone knows how to fix it ? Or should I do a synapse fresh install instead ?

Thanks and take care

Share relevant logs or error messages

Mes logs :

https://paste.yunohost.org/raw/demeqojoya

Hello,

Il semble qu’il y a toujours un problème avec postgresql:

2025-04-28 23:53:15,775: WARNING - psql: erreur : la connexion au serveur sur le socket « /var/run/postgresql/.s.PGSQL.5432 » a échoué : Aucun fichier ou dossier de ce type
2025-04-28 23:53:15,784: WARNING - 	Le serveur est-il actif localement et accepte-t-il les connexions sur ce socket ?

tu peux vérifier si Postgresql fonctionne avec:

sudo --login --user=postgres psql

Merci pour ta réponse, voici ce que retourne la commande :

admin@purplehaze:~ $ sudo --login --user=postgres psql 

Sorry, user admin is not allowed to execute '/bin/bash -c psql' as postgres on purplehaze.noho.st. 

## après cette erreur je l'ai lancé aussi en root 

admin@purplehaze:~ $ su 

root@purplehaze:/home/admin# sudo --login --user=postgres psql 
psql: erreur : la connexion au serveur sur le socket « /var/run/postgresql/.s.PGSQL.5432 » a échoué : Aucun fichier ou dossier de ce type 
        Le serveur est-il actif localement et accepte-t-il les connexions sur ce socket ? 

root@purplehaze:/home/admin# exit 
exit 

Et que retourne pg_lsclusters ?

Voici

admin@purplehaze:~ $ pg_lsclusters 
Ver Cluster Port Status Owner    Data directory              Log file 
# cette ligne est rouge
13  main    5432 down   postgres /var/lib/postgresql/13/main /var/log/postgresql/postgresql-13-main.log
# celle là est verte 
15  main    5433 online postgres /var/lib/postgresql/15/main /var/log/postgresql/postgresql-15-main.log 

Les fichiers log sont vides et voilà le contenu des dossiers :

admin@purplehaze:~ $ sudo ls /var/lib/postgresql/13/main/ 
base          pg_logical    pg_serial     pg_subtrans  pg_wal 
global        pg_multixact  pg_snapshots  pg_tblspc    pg_xact 
pg_commit_ts  pg_notify     pg_stat       pg_twophase  postgresql.auto.conf 
pg_dynshmem   pg_replslot   pg_stat_tmp   PG_VERSION   postmaster.opts 


admin@purplehaze:~ $ sudo ls /var/lib/postgresql/15/main/ 
base          pg_multixact  pg_stat      PG_VERSION            postmaster.pid 
global        pg_notify     pg_stat_tmp  pg_wal 
pg_commit_ts  pg_replslot   pg_subtrans  pg_xact 
pg_dynshmem   pg_serial     pg_tblspc    postgresql.auto.conf 
pg_logical    pg_snapshots  pg_twophase  postmaster.opts 
```

Et que te retourne:

systemctl restart postgresql.service
systemctl status postgresql.service
journalctl -u postgresql.service

systemctl restart postgresql@15-main.service
systemctl status postgresql@15-main.service
journalctl -u postgresql@15-main.service

Les redémarrages de service ne retournent rien.

postgresql.service :

admin@purplehaze:~ $ s systemctl status postgresql.service 
● postgresql.service - PostgreSQL RDBMS 
     Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; preset: enabled) 
     Active: active (exited) since Sat 2025-05-03 00:10:42 CEST; 3s ago 
    Process: 17826 ExecStart=/bin/true (code=exited, status=0/SUCCESS) 
   Main PID: 17826 (code=exited, status=0/SUCCESS) 
        CPU: 3ms 
mai 03 00:10:42 purplehaze.noho.st systemd[1]: Starting postgresql.service - PostgreSQL RDBMS... 
mai 03 00:10:42 purplehaze.noho.st systemd[1]: Finished postgresql.service - PostgreSQL RDBMS. 


admin@purplehaze:~ $ sudo journalctl -u postgresql.service 

### J'ai enlevé les logs qui datent de l'an dernier
-- Boot ab137d2a6bf34b6d8ba1fdfb0132593e -- 
janv. 04 10:17:15 purplehaze.noho.st systemd[1]: Starting PostgreSQL RDBMS... 
janv. 04 10:17:15 purplehaze.noho.st systemd[1]: Finished PostgreSQL RDBMS. 
avril 18 22:56:46 purplehaze.noho.st systemd[1]: postgresql.service: Succeeded. 
avril 18 22:56:46 purplehaze.noho.st systemd[1]: Stopped PostgreSQL RDBMS. 
avril 18 22:56:46 purplehaze.noho.st systemd[1]: Stopping PostgreSQL RDBMS... 
avril 18 22:56:50 purplehaze.noho.st systemd[1]: Starting PostgreSQL RDBMS... 
avril 18 22:56:50 purplehaze.noho.st systemd[1]: Finished PostgreSQL RDBMS. 
avril 18 23:34:03 purplehaze.noho.st systemd[1]: Reloading postgresql.service - PostgreSQL RDBMS... 
avril 18 23:34:03 purplehaze.noho.st systemd[1]: Reloaded postgresql.service - PostgreSQL RDBMS. 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: postgresql.service: Deactivated successfully. 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: Stopped postgresql.service - PostgreSQL RDBMS. 
-- Boot 5f067b93f9b24b73b0cbbc4ef213e935 -- 
avril 18 23:17:51 purplehaze.noho.st systemd[1]: Starting postgresql.service - PostgreSQL RDBMS... 
avril 18 23:17:51 purplehaze.noho.st systemd[1]: Finished postgresql.service - PostgreSQL RDBMS. 
avril 18 23:52:51 purplehaze.noho.st systemd[1]: postgresql.service: Deactivated successfully. 
avril 18 23:52:51 purplehaze.noho.st systemd[1]: Stopped postgresql.service - PostgreSQL RDBMS. 
avril 19 00:23:27 purplehaze.noho.st systemd[1]: Starting postgresql.service - PostgreSQL RDBMS... 
avril 19 00:23:27 purplehaze.noho.st systemd[1]: Finished postgresql.service - PostgreSQL RDBMS. 

mai 03 00:10:39 purplehaze.noho.st systemd[1]: postgresql.service: Deactivated successfully. 
mai 03 00:10:39 purplehaze.noho.st systemd[1]: Stopped postgresql.service - PostgreSQL RDBMS. 
mai 03 00:10:39 purplehaze.noho.st systemd[1]: Stopping postgresql.service - PostgreSQL RDBMS... 
mai 03 00:10:42 purplehaze.noho.st systemd[1]: Starting postgresql.service - PostgreSQL RDBMS... 
mai 03 00:10:42 purplehaze.noho.st systemd[1]: Finished postgresql.service - PostgreSQL RDBMS. 

postgresql@15-main.service :

admin@purplehaze:~ $ s systemctl status postgresql@15-main.service 
● postgresql@15-main.service - PostgreSQL Cluster 15-main 
     Loaded: loaded (/lib/systemd/system/postgresql@.service; enabled-runtime; preset: enabled) 
     Active: active (running) since Sat 2025-05-03 00:14:19 CEST; 6s ago 
    Process: 17874 ExecStart=/usr/bin/pg_ctlcluster --skip-systemctl-redirect 15-main start (code=exited, status=0/SUCCESS) 
   Main PID: 17880 (postgres) 
      Tasks: 6 (limit: 1599) 
        CPU: 451ms 
     CGroup: /system.slice/system-postgresql.slice/postgresql@15-main.service 
             ├─17880 /usr/lib/postgresql/15/bin/postgres -D /var/lib/postgresql/15/main -c config_file=/etc/postgresql/15/main/postgresql.conf 
             ├─17881 "postgres: 15/main: checkpointer " 
             ├─17882 "postgres: 15/main: background writer " 
             ├─17884 "postgres: 15/main: walwriter " 
             ├─17885 "postgres: 15/main: autovacuum launcher " 
             └─17886 "postgres: 15/main: logical replication launcher " 
mai 03 00:14:17 purplehaze.noho.st systemd[1]: Starting postgresql@15-main.service - PostgreSQL Cluster 15-main... 
mai 03 00:14:19 purplehaze.noho.st systemd[1]: Started postgresql@15-main.service - PostgreSQL Cluster 15-main. 


admin@purplehaze:~ $ s journalctl -u postgresql@15-main.service 
avril 18 23:30:04 purplehaze.noho.st systemd[1]: Starting postgresql@15-main.service - PostgreSQL Cluster 15-main... 
avril 18 23:30:07 purplehaze.noho.st systemd[1]: Started postgresql@15-main.service - PostgreSQL Cluster 15-main. 
avril 18 23:34:03 purplehaze.noho.st systemd[1]: Reloading postgresql@15-main.service - PostgreSQL Cluster 15-main... 
avril 18 23:34:03 purplehaze.noho.st systemd[1]: Reloaded postgresql@15-main.service - PostgreSQL Cluster 15-main. 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: Stopping postgresql@15-main.service - PostgreSQL Cluster 15-main... 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: postgresql@15-main.service: Deactivated successfully. 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: Stopped postgresql@15-main.service - PostgreSQL Cluster 15-main. 
avril 18 23:34:25 purplehaze.noho.st systemd[1]: postgresql@15-main.service: Consumed 1.163s CPU time. 
-- Boot 5f067b93f9b24b73b0cbbc4ef213e935 -- 
avril 19 00:29:29 purplehaze.noho.st systemd[1]: Starting postgresql@15-main.service - PostgreSQL Cluster 15-main... 
avril 19 00:29:32 purplehaze.noho.st systemd[1]: Started postgresql@15-main.service - PostgreSQL Cluster 15-main. 
mai 03 00:14:16 purplehaze.noho.st systemd[1]: Stopping postgresql@15-main.service - PostgreSQL Cluster 15-main... 
mai 03 00:14:17 purplehaze.noho.st systemd[1]: postgresql@15-main.service: Deactivated successfully. 
mai 03 00:14:17 purplehaze.noho.st systemd[1]: Stopped postgresql@15-main.service - PostgreSQL Cluster 15-main. 
mai 03 00:14:17 purplehaze.noho.st systemd[1]: Starting postgresql@15-main.service - PostgreSQL Cluster 15-main... 
mai 03 00:14:19 purplehaze.noho.st systemd[1]: Started postgresql@15-main.service - PostgreSQL Cluster 15-main. 

Et que dis ls /var/run/postgresql ?

voici :

admin@purplehaze:~ $ sudo ls -R /var/run/postgresql/ 
/var/run/postgresql/: 
13-main.pg_stat_tmp  15-main.pid 
/var/run/postgresql/13-main.pg_stat_tmp: