Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

We have a CentOS 5.9 server (w/ latest updates) running Samba 3.0.33-3.39.el5_8. The IP address of the server is 192.168.1.28. The problem is that every night at around 4 a.m., the clients lose their drive mappings to the server.

In the nmbd.log file:

[2013/04/10 04:02:27, 0] nmbd/nmbd_workgroupdb.c:dump_workgroups(282)  
  dump_workgroups()  
   dump workgroup on subnet       192.168.1.28: netmask=  255.255.255.0:  
    ACCE(1) current master browser = WS0337  
        MAIN-SAMBA 40809a03 (Samba Server)  
        WS0337 40071003 ()  

In the smb.conf:

local master = yes  
os level = 100  
domain master = no  
preferred master = yes  

Despite the above settings, the Windows 7 and Windows XP machines are elected master browsers:

nmblookup -M -- -
querying __MSBROWSE__ on 192.168.1.255  
192.168.1.71 __MSBROWSE__<01>  
192.168.1.10 __MSBROWSE__<01>  
192.168.1.67 __MSBROWSE__<01>  

I am no Samba expert, but I assume that the Samba server losing the election for master browser is related to the lost network mappings. I really need to resolve this issue - it is breaking a bunch of automated processes and giving me gray hair.

How can I make my CentOS Samba server become the master browser (and remain so), without having to manually turn of the Computer Browser service on every single Windows machine on the network?

share|improve this question

1 Answer 1

In all honesty it sounds like you have other problems that are causing the samba server not to become the master-browser. Or in other words, not being the master-browser is another symptom. Not the cause. Being the master-browser does NOT have anything to do with being able to connect to a network share or not. It is simply a left-over technology from days-gone-by from old "NETBIOS" days. The master-browser is simply a machine who is currently most-likely the guy who knows the most about the local network. The only information that server has/provides is a name-association to an IP address for a specific type of service. The list is not typically crucial, as other methods of discovery are tried. When in doubt, you could always create a lmhosts file and hard-code values on one machine in the network to ensure the values are correct.

In most networks today, all this lookup-stuff is done with DNS. (...and in corporate networks before DNS they used WINS) NETBIOS stuff is rather messy and excessively chatty on networks.

share|improve this answer
    
Ok, so I can see that. I don't really care about who is the master browser, but I the strange disconnects is a big problem. Everything is working just fine and then all of a sudden the network mappings to the server are lost (seems to only be happening about once a day and only for a very brief moment, but enough to break automated process that are using those shares. Other machines that do not use those shares at the moment of the momentary disconnect are not affected). The only thing I saw in the logs are what I posted above. Any suggestions? –  Jim B Apr 10 '13 at 21:01
    
Is the time-of-day predictable? Always at (or around) a specific time? Is this some sort of appliance? Have you tried deliberately overloading the box to see if you can force a problem? Do you have any sorts of intrusion-prevention or firewall type appliances in the middle? –  TheCompWiz Apr 10 '13 at 21:03
    
It is a regular CentOS 5 installation on a VM and there is no load issues (ESXi has good tools for checking VM performance, load, etc.). But I checked /var/log/nmbd.log and there is another log message just before the one I posted above: "[2013/04/10 04:02:27, 0] nmbd/nmbd.c:process(588) Got SIGHUP dumping debug info." I have no idea where the SIGHUP is coming from. Any ideas on how to debug? –  Jim B Apr 10 '13 at 22:03
    
On second thought, a SIGHUP should not cause any disruptions, just a reload of smb.conf, right? So maybe the SIGHUP is sent by Samba to itself to refresh? Either way, I will put more aggressive monitoring in place to determine exactly when the disconnects happen. –  Jim B Apr 11 '13 at 0:01
    
a SIGHUP tells samba to reload. Did the .conf change? I believe samba is designed to do a reload automatically (after a period of time) if the .conf changes. –  TheCompWiz Apr 15 '13 at 13:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.