In use ports

Ricky Nance ricky.nance at
Wed Jan 1 09:49:02 MST 2014

I thought this was patched some time ago, but it seems like samba still
isn't terminating properly when a port is already in use that it needs.
Samba still wants to just throw the error NT_STATUS_ADDRESS_ALREADY_ASSOCIATED

If you look at the attached file, it dies, but leaves a lingering samba and
a couple of smbd processes running. To a new user, this may look normal.
Also samba-tool processes lists them as running too (is that a separate

If this is the expected behavior I am fine with that, but would like to
know. I have see a few very frustrated users in the IRC channel because of

Below is the thread where this was originally talked about.

Also here is the bug report for it...

-------------- next part --------------
root at ubuntu:~/samba-master# ps ax | grep slapd
  691 pts/1    S+     0:00 grep --color=auto slapd
 3200 ?        Ssl    0:00 /usr/sbin/slapd -h ldap:/// ldapi:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
root at ubuntu:~/samba-master# ps ax | grep samba
  693 pts/1    S+     0:00 grep --color=auto samba
root at ubuntu:~/samba-master# samba -V
Version 4.2.0pre1-GIT-e6afeae
root at ubuntu:~/samba-master# samba
root at ubuntu:~/samba-master# ps ax | grep samba
  697 ?        S      0:00 samba
  702 ?        Ss     0:00 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground
  717 ?        S      0:00 /usr/local/samba/sbin/smbd -D --option=server role check:inhibit=yes --foreground
  722 pts/1    S+     0:00 grep --color=auto samba
root at ubuntu:~/samba-master# tail -n 30 /usr/local/samba/var/log.samba
[2014/01/01 10:26:16.498943,  0] ../source4/smbd/server.c:370(binary_smbd_main)
  samba version 4.2.0pre1-GIT-e6afeae started.
  Copyright Andrew Tridgell and the Samba Team 1992-2013
[2014/01/01 10:26:17.628894,  0] ../source4/smbd/server.c:492(binary_smbd_main)
  samba: using 'standard' process model
[2014/01/01 10:26:17.796743,  0] ../source4/lib/tls/tlscert.c:70(tls_cert_generate)
  Attempting to autogenerate TLS self-signed keys for https for hostname 'UBUNTU.some.lan'
[2014/01/01 10:26:17.940465,  0] ../source4/lib/tls/tlscert.c:166(tls_cert_generate)
  TLS self-signed keys generated OK
[2014/01/01 10:26:18.651964,  0] ../source4/smbd/service_stream.c:346(stream_setup_socket)
[2014/01/01 10:26:18.652162,  0] ../source4/ldap_server/ldap_server.c:821(add_socket)
  ldapsrv failed to bind to - NT_STATUS_ADDRESS_ALREADY_ASSOCIATED
[2014/01/01 10:26:18.652284,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [Failed to startup ldap server task]
[2014/01/01 10:26:18.753418,  0] ../source4/smbd/server.c:211(samba_terminate)
  samba_terminate: Failed to startup ldap server task
root at ubuntu:~/samba-master# samba-tool processes
 Service:                PID
dnsupdate                710
nbt_server               699
rpc_server               698
cldap_server             703
winbind_server           706
kdc_server               704
samba                      0
dreplsrv                 705
kccsrv                   709

More information about the samba-technical mailing list