There is already a domain master browser…

У моего Samba-сервера сменился ip-адрес, был 10.0.0.2, а стал 10.0.0.1. После этого все перестало работать. Краткий просмотр логов демона nmbd обнаружил следующую часто повторяющуюся строку:
There is already a domain master browser at IP 10.0.0.2 for workgroup DOMAIN registered on subnet UNICAST_SUBNET.

Более подробные логи /var/log/samba/log.nmbd выглядели так:
[2011/03/18 15:34:53.482195, 0] nmbd/nmbd_become_dmb.c:337(become_domain_master_browser_wins)
become_domain_master_browser_wins:
Attempting to become domain master browser on workgroup DOMAIN, subnet UNICAST_SUBNET.
[2011/03/18 15:34:53.482557, 0] nmbd/nmbd_become_dmb.c:351(become_domain_master_browser_wins)
become_domain_master_browser_wins: querying WINS server from IP 10.0.0.1 for domain master browser name DOMAIN<1b> on workgroup DOMAIN
[2011/03/18 15:34:53.482968, 0] nmbd/nmbd_become_dmb.c:235(become_domain_master_query_success)
become_domain_master_query_success:
There is already a domain master browser at IP 10.0.0.2 for workgroup DOMAIN registered on subnet UNICAST_SUBNET.

Оказывается, старый ip-адрес закешировался собственной же базе данных WINS и теперь Samba “боится” , вот содержимое /var/db/samba/wins.dat:
VERSION 1 0
"PDC#03" 1300702364 10.0.0.2 66R
"PDC#20" 1300702364 10.0.0.2 66R
"DOMAIN#1b" 1300702364 10.0.0.2 64R
"DOMAIN#00" 1300743619 0.0.0.0 e4R
"DOMAIN#1c" 1300702364 10.0.0.2 e4R
"PDC#00" 1300702364 10.0.0.2 66R
"DOMAIN#1e" 1300702364 0.0.0.0 e4R

Для решения проблемы нужно остановить самбу, почистить WINS-кэш и вновь ее запустить:

# /usr/local/etc/rc.d/samba stop
# rm /var/db/samba/wins.dat
# /usr/local/etc/rc.d/samba start

После этого все нормализовалось (опять же лог /var/log/samba/log.nmbd):

Attempting to become logon server for workgroup DOMAIN on subnet 10.0.0.1
[2011/03/18 15:44:38.612874, 0] nmbd/nmbd_logonnames.c:160(add_logon_names)
add_domain_logon_names:
Attempting to become logon server for workgroup DOMAIN on subnet UNICAST_SUBNET
[2011/03/18 15:44:38.612934, 0] nmbd/nmbd_become_dmb.c:337(become_domain_master_browser_wins)
become_domain_master_browser_wins:
Attempting to become domain master browser on workgroup DOMAIN, subnet UNICAST_SUBNET.
[2011/03/18 15:44:38.613024, 0] nmbd/nmbd_become_dmb.c:351(become_domain_master_browser_wins)
become_domain_master_browser_wins: querying WINS server from IP 10.0.0.1 for domain master browser name DOMAIN<1b> on workgroup DOMAIN
[2011/03/18 15:44:42.579479, 0] nmbd/nmbd_logonnames.c:121(become_logon_server_success)
become_logon_server_success: Samba is now a logon server for workgroup DOMAIN on subnet 10.0.0.1
[2011/03/18 15:44:44.574364, 0] nmbd/nmbd_logonnames.c:121(become_logon_server_success)
become_logon_server_success: Samba is now a logon server for workgroup DOMAIN on subnet UNICAST_SUBNET
[2011/03/18 15:44:44.574493, 0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
*****

Samba server PDC is now a domain master browser for workgroup DOMAIN on subnet UNICAST_SUBNET

*****
[2011/03/18 15:44:44.574569, 0] nmbd/nmbd_become_dmb.c:292(become_domain_master_browser_bcast)
become_domain_master_browser_bcast:
Attempting to become domain master browser on workgroup DOMAIN on subnet 10.0.0.1
[2011/03/18 15:44:44.574606, 0] nmbd/nmbd_become_dmb.c:305(become_domain_master_browser_bcast)
become_domain_master_browser_bcast: querying subnet 10.0.0.1 for domain master browser on workgroup DOMAIN
[2011/03/18 15:44:52.505886, 0] nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
*****

Samba server PDC is now a domain master browser for workgroup DOMAIN on subnet 10.0.0.1

*****
[2011/03/18 15:45:00.449531, 0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
*****

Samba name server PDC is now a local master browser for workgroup DOMAIN on subnet 10.0.0.1

*****

Похожие статьи

Leave a Reply

Your email address will not be published. Required fields are marked *