Problème de démarrage de postgresql

Bonjour @ tous,

Matériel: Brique Internet avec VPN

L’architecture du serveur est bare-metal armhf

Le modèle de carte du serveur est Olimex A20-OLinuXino-LIME

Le serveur utilise le noyau Linux 4.19.62-sunxi
Le serveur utilise Debian 10.6
Le serveur utilise YunoHost 4.0.8.2 (stable)

yunohost version : 4.0.8.2 (stable)
yunohost-admin version : 4.0.4 (stable)
moulinette version : 4.0.3 (stable)
ssowat version : 4.0.5 (stable)

J’ai accès à mon serveur : En SSH | Par la webadmin

Êtes-vous dans un contexte particulier ou avez-vous effectué des modifications particulières sur votre instance ? : non

Description du problème :

postgresql ne démarre plus que se soit par la web admin ou en ssh avec la web admin dans service la réponse est “Le service « postgresql » a été démarré” et pourtant quand je regarde le journalctl il est écrit que le service c’est terminé avec une erreur ci-joint le lien yunopaste:https://paste.yunohost.org/ahumopulig qui permettra peut être de mieux comprendre ce qui ce passe.

Avec diagnostic j’ai le retour suivant:

Le service postgresql est failed :frowning:

Le redémarrage ne donne rien et yunohost service log postgresql me retourne ceci:

/var/log/postgresql/postgresql-11-main.log:
journalctl:

  • – Logs begin at Wed 2020-11-25 09:39:01 UTC, end at Wed 2020-11-25 12:46:02 UTC. –
  • Nov 25 12:32:39 systemd[1]: Starting PostgreSQL Cluster 11-main…
  • – Subject: A start job for unit postgresql@11-main.service has begun execution
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – A start job for unit postgresql@11-main.service has begun execution.

  • – The job identifier is 33978.
  • Nov 25 12:32:39 postgresql@11-main[20667]: Error: Could not open logfile /var/log/postgresql/postgresql-11-main.log
  • Nov 25 12:32:39 postgresql@11-main[20667]: Error: /usr/lib/postgresql/11/bin/pg_ctl /usr/lib/postgresql/11/bin/pg_ctl start -D /var/lib/postgresql/11/main -l /var/log/postgresql/postgresql-11-main.log -s -o -c config_file="/etc/postgresql/11/main/postgresql.conf" exited with status 1:
  • Nov 25 12:32:39 systemd[1]: postgresql@11-main.service: Can’t open PID file /run/postgresql/11-main.pid (yet?) after start: No such file or directory
  • Nov 25 12:32:39 systemd[1]: postgresql@11-main.service: Failed with result ‘protocol’.
  • – Subject: Unit failed
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – The unit postgresql@11-main.service has entered the ‘failed’ state with result ‘protocol’.
  • Nov 25 12:32:39 systemd[1]: Failed to start PostgreSQL Cluster 11-main.
  • – Subject: A start job for unit postgresql@11-main.service has failed
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – A start job for unit postgresql@11-main.service has finished with a failure.

  • – The job identifier is 33978 and the job result is failed.
  • Nov 25 12:39:30 systemd[1]: Starting PostgreSQL Cluster 11-main…
  • – Subject: A start job for unit postgresql@11-main.service has begun execution
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – A start job for unit postgresql@11-main.service has begun execution.

  • – The job identifier is 34139.
  • Nov 25 12:39:31 postgresql@11-main[20865]: Error: Could not open logfile /var/log/postgresql/postgresql-11-main.log
  • Nov 25 12:39:31 postgresql@11-main[20865]: Error: /usr/lib/postgresql/11/bin/pg_ctl /usr/lib/postgresql/11/bin/pg_ctl start -D /var/lib/postgresql/11/main -l /var/log/postgresql/postgresql-11-main.log -s -o -c config_file="/etc/postgresql/11/main/postgresql.conf" exited with status 1:
  • Nov 25 12:39:31 systemd[1]: postgresql@11-main.service: Can’t open PID file /run/postgresql/11-main.pid (yet?) after start: No such file or directory
  • Nov 25 12:39:31 systemd[1]: postgresql@11-main.service: Failed with result ‘protocol’.
  • – Subject: Unit failed
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – The unit postgresql@11-main.service has entered the ‘failed’ state with result ‘protocol’.
  • Nov 25 12:39:31 systemd[1]: Failed to start PostgreSQL Cluster 11-main.
  • – Subject: A start job for unit postgresql@11-main.service has failed
  • – Defined-By: systemd
  • – Support: https://www.debian.org/support

  • – A start job for unit postgresql@11-main.service has finished with a failure.

  • – The job identifier is 34139 and the job result is failed.
    root@didiercl:/var/lib/postgresql/11/main# nano /var/log/postgresql/postgresql-11-main.log

J’ai un peu de mal à appréhender le retour obtenu.

Merci d’avance pour vos conseils et vos idées.

Bon après midi.

didier58

Salut,

visiblement c’est yet-another-probleme-de-fichier-de-logs

Du coup naivement je penche pour un soucis de permission ou un truc du genre

Tu peux faire un

ls -ld /var/log/postgresql/
ls -l /var/log/postgresql/postgresql-11-main.log

Salut @ Alex

Voici le retour,

root@didiercl:/# ls -ld /var/log/postgresql/
drwxrwxr-t 2 root postgres 4096 Nov 25 12:48 /var/log/postgresql/
root@didiercl:/# ls -l /var/log/postgresql/postgresql-11-main.log
-rw-r----- 1 root root 0 Nov 21 10:30 /var/log/postgresql/postgresql-11-main.log

didier58

Mouaip bon alors tentons :

chown postgres:adm /var/log/postgresql/postgresql-11-main.log
systemctl restart postgresql

le service postgresql est à nouveau fonctionnel à part agendav qui ne s’affiche plus mais fonctionne sur les autre appareils téléphones, pc, mais pas sur l’interface utilisateur de yunohost.
Si tu as une idée?

didier58

En final j’ai désinstaller agendav et restaurée une sauvegarde et tout marche à la perfection encore merci @ Aleks pour l’aide qui m’a permis de remettre tout en marche.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.