Problem running Samba with IPv4 only network

Alexander Bokovoy ab at samba.org
Thu Jun 5 14:40:38 MDT 2014


On Thu, Jun 05, 2014 at 12:33:30PM -0700, Jeremy Allison wrote:
> On Fri, Jun 06, 2014 at 01:08:35AM +1000, Amitay Isaacs wrote:
> > Hi,
> > 
> > I am unable to run Samba AD on a kvm guest with only IPv4 network.  Tried
> > with 4.0.18 and 4.1.8.
> > Samba 4.0.16 worked with only IPv4 network.
> > 
> > I get following errors:
> > 
> > [2014/06/05 23:55:20.739512,  0]
> > ../source4/smbd/server.c:370(binary_smbd_main)
> >   samba version 4.1.8 started.
> >   Copyright Andrew Tridgell and the Samba Team 1992-2013
> > [2014/06/05 23:55:20.957613,  0]
> > ../source4/smbd/server.c:488(binary_smbd_main)
> >   samba: using 'standard' process model
> > [2014/06/05 23:55:20.977152,  0]
> > ../source4/cldap_server/cldap_server.c:122(cldapd_add_socket)
> >   Failed to bind to ipv6::::389 - NT_STATUS_INVALID_PARAMETER_MIX
> > [2014/06/05 23:55:20.977375,  0]
> > ../source4/smbd/service_task.c:35(task_server_terminate)
> >   task_server_terminate: [cldapd failed to setup interfaces]
> > [2014/06/05 23:55:20.975284,  0]
> > ../lib/util/become_daemon.c:136(daemon_ready)
> >   STATUS=daemon 'samba' finished starting up and ready to serve
> > connectionssamba_terminate: cldapd failed to setup interfaces
> > [2014/06/05 23:55:20.990163,  0]
> > ../source4/rpc_server/dcerpc_server.c:1708(add_socket_rpc_tcp_iface)
> >   service_setup_stream_socket(address=::,port=0) failed -
> > NT_STATUS_INVALID_PARAMETER_MIX
> > [2014/06/05 23:55:20.990330,  0]
> > ../source4/smbd/service_task.c:35(task_server_terminate)
> >   task_server_terminate: [Failed to startup dcerpc server task]
> > [2014/06/05 23:55:20.991856,  0]
> > ../source4/ldap_server/ldap_server.c:821(add_socket)
> >   ldapsrv failed to bind to :::389 - NT_STATUS_INVALID_PARAMETER_MIX
> > [2014/06/05 23:55:20.992026,  0]
> > ../source4/smbd/service_task.c:35(task_server_terminate)
> >   task_server_terminate: [Failed to startup ldap server task]
> > [2014/06/05 23:55:20.999891,  0] ../source4/kdc/kdc.c:672(kdc_add_socket)
> >   Failed to bind to :::88 TCP - NT_STATUS_INVALID_PARAMETER_MIX
> > [2014/06/05 23:55:21.000041,  0]
> > ../source4/smbd/service_task.c:35(task_server_terminate)
> >   task_server_terminate: [kdc failed to setup interfaces]
> > [2014/06/05 23:55:21.007175,  0]
> > ../source4/dns_server/dns_server.c:629(dns_add_socket)
> >   Failed to bind to :::53 TCP - NT_STATUS_INVALID_PARAMETER_MIX
> > [2014/06/05 23:55:21.007300,  0]
> > ../source4/smbd/service_task.c:35(task_server_terminate)
> >   task_server_terminate: [dns failed to setup interfaces]
> > [2014/06/06 00:00:15.306622,  0] ../source4/smbd/server.c:121(sig_term)
> >   Exiting pid 1961 on SIGTERM
> > 
> > 
> > Is there a magic incantation to make it work again for IPv4 only config?
> > Or now we always need IPv6 enabled to run Samba?
> 
> Yeah I think it's a bug - right now we're requiring
> a successful bind to both :: and 0.0.0.0 if HAVE_IPV6
> is detected at configure. Can you try the following
> patch (attached). Compiles but is not (yet :-) tested.
The patch looks fine; however, we would fail as well in smbd when IPv6
disabled in the Linux kernel as we would try to force IPV6_IPV6ONLY in
source3/lib/util_sock.c:open_socket_in() -- HAVE_IPV6 is there but
the stack is not enabled. There are some corporate security guides which
mandate disabling IPv6 stack if it is not in use (i.e. ipv6.disable=1
instead of ipv6.disable_ipv6=1 on Linux kernel cmdline).

One possible solution here is to recover and resort to IPv4 only on such
a failure.

-- 
/ Alexander Bokovoy


More information about the samba-technical mailing list