0
INDEX
bind failed on port 137, nmbd is dead but pid file exists, …
Les symptômes
- les dossiers partagés ne sont plus accessibles
- samba se lance mais netbios est défaillant
[root@serv]# /etc/init.d/smb start Starting SMB services: [ OK ] Starting NMB services: [ OK ] [root@serv]# /etc/init.d/smb status smbd dead but pid file exists nmbd (pid 13503) is running...
Le log : un ami fidèle
[root@serv]# nano /var/log/samba/nmbd.log [2009/06/11 15:22:20, 0] nmbd/nmbd.c:main(700) Netbios nameserver version 3.0.23c-2 started. Copyright Andrew Tridgell and the Samba Team 1992-2006 [2009/06/11 15:22:20, 0] lib/util_sock.c:open_socket_in(830) bind failed on port 137 socket_addr = 192.168.1.2. Error = Ne peut attribuer l'adresse demandée [2009/06/11 15:22:20, 0] nmbd/nmbd_subnetdb.c:make_subnet(97) nmbd_subnetdb:make_subnet() Failed to open nmb socket on interface 192.168.1.2 for port 137. Error was Ne peut attribuer l'adresse demandée [2009/06/11 15:22:20, 0] nmbd/nmbd.c:main(774) ERROR: Failed when creating subnet lists. Exiting.
On voit qu’il y a un problème de routage avec Error was Ne peut attribuer l’adresse demandée
[root@serv]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:18:8B:52:29:AB
inet adr:192.168.252.177 Bcast:192.168.252.255 Masque:255.255.255.0
adr inet6: fe80::218:8bff:fe52:29ab/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:69704 errors:0 dropped:0 overruns:0 frame:0
TX packets:105446 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:8398101 (8.0 MiB) TX bytes:150174273 (143.2 MiB)
Interruption:169 Mémoire:f4000000-f4011100
lo Link encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:Hôte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:199 errors:0 dropped:0 overruns:0 frame:0
TX packets:199 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:27946 (27.2 KiB) TX bytes:27946 (27.2 KiB)
Mais où est donc passé eth1 ?
(le premier qui répond « dans ton cul » a un gage)
On modifie la table de routage :
[root@serv]# route Table de routage IP du noyau Destination Passerelle Genmask Indic Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth1 192.168.252.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 default 192.168.252.249 0.0.0.0 UG 0 0 0 eth0 [root@serv]# route del eth1 eth1: Hôte inconnu [root@serv lock]# ifconfig eth1 down [root@serv lock]# route Table de routage IP du noyau Destination Passerelle Genmask Indic Metric Ref Use Iface 192.168.252.0 * 255.255.255.0 U 0 0 0 eth0 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0 default 192.168.252.249 0.0.0.0 UG 0 0 0 eth0
Commandes utiles :
/etc/init.d/network restart
route add -net 192.168.1.2 netmask 255.255.255.0 gw 192.168.1.1 eth1
ifconfig eth1 192.168.1.2
ifconfig eth1 up
ifconfig eth1 down
Affectation / Désaffectation du routage dans Samba pour débugger
[root@serv lock]# nano /etc/samba/smb.conf # Configure Samba to use multiple interfaces # If you have multiple network interfaces then you must list them # here. See the man page for details. interfaces = 192.168.1.2/24 192.168.252.177/24 #interfaces = 192.168.252.177/24
Finalement…
[root@serv lock]# /etc/init.d/smb restart Fermeture des services SMB : [ OK ] Fermeture des services NMB : [ OK ] Démarrage des services SMB : [ OK ] Démarrage des services NMB : [ OK ] [root@serv lock]# /etc/init.d/smb status smbd (pid 29171 29168) en cours d'exécution... nmbd (pid 29172) en cours d'exécution...
DATE 11 Juin 2009

