[CentOS] NIS failover

Clint Dilks clintd at scms.waikato.ac.nz
Thu Dec 17 20:51:24 UTC 2009


Jason Pyeron wrote:
>  
>
>   
>> -----Original Message-----
>> From: centos-bounces at centos.org 
>> [mailto:centos-bounces at centos.org] On Behalf Of Jason Pyeron
>> Sent: Thursday, December 17, 2009 14:37
>> To: 'CentOS mailing list'
>> Subject: [CentOS] NIS failover
>>
>> We just updated our configuratiosn to have multiple NIS 
>> servers, when we initiated a test of client failover, we were 
>> disapointed.
>>
>> It seemed that the only way to get a filaover was to 
>> /etc/init.d/ypbind restart.
>>
>> It behaves as indicated in
>> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=508
>>     
> 4845 using
>   
>> ypbind-1.17.2-13 on Centos 4.5 / Linux xxxxxxxxxxxx 
>> 2.6.9-55.0.12.ELsmp #1 SMP Fri Nov 2 12:38:56 EDT 2007 x86_64 
>> x86_64 x86_64 GNU/Linux
>>
>> http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4858192
>>
>>
>> Any advice?
>>     
>
> So, avoiding the security flamewars...
>
> It seems that it behaves slightly different than I indicated before.
>
> Snippet of the strace for # ypcat passwd
> ...
> mprotect(0x2a9566a000, 4096, PROT_READ) = 0
> arch_prctl(ARCH_SET_FS, 0x2a959bde00)   = 0
> munmap(0x2a9556c000, 33321)             = 0
> brk(0)                                  = 0x503000
> brk(0x524000)                           = 0x524000
> open("/usr/lib/locale/locale-archive", O_RDONLY) = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=48528816, ...}) = 0
> mmap(NULL, 48528816, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2a959bf000
> close(3)                                = 0
> uname({sys="Linux", node="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", ...}) = 0
> open("/var/yp/nicknames", O_RDONLY)     = 3
> fstat(3, {st_mode=S_IFREG|0644, st_size=185, ...}) = 0
> mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
> 0x2a98807000
> read(3, "passwd\t\tpasswd.byname\ngroup\t\tgro"..., 4096) = 185
> read(3, "", 4096)                       = 0
> close(3)                                = 0
> munmap(0x2a98807000, 4096)              = 0
> open("/var/yp/binding/XXXXXXXXXXXXXXXXXXX.2", O_RDONLY) = 3
> pread(3, "\1\0\0\0\300\250\1\"\2\315\0\0", 12, 2) = 12
> socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 4
> getpid()                                = 13062
> bind(4, {sa_family=AF_INET, sin_port=htons(942), sin_addr=inet_addr("0.0.0.0")},
> 16) = 0
> ioctl(4, FIONBIO, [1])                  = 0
> setsockopt(4, SOL_IP, IP_RECVERR, [1], 4) = 0
> fcntl(4, F_SETFD, FD_CLOEXEC)           = 0
> close(3)                                = 0
> close(4)                                = 0
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
> bind(3, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")},
> 16) = 0
> connect(3, {sa_family=AF_INET, sin_port=htons(111),
> sin_addr=inet_addr("192.168.1.34")}, 16) = -1 ETIMEDOUT (Connection timed out)
> close(3)                                = 0
> socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3
> bind(3, {sa_family=AF_INET, sin_port=htons(943), sin_addr=inet_addr("0.0.0.0")},
> 16) = 0
> connect(3, {sa_family=AF_INET, sin_port=htons(111),
> sin_addr=inet_addr("192.168.1.34")}, 16 <unfinished ...>
>
> Then when I ^C it and run again it has failed over, but otherwise it hangs there
> for more than 300 seconds.
>
> --
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> -                                                               -
> - Jason Pyeron                      PD Inc. http://www.pdinc.us -
> - Principal Consultant              10 West 24th Street #100    -
> - +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
> -                                                               -
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This message is copyright PD Inc, subject to license 20080407P00.
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>   
How is your /etc/yp.conf defined.  NIS failover works flawlessly here if 
we have /etc/yp.conf like
ypserver nis2
ypserver nis

But have had problems if we use broadcast. :)



More information about the CentOS mailing list