[technique] [tetaneutral] Services non lancés au démarrage du serveur

Sébastien Dinot sebastien.dinot at free.fr
Sam 6 Jan 15:38:50 CET 2018


Bonjour,

J'avais initié l'échange reproduit à la fin de ce message sur la liste
tetaneutral@ mais je réalise un peu tard qu'il avait plus sa place sur
la liste technique at . Je le poursuis donc sur cette dernière.

Finalement, ce matin mon serveur est redevenu accessible une heure avant
l'heure convenue avec Matthieu pour l'intervention sur site et nous
avons donc annulé celle-ci.

Comme je le soupçonnais, le serveur a rebooté - pour une raison que
j'ignore - et il est reparti dans la foulée mais si aucun service
n'était accessible, ce n'était pas qu'ils n'avaient pas démarré mais
parce que l'interface réseau n'était pas disponible ! Voici un extrait
du syslog :

------------------------------------------------------------------------------
# zgrep -E '^Jan  3 23:57:.*(eth0|r8169)' /var/log/syslog.3.gz
Jan  3 23:57:08 manta kernel: [3057032.567607] net-fw DROP IN=eth0 OUT= MAC=8c:89:a5:c3:96:df:90:e2:ba:20:b7:5c:08:00 SRC=185.94.111.1 DST=91.224.149.157 LEN=40 TOS=0x08 PREC=0x20 TTL=242 ID=54321 PROTO=TCP SPT=49603 DPT=179 WINDOW=65535 RES=0x00 SYN URGP=0 
Jan  3 23:57:51 manta systemd[1]: Started ifup for eth0.
Jan  3 23:57:51 manta avahi-daemon[462]: Joining mDNS multicast group on interface eth0.IPv4 with address 91.224.149.157.
Jan  3 23:57:51 manta avahi-daemon[462]: New relevant interface eth0.IPv4 for mDNS.
Jan  3 23:57:51 manta avahi-daemon[462]: Registering new address record for 91.224.149.157 on eth0.IPv4.
Jan  3 23:57:51 manta kernel: [    0.762505] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
Jan  3 23:57:51 manta kernel: [    0.762510] r8169 0000:02:00.0: can't disable ASPM; OS doesn't have ASPM control
Jan  3 23:57:51 manta kernel: [    0.763023] r8169 0000:02:00.0 eth0: RTL8168evl/8111evl at 0xffffb34c80c91000, 8c:89:a5:c3:96:df, XID 0c900800 IRQ 24
Jan  3 23:57:51 manta kernel: [    0.763024] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
Jan  3 23:57:51 manta kernel: [    9.713118] r8169 0000:02:00.0: firmware: failed to load rtl_nic/rtl8168e-3.fw (-2)
Jan  3 23:57:51 manta kernel: [    9.713136] r8169 0000:02:00.0: Direct firmware load for rtl_nic/rtl8168e-3.fw failed with error -2
Jan  3 23:57:51 manta kernel: [    9.713138] r8169 0000:02:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168e-3.fw (-2)
Jan  3 23:57:51 manta kernel: [    9.730131] r8169 0000:02:00.0 eth0: link down
Jan  3 23:57:51 manta kernel: [    9.730148] r8169 0000:02:00.0 eth0: link down
Jan  3 23:57:51 manta kernel: [   12.081897] r8169 0000:02:00.0 eth0: link up
Jan  3 23:57:56 manta ntpd[656]: Listen normally on 3 eth0 91.224.149.157:123
Jan  3 23:58:00 manta sh[421]: ifup: failed to bring up eth0
Jan  3 23:58:00 manta systemd[1]: ifup at eth0.service: Main process exited, code=exited, status=1/FAILURE
Jan  3 23:58:00 manta systemd[1]: ifup at eth0.service: Failed with result 'exit-code'.
------------------------------------------------------------------------------

Je suppose que c'est pour cette raison que, dans la foulée, le démarrage
du pare-feu (géré via Shorewall) a échoué :

