Bug 253100 - Samba Master Browsing not working correctly
Samba Master Browsing not working correctly
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: samba (Show other bugs)
5.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Samba Maint Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-08-16 18:47 EDT by Tim Conrad
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-23 11:20:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
NMBD Log File (11.96 KB, application/octet-stream)
2007-08-16 20:20 EDT, Tim Conrad
no flags Details
'NMBD' log file for WINS server (129.18 KB, application/octet-stream)
2007-08-17 00:00 EDT, Tim Conrad
no flags Details
'nmbd.log' file at log level = 10 (764.88 KB, application/octet-stream)
2007-08-20 12:26 EDT, Tim Conrad
no flags Details

  None (edit)
Description Tim Conrad 2007-08-16 18:47:48 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6

Description of problem:
I have several RHEL 4 ES and RHEL 5 servers. We recently upgraded 6 of our file servers to RHEL 5 (samba-3.0.23c-2.el5.2.0.2) using the exact same 'smb.conf' files that were on the server when it was RHEL 4 (samba-3.0.10-1.4E.12.2). This problem is isolated to the RHEL 5 servers.

The following entry is logged repeatedly and since one of the servers that got upgraded was the domain master browser (DMB) all Windows browsing is basically broken.

[root@ampere ~]# tail /var/log/samba/nmbd.log 
[2007/08/16 13:44:10, 0] nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)
  find_domain_master_name_query_fail:
  Unable to find the Domain Master Browser name ESG<1b> for the workgroup ESG.
  Unable to sync browse lists in this workgroup.

The problem seems to be that each of the RHEL 5 servers wants to be its own master browser instead of letting the designated DMB be the master browser.

[root@ampere ~]# smbclient -NL ampere
Domain=[ESG] OS=[Unix] Server=[Samba 3.0.23c-2.el5.2.0.2]

        Sharename       Type      Comment
        ---------       ----      -------
        ampere          Disk      Ampere File Server
        hr              Disk      Human Resources Directory
        qbdata          Disk      QuickBooks Data Directory
        IPC$            IPC       IPC Service (ampere)
Domain=[ESG] OS=[Unix] Server=[Samba 3.0.23c-2.el5.2.0.2]

        Server               Comment
        ---------            -------
        AMPERE               ampere

        Workgroup            Master
        ---------            -------
        ESG                  AMPERE


Version-Release number of selected component (if applicable):
samba-3.0.23c-2.el5.2.0.2

How reproducible:
Always


Steps to Reproduce:
1. Install 'samba-common-3.0.23c-2.el5.2.0.2', 'samba-client-3.0.23c-2.el5.2.0.2' 'samba-3.0.23c-2.el5.2.0.2' on two RHEL 5 servers
2. Designate one of them as a DMB in /etc/samba/smb.conf

[global]
        workgroup = esg
        server string = esg
        security = SHARE
        password server = None
        guest account = esg
        name resolve order = wins host
        socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT
        load printers = Yes
        printcap name = /dev/null
        show add printer wizard = No
        preferred master = Yes
        domain master = Yes
        wins support = Yes
        remote announce = 10.10.12.210 10.10.40.200 10.10.60.200 10.10.80.200 10.10.110.200
        remote browse sync = 10.10.12.210 10.10.40.200 10.10.60.200 10.10.80.200 10.10.110.200
        socket address = 10.10.10.200
        create mask = 0644
        guest ok = Yes
        hosts allow = 127.0.0., 10.10.

3. Designate the other server to be a WINS client in /etc/samba/smb.conf

[global]
        workgroup = esg
        server string = ampere
        security = SHARE
        password server = None
        guest account = esg
        name resolve order = wins host
        socket options = IPTOS_LOWDELAY TCP_NODELAY IPTOS_THROUGHPUT
        load printers = No
        printcap name = /dev/null
        show add printer wizard = No
        wins server = 10.10.10.200
        remote announce = 10.10.10.200
        remote browse sync = 10.10.10.200
        socket address = 10.10.10.205
        create mask = 0644
        guest ok = Yes
        hosts allow = 127.0.0., 10.10.


Actual Results:
Each RHEL 5 becomes its own DMB and none of the Windows clients see them in their browse list.

Expected Results:
Windows browse list should match output from 'smbclient -NL <DMB>'.

