[Samba] Samba DC join fails - IPv4/IPv6 issue

Martinx - ジェームズ thiagocmartinsc at gmail.com
Fri Jul 18 16:06:28 MDT 2014


BUG opened at Launchpad:

https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1344400

Cheers!
Thiago


On 18 July 2014 18:13, Martinx - ジェームズ <thiagocmartinsc at gmail.com> wrote:

> Guys,
>
> I'm facing this problem too:
> https://lists.samba.org/archive/samba/2013-March/172230.html
>
> I have two Samba4 AC DC, in both located in my office, dual-stacked,
> working like a charm.
>
> Now, I need to deploy a third DC, located within Amazon EC2, which does
> NOT have IPv6.
>
> But, samba-tool fails to join.
>
> How can I workaround this, without enabling a tunneled IPv6 within my EC2 ?
>
> Exemplifying:
>
> 1- ubuntu-ad-1 - Master - ok - office LAN1 - IPv4 / IPv6
> 2- ubuntu-ad-2 - Slave - ok - office LAN2 - IPv4 / IPv6
>
> 3- ubuntu-ad-3 - Slave can't join - AWS - IPv4-Only
>
> ---
> root at ubuntu-ad-3:~# kinit administrator
> Password for administrator at CENTRAL.DOMAIN.COM.BR:
> Warning: Your password will expire in 40 days on Thu 28 Aug 2014 05:56:10
> PM UTC
> ---
>
> ---
> root at ubuntu-ad-3:~# samba-tool domain join central.domain.com.br DC
> -Uadministrator --realm=CENTRAL.DOMAIN.COM.BR --dns-backend=BIND9_DLZ
> Finding a writeable DC for domain 'central.domain.com.br'
> ERROR(exception): uncaught exception - Failed to find a writeable DC for
> domain 'central.domain.com.br'
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line
> 175, in _run
>     return self.run(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line
> 552, in run
>     machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1150, in
> join_DC
>     machinepass, use_ntvfs, dns_backend, promote_existing)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 76, in
> __init__
>     ctx.server = ctx.find_dc(domain)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 262, in
> find_dc
>     raise Exception("Failed to find a writeable DC for domain '%s'" %
> domain)
> ---
>
> Debugging it with `strace`, I'm seeing:
>
> ---
> strace -f -e trace=network samba-tool domain join CENTRAL.DOMAIN.COM.BR
> DC -Uadministrator --realm=CENTRAL.DOMAIN.COM.BR --dns-backend=BIND9_DLZ
> .....
> [pid  1533] +++ killed by SIGKILL +++
> --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_KILLED, si_pid=1533,
> si_status=SIGKILL, si_utime=0, si_stime=0} ---
> socket(PF_INET6, SOCK_DGRAM, IPPROTO_IP) = 5
> setsockopt(5, SOL_IPV6, IPV6_V6ONLY, [1], 4) = 0
> *connect(5, {sa_family=AF_INET6, sin6_port=htons(389), inet_pton(AF_INET6,
> "2001:1291:XXX:85Xa::66XX", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0},
> 28) = -1 ENETUNREACH (Network is unreachable)*
> ERROR(exception): uncaught exception - Failed to find a writeable DC for
> domain 'CENTRAL.DOMAIN.COM.BR'
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/__init__.py", line
> 175, in _run
>     return self.run(*args, **kwargs)
>   File "/usr/lib/python2.7/dist-packages/samba/netcmd/domain.py", line
> 552, in run
>     machinepass=machinepass, use_ntvfs=use_ntvfs, dns_backend=dns_backend)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 1150, in
> join_DC
>     machinepass, use_ntvfs, dns_backend, promote_existing)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 76, in
> __init__
>     ctx.server = ctx.find_dc(domain)
>   File "/usr/lib/python2.7/dist-packages/samba/join.py", line 262, in
> find_dc
>     raise Exception("Failed to find a writeable DC for domain '%s'" %
> domain)
> +++ exited with 255 +++
> ---
>
> So, how can I force samba-tool to use IPv4? Since ubuntu-ad-3 doesn't have
> IPv6...
>
> Thanks!
> Thiago
>


More information about the samba mailing list