------------------------------------------------------------------------------
Jan 03 23:57:52 manta systemd[1]: Starting Shorewall IPv4 firewall...
-- Subject: Unit shorewall.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit shorewall.service has begun starting up.
Jan 03 23:57:58 manta shorewall[591]: Starting Shorewall....
Jan 03 23:57:59 manta shorewall[591]: Initializing...
Jan 03 23:58:10 manta shorewall[591]: Setting up Route Filtering...
Jan 03 23:58:10 manta shorewall[591]: Setting up Martian Logging...
Jan 03 23:58:10 manta shorewall[591]: Setting up Accept Source Routing...
Jan 03 23:58:10 manta shorewall[591]: Preparing iptables-restore input...
Jan 03 23:58:11 manta shorewall[591]: Running /sbin/iptables-restore ...
Jan 03 23:58:15 manta shorewall[591]: iptables-restore: line 125 failed
Jan 03 23:58:15 manta shorewall[591]:    ERROR: iptables-restore Failed. Input is in /var/lib/shorewall/.iptables-restore-input
Jan 03 23:58:17 manta shorewall[591]: Preparing iptables-restore input...
Jan 03 23:58:17 manta shorewall[591]: Running /sbin/iptables-restore...
Jan 03 23:58:17 manta shorewall[591]: Terminated
Jan 03 23:58:17 manta systemd[1]: shorewall.service: Main process exited, code=exited, status=143/n/a
Jan 03 23:58:17 manta systemd[1]: shorewall.service: Failed with result 'exit-code'.
Jan 03 23:58:17 manta systemd[1]: Failed to start Shorewall IPv4 firewall.
-- Subject: Unit shorewall.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit shorewall.service has failed.
------------------------------------------------------------------------------

Mais ce matin, à 9h17, l'interface a du redevenir disponible (je n'ai
aucune trace explicite à ce sujet) et Systemd a relancé le service
Shorewall :

------------------------------------------------------------------------------
Jan 06 09:17:14 manta systemd[1]: Starting Shorewall IPv4 firewall...
-- Subject: Unit shorewall.service has begun start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit shorewall.service has begun starting up.
Jan 06 09:17:14 manta shorewall[4378]: Compiling using Shorewall 5.1.10.2...
Jan 06 09:17:14 manta shorewall[4378]: Processing /etc/shorewall/params ...
Jan 06 09:17:14 manta shorewall[4378]: Processing /etc/shorewall/shorewall.conf...
Jan 06 09:17:14 manta shorewall[4378]: Loading Modules...
Jan 06 09:17:14 manta shorewall[4378]: Compiling /etc/shorewall/zones...
Jan 06 09:17:14 manta shorewall[4378]: Compiling /etc/shorewall/interfaces...
Jan 06 09:17:14 manta shorewall[4378]: Determining Hosts in Zones...
Jan 06 09:17:14 manta shorewall[4378]: Locating Action Files...
Jan 06 09:17:14 manta shorewall[4378]: Compiling /etc/shorewall/policy...
Jan 06 09:17:14 manta shorewall[4378]: Adding Anti-smurf Rules
Jan 06 09:17:14 manta shorewall[4378]: Adding rules for DHCP
Jan 06 09:17:14 manta shorewall[4378]: Compiling TCP Flags filtering...
Jan 06 09:17:14 manta shorewall[4378]: Compiling Kernel Route Filtering...
Jan 06 09:17:14 manta shorewall[4378]: Compiling Martian Logging...
Jan 06 09:17:14 manta shorewall[4378]: Compiling Accept Source Routing...
Jan 06 09:17:14 manta shorewall[4378]: Compiling MAC Filtration -- Phase 1...
Jan 06 09:17:14 manta shorewall[4378]: Compiling /etc/shorewall/rules...
Jan 06 09:17:14 manta shorewall[4378]: Compiling /etc/shorewall/conntrack...
Jan 06 09:17:14 manta shorewall[4378]: Compiling MAC Filtration -- Phase 2...
Jan 06 09:17:14 manta shorewall[4378]: Applying Policies...
Jan 06 09:17:14 manta shorewall[4378]: Generating Rule Matrix...
Jan 06 09:17:14 manta shorewall[4378]: Optimizing Ruleset...
Jan 06 09:17:14 manta shorewall[4378]: Creating iptables-restore input...
Jan 06 09:17:14 manta shorewall[4378]: Shorewall configuration compiled to /var/lib/shorewall/.start
Jan 06 09:17:14 manta shorewall[4378]: Starting Shorewall....
Jan 06 09:17:14 manta shorewall[4378]: Initializing...
Jan 06 09:17:14 manta shorewall[4378]: Setting up Route Filtering...
Jan 06 09:17:14 manta shorewall[4378]: Setting up Martian Logging...
Jan 06 09:17:14 manta shorewall[4378]: Setting up Accept Source Routing...
Jan 06 09:17:14 manta shorewall[4378]: Preparing iptables-restore input...
Jan 06 09:17:14 manta shorewall[4378]: Running /sbin/iptables-restore ...
Jan 06 09:17:14 manta shorewall[4378]: done.
Jan 06 09:17:14 manta systemd[1]: Started Shorewall IPv4 firewall.
-- Subject: Unit shorewall.service has finished start-up
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit shorewall.service has finished starting up.
------------------------------------------------------------------------------

