Varios servicios en ubuntu o CentOS marcan “after start: Too many levels of symbolic links”

¿En qué podemos ayudarte?
< Regresar
Estás aquí:
Imprimir

Despues de hacer mucha investigacion parece que este es un bug del paquete systemd version 229, pero no se puede actualizar el paquete o el kernel por ser vps.

El siguiente workaround fue aplicado en ubuntu, pero no se pudo validar en CentOS.

Primero revisemos que la salida de este comando se ejecute bien

systemd-tmpfiles --create

Si el resultado es algo como la salida de abajo 

Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/elasticsearch failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/kopano failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/kopano failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/php failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/postgresql failed: Invalid argument
Nov 17 04:47:42 h2118376 systemd-tmpfiles[165]: fchownat() of /run/redis failed: Invalid argument

Entonces tenemos que ver los archivos que estan en /usr/lib/tmpfiles.d/ y validar que tengan el owner correcto, para esto vemos el contenido del archivo correspondiente al demonio que buscamos por ejemplo php

cat php7.4-fpm.conf

#Type Path        Mode UID      GID      Age Argument
    d /run/php    0755 www-data www-data -   -

Entonces validamos que /run/php tenga de owner www-data:www-data y así con todos los archivos a los que marque invalid argument.

Tambien nos podemos encontrar que la salida del comando diga

Failed to validate path /var/run/screen: Too many levels of symbolic links
Failed to validate path /var/run/sshd: Too many levels of symbolic links
Failed to validate path /var/run/sudo: Too many levels of symbolic links
Failed to validate path /var/run/sudo/ts: Too many levels of symbolic links

En este caso se debe editar los mismos arechivos y cambiar donde dice /var/run a /run como el siguiente ejemplo

nano /usr/lib/tmpfiles.d/php7.4-fpm.conf
DE
Type Path        Mode UID      GID      Age Argument
d /var/run/php    0755 www-data www-data -   -

A
d /run/php    0755 www-data www-data -   -

Finalmente se tienen que cambiar los archivos en /etc/systemd/system/ ó /etc/systemd/system/multi-user.target.wants de pende donde se ubican

nano /etc/systemd/system/multi-user.target.wants/fail2ban.service” 

from PIDFile=/var/run/fail2ban/fail2ban.pid
to
PIDFile=/run/fail2ban/fail2ban.pid

nano /etc/systemd/system/multi-user.target.wants/ dovecot.service
from
PIDFile=/var/run/dovecot/master.pid
to
PIDFile=/run/dovecot/master.pid

Intentar reiniciar los servicios nuevamente, ojo el mensaje que medio el log fue

Dec 28 23:10:43 mx1 systemd[1]: Can’t open PID file /var/run/dovecot/master.pid (yet?) after start: Too many levels of symbolic

Entonces hay que partir del log para ir viendo las diferentes variantes.

Table of Contents

1 comment on Varios servicios en ubuntu o CentOS marcan “after start: Too many levels of symbolic links”

Deja un comentario