rss
twitter
  • Showcase
  • Carrières
  • Support
  • GitLab
  • Espace client
  • Contact

Serveur Samba qui ne démarre pas…

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...

img13
DATE 11 Juin 2009
by : Germain
Author / Auteur

Social Share / Partager

    Leave a Reply / Répondre Annuler la réponse

    *
    *

    More in Sysadmin : Linux, Apache, GIT

    • Recevoir un mail lors de la connexion root à un serveur
    • Maildev : tester l'envoi de mails durant ses développements
    • Quel php.ini (MAMP ou Linux), quelle valeur de phpinfo() ?
    • Pense-bête Apache Server-Side Includes (SSI)
    • Ubuntu 14 chroot sftp et rsync

    Search the blog

    Blog categories

    • Workflow (1)
    • Front-end : HTML, CSS (13)
    • Front-end : javascript, jQuery (33)
    • Back-end : PHP, CMS (42)
    • Back-end : SQL, MySQL (20)
    • Sysadmin : Linux, Apache, GIT (75)
    • Designers : tools, advice (2)
    • Desktop : OS X (37)
    • Desktop : Microsoft (12)
    • Uncategorized (8)

    ITALIC™ Resources

    • Paramètres de connexion au serveur mail
    • Graphistes : séduire un développeur web
    • Dév front : nos bonnes pratiques
    • Mailing : nos (bonnes ?) pratiques
    • Environnement de travail Mac

    Recent posts

    • Autoriser le chargement de contenus mixtes non-https dans Chrome (Mac)
    • Afficher les logs MySQL
    • Recevoir un mail lors de la connexion root à un serveur
    • Changer l’interclassement de plusieurs tables MySQL à la fois (ou presque
    • Maildev : tester l’envoi de mails durant ses développements
    © 2008-2017 ITALIC™ • 8 bis rue Abel • 75012 PARIS • Tel +33 (0)1 48 44 46 35 • RCS PARIS 508 228 772 • Powered by WordPress & GoodLayers
    Nous utilisons des cookies pour vous garantir la meilleure expérience sur notre site web.
    Cookie settingsACCEPTER
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Toujours activé
    Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
    Non-necessary
    Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
    Enregistrer & appliquer