Mon serveur est redevenu accessible à partir de ce moment.

Je n'ai que peu de traces sur ce qui s'est produit dans les secondes qui
ont précédé :

------------------------------------------------------------------------------
Jan  6 09:17:01 manta CRON[2353]: (root) CMD (   cd / && run-parts --report /etc/cron.hourly)
Jan  6 09:17:08 manta systemd[1]: Reloading.
Jan  6 09:17:08 manta systemd[1]: Configuration file /etc/systemd/system/postfix.service.d/override.conf is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jan  6 09:17:08 manta systemd[1]: Starting Daily apt download activities...
Jan  6 09:17:08 manta systemd[1]: Started Daily apt download activities.
Jan  6 09:17:09 manta systemd[1]: Reloading.
Jan  6 09:17:09 manta systemd[1]: Configuration file /etc/systemd/system/postfix.service.d/override.conf is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jan  6 09:17:11 manta systemd[1]: Reloading.
Jan  6 09:17:11 manta systemd[1]: Configuration file /etc/systemd/system/postfix.service.d/override.conf is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway.
Jan  6 09:17:14 manta systemd[1]: Starting Shorewall IPv4 firewall...
------------------------------------------------------------------------------

Du coup, j'ai du mal à comprendre ce qui se passe... Ces traces vous
inspirent-elles ?

J'ai bien effectué une recherche sur le net mais je n'ai rien trouvé
d'inspirant.

Sébastien



Sébastien Dinot via tetaneutral a écrit :
> Bonsoir,
> 
> Mon serveur hébergé dans l'une des salles de Mix'art Myrys ne répond
> plus depuis quelques heures. Je viens donc de demander sur la liste
> dédiée de l'aide pour accéder à la salle et si j'en parle ici, c'est
> parce que je crains de me retrouver dans la même situation que la
> dernière fois. Le cas échéant, j'ai besoin d'un petit conseil.
> 
> En effet, j'ai déjà sollicité les bénévoles de Tetaneutral le 29
> novembre dernier pour le même problème (au passage, j'adressse un grand
> merci à Vross, elle avait répondu très rapidement et m'avait permis de
> dépanner mon serveur à peine quelques heures plus tard).
> 
> Ce jour-là, mon PC avait rebooté mais aucun service ne s'était lancé,
> pas même le démon SSH. J'avais bien épluché les journaux d'évènements
> mais je n'avais trouvé ni explication, ni piste. Dans la foulée, j'avais
> tenté plusieurs reboots et tous s'étaient déroulés sans problème, tous
> les services étant correctement relancés à chaque fois.
> 
> Je ne sais pas si je vais retrouver mon PC dans le même état cette
> fois-ci mais au cas où ce serait le cas, auriez-vous une idée de ce qui
> peut expliquer un tel comportement. Que devrais-je chercher ou
> vérifier ? J'ai bien effectué une recherche sur le net mais je n'ai rien
> trouvé qui soit relatif à un problème de démarrage évanescent.
> 
> Dernière précision, il s'agit d'une Debian stable (9.3) mise à jour
> quotidiennement. L'initialisation du système est donc prise en charge
> par Systemd.
> 
> Je vous remercie par avance pour vos lumières,
> 
> Sébastien



Hugo SIMANCAS a écrit :
> Salut Sébastien,
>
> Regarde peut être côté configuration réseau de ta machine. Peut être
> que l'interface réseau n'existe pas au démarrage du pc ainsi les
> services ne peuvent pas s'y binder ?
> A defaut regarde les logs tu aura forcément une informe
>
> Hugo
> Sent from Nine



Julien Bresciani via tetaneutral a écrit :
> Hello,
> 
> systemd m a deja joué le meme genre de blaques avec le lancement d'un
> FSCK sur un point de montage qui merdait.
> 
> je me souviens avoir du jouer avec un argument nofail dans le
> /etc/fstab qui permet de continuer le boot si le fsck ne se passe pas
> bien sur un systeme de fichier.
> 
> par contre l'argument nofail n'est pas possible a ajouter sur le
> systeme de fichiers racine.


-- 
Sébastien Dinot, sebastien.dinot at free.fr
http://sebastien.dinot.free.fr/
Ne goûtez pas au logiciel libre, vous ne pourriez plus vous en passer !



Plus d'informations sur la liste de diffusion technique