Additional info:
Comment 1 Simo Sorce 2007-08-16 19:38:36 EDT
The error indicate that the servers can't find the domain master browser not
that they are one.
I need some more info to understand if this is a configuration problem or a bug.

Just to be sure can you do the following:
1)
- Check that you can actually retrieve the DMB from the WINS server
  nmblookup -R -U<WINSserver> 'ESG#1B'

2)
- add local master = yes to all servers that need to be local master
- add domain master = no and preferred master = yes to all servers except the
domain master
- raise the log level of nmbd of one of the servers that fail and attach the
nmbd.log
Comment 2 Tim Conrad 2007-08-16 20:19:55 EDT
1) Output from both the WINS/DMB server and client were the same:

name_query failed to find name ESG#1b

2) 'nmbd.log' file is attached.
Comment 3 Tim Conrad 2007-08-16 20:20:20 EDT
Created attachment 161705 [details]
NMBD Log File
Comment 4 Simo Sorce 2007-08-16 21:42:16 EDT
(In reply to comment #2)
> 1) Output from both the WINS/DMB server and client were the same:
> 
> name_query failed to find name ESG#1b

If this is the case then there is a problem with the wins server.
Can you provide the WINS server nmbd.log file ?
Comment 5 Tim Conrad 2007-08-17 00:00:58 EDT
Created attachment 161714 [details]
'NMBD' log file for WINS server
Comment 6 Tim Conrad 2007-08-17 00:01:41 EDT
I've attached the 'nmbd.log' file for the WINS server.
Comment 7 Simo Sorce 2007-08-17 08:49:20 EDT
This log shows that the main server becomes a domain master browser.
Can you run the above nmblookup command on the WINS server directing it to
itself and verify if it resolves?
Comment 8 Tim Conrad 2007-08-17 12:20:04 EDT
I ran it 3 different ways and it all produces the same resutls. Please note the
name of the DMB/WINS server is 'esg.esgrp.net' and the workgroup name is 'ESG'.

[root@esg ~]# nmblookup -R -U esg 'ESG#1B'
added interface ip=10.10.10.200 bcast=10.10.10.255 nmask=255.255.255.0
Socket opened.
querying ESG on 10.10.10.200
Negative name query response, rcode 0x03: The name requested does not exist.
name_query failed to find name ESG#1b

[root@esg ~]# nmblookup -R -U esg.esgrp.net 'ESG#1B'
added interface ip=10.10.10.200 bcast=10.10.10.255 nmask=255.255.255.0
Socket opened.
querying ESG on 10.10.10.200
Negative name query response, rcode 0x03: The name requested does not exist.
name_query failed to find name ESG#1b

[root@esg ~]# nmblookup -R -U localhost 'ESG#1B'
added interface ip=10.10.10.200 bcast=10.10.10.255 nmask=255.255.255.0
Socket opened.
querying ESG on 127.0.0.1
name_query failed to find name ESG#1b

Samba is allowed through the firewall, but I tried the command with an without
'iptables' running and it made no difference. I also disabled selinux's controls
of Samba by setting the following booleans:

smbd_disable_trans --> on
nmbd_disable_trans --> on


Comment 9 Tim Conrad 2007-08-17 12:21:50 EDT
The thing that is odd is it actually is the master brower:

[root@esg ~]# smbclient -NL esg
Domain=[ESG] OS=[Unix] Server=[Samba 3.0.23c-2.el5.2.0.2]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (esg)
Domain=[ESG] OS=[Unix] Server=[Samba 3.0.23c-2.el5.2.0.2]

        Server               Comment
        ---------            -------
        ACCT-01              
        AMPERE               ampere
        ARCHIVE              archive
        BACKUP               backup
        ESG                  esg
        GAUSS                gauss
        ICEHAWK-CSK          
        JNU                  jnu
        MAXWELL              maxwell
        RDM                  rdm
        SCADA                scada
        SCANNER              
        SOS                  sos
        VCR                  vcr
        VOLT                 volt

        Workgroup            Master
        ---------            -------
        ESG                  ESG
Comment 10 Tim Conrad 2007-08-17 12:30:24 EDT
If you run that same command without the #1B is does respond with a name lookup.

[root@esg ~]# nmblookup -R -U esg 'ESG'
added interface ip=10.10.10.200 bcast=10.10.10.255 nmask=255.255.255.0
Socket opened.
querying ESG on 10.10.10.200
Got a positive name query response from 10.10.10.200 ( 255.255.255.255 )
255.255.255.255 ESG<00>
Comment 11 Simo Sorce 2007-08-17 13:08:16 EDT
Yes there seem to be a problem where the WINS server actually wins the DMB
elections but somehow forgets to set that into the WINS database itself, I need
to dig in the code to find out what's going on.

Meanwhile we have new packages in the beta channel you may want to try out, they
may fix your problem. If you do, can you please report abck if that fixes your
problem?
Comment 12 Tim Conrad 2007-08-17 13:21:49 EDT
I'm not familiar with the beta channel, can you give me a link?

The searching I've done on Google groups would lead me to believe this may have
been is v3.0.24 but I didn't see anything technically significant as to what the
issue actually was.
Comment 13 Tim Conrad 2007-08-17 13:23:38 EDT
(In reply to comment #12)
> I'm not familiar with the beta channel, can you give me a link?
> 
> The searching I've done on Google groups would lead me to believe this may have
> been fixed in v3.0.24 but I didn't see anything technically significant as to     
> what the issue actually was.

I meant "been fixed in v3.0.24"
Comment 14 Simo Sorce 2007-08-17 14:49:15 EDT
(In reply to comment #12)
> I'm not familiar with the beta channel, can you give me a link?

it's an rhn channel, which you can subscribe to using the 'alter channel
subscriptions' link from the system's page on rhn

> The searching I've done on Google groups would lead me to believe this may have
> been is v3.0.24 but I didn't see anything technically significant as to what the
> issue actually was.

In the beta we have 3.0.25 that's why I am asking if you can try that out.
Comment 15 Tim Conrad 2007-08-17 17:00:05 EDT
I tried the beta version (samba-3.0.25b-0.el5.4) and the results are the same.
The servers still do the exact same thing.
Comment 16 Simo Sorce 2007-08-20 08:12:10 EDT
Please can you provide me the nmbd.log file of the DMB/WINS server at log level
=10 ? Please do a restart and let it log at that level for 5 minutes
Also set max log size = 0 during this tjme so that logs don't wrap.

(log level 10 can slow doiwn the server considerably, if it is a production
system better to do these test off peek hours).
Comment 17 Tim Conrad 2007-08-20 12:26:06 EDT
Created attachment 161899 [details]
'nmbd.log' file at log level = 10
Comment 18 Tim Conrad 2007-08-20 14:46:37 EDT
I've attached about 5 minutes worth of the 'nmbd.log' file with the "log level =
10" parameter set for the WINS server.
Comment 19 Simo Sorce 2007-08-20 14:59:15 EDT
Thanks,
I am trying to reproduce it.
Comment 20 Simo Sorce 2007-08-22 16:06:42 EDT
Tim,
I have reproduced the problem.
It is a configuration issue.
"socket address" is the culprit.
If you use it nmbd will not listen on 127.0.0.1 and it will not be able to send
to itself the WINS registration packets.

The socket address option is meant to be used only in very specialized
environment where you have multiple smbd running on a multi-homed system.
In those cases usually nmbd is given a different configuration.

Can you remove socket address and report if this fixes your problem?
Comment 21 Tim Conrad 2007-08-22 17:32:22 EDT
Removing the "socket address" from the configurations on the RHEL 5 servers does
appear to have corrected the issue. Is this a bug or is just a misconfiguration?
This was not a problem in RHEL 4 (samba-3.0.10-1.4E.12.2). In any event, thank
you very much for your help.
Comment 22 Simo Sorce 2007-08-23 11:20:15 EDT
I'll tag it as a misconfiguration, normally to restrict the interfaces you
listen to you can use: "interfaces" and "bind interfaces only" and the
documentation warns you to always include "lo" or localhost or bad things happen.
"socket address" is a very obscure and stricter thing that allows you to
restrict smbd to a single specific address. But this is generally unwanted and
should be used with care and in environments where a multihomed system is used
to run smbd with "different" configurations on different ip address.

Thanks for bringing this up, it will help others if they spot the same problem.

Note You need to log in before you can comment on or make changes to this bug.