[Samba] Ldap & socket error messages

Tanguy LEOST
2009-04-15T14:27:33Z

Hello,

I run a samba (v3.0.10) PDC and  openLdap server on the same machine.

They work fine, except sometimes the smb server cannot contact the ldap
server.

 From a windows client, it looks like the server
gets stuck, and it takes a few minutes before the shares
are available again.

In the /var/log/messages file, i get these error messages :
--------------------------------------------------------------------
Apr 15 05:59:42 pdc smbd[27260]: [2009/04/15 05:59:42, 0]
lib/smbldap.c:smbldap_search_suffix(1155)
Apr 15 05:59:42 pdc smbd[26860]:   failed to bind to server with dn=
cn=Manager,dc=mydomain,dc=fr Error: Can't contact LDAP server
Apr 15 05:59:42 pdc smbd[27261]: [2009/04/15 05:59:42, 0]
lib/smbldap.c:smbldap_search_suffix(1155)
Apr 15 05:59:42 pdc smbd[27214]:   ldapsam_search_one_group: Problem
during the LDAP search: LDAP error: (unknown) (Timed out)
Apr 15 05:59:42 pdc smbd[27254]:   smbldap_search_suffix: Problem during
the LDAP search: (unknown) (Timed out)
Apr 15 05:59:42 pdc smbd[27256]:   failed to bind to server with dn=
cn=Manager,dc=mydomain,dc=fr Error: Can't contact LDAP server
Apr 15 05:59:42 pdc smbd[27258]:   failed to bind to server with dn=
cn=Manager,dc=mydomain,dc=fr Error: Can't contact LDAP server
Apr 15 05:59:42 pdc smbd[27238]: [2009/04/15 05:59:42, 0]
lib/util_sock.c:write_socket(455)
Apr 15 05:59:42 pdc smbd[27249]:   getpeername failed. Error was Noeud
final de transport n'est pas connect?
Apr 15 05:59:42 pdc smbd[27251]:   getpeername failed. Error was Noeud
final de transport n'est pas connect?
Apr 15 05:59:42 pdc smbd[27243]: [2009/04/15 05:59:42, 0]
lib/util_sock.c:write_socket_data(430)
Apr 15 05:59:42 pdc smbd[27239]: [2009/04/15 05:59:42, 0]
lib/util_sock.c:write_socket(455)
Apr 15 05:59:42 pdc smbd[27244]: [2009/04/15 05:59:42, 0]
lib/util_sock.c:write_socket_data(430)
Apr 15 05:59:42 pdc smbd[27262]: [2009/04/15 05:59:42, 0]
lib/smbldap.c:smbldap_search_suffix(1155)
Apr 15 05:59:42 pdc smbd[27263]: [2009/04/15 05:59:42, 0]
lib/smbldap.c:smbldap_search_suffix(1155)
Apr 15 05:59:42 pdc smbd[27265]:        (unknown)
Apr 15 05:59:42 pdc smbd[27266]:        (unknown)
Apr 15 05:59:42 pdc smbd[17664]:        (unknown)
Apr 15 05:59:42 pdc smbd[27264]: [2009/04/15 05:59:42, 0]
lib/smbldap.c:smbldap_search_suffix(1155)
Apr 15 05:59:42 pdc smbd[27241]:   write_socket_data: write failure.
Error = Connexion r?-initialis?e par le correspondant
--------------------------------------------------------------------

This occurs from time to time ;
If I browse the /var/log/messages, I can see *lots* of
error messages that occur very frequently :

--------------------------------------------------------------------
Apr 15 14:22:14 pdc smbd[30373]: nss_ldap: reconnecting to LDAP server...
Apr 15 14:22:14 pdc smbd[30373]: nss_ldap: reconnected to LDAP server
after 1 attempt(s)
Apr 15 14:22:55 pdc smbd[972]: [2009/04/15 14:22:55, 0]
lib/util_sock.c:get_peer_addr(1000)
Apr 15 14:22:55 pdc smbd[972]:   getpeername failed. Error was Noeud
final de transport n'est pas connect?
Apr 15 14:22:55 pdc smbd[972]: [2009/04/15 14:22:55, 0]
lib/util_sock.c:get_peer_addr(1000)
Apr 15 14:22:55 pdc smbd[972]:   getpeername failed. Error was Noeud
final de transport n'est pas connect?
Apr 15 14:22:55 pdc smbd[972]: [2009/04/15 14:22:55, 0]
lib/util_sock.c:write_socket_data(430)
Apr 15 14:22:55 pdc smbd[972]:   write_socket_data: write failure. Error
= Connexion r?-initialis?e par le correspondant
Apr 15 14:22:55 pdc smbd[972]: [2009/04/15 14:22:55, 0]
lib/util_sock.c:write_socket(455)

(...)
Apr 15 14:23:05 pdc nmbd[30171]: [2009/04/15 14:23:05, 0]
nmbd/nmbd_packets.c:reply_netbios_packet(975)
Apr 15 14:23:05 pdc nmbd[30171]:   reply_netbios_packet: send_packet to
IP 169.254.2.2 port 137 failed

--------------------------------------------------------------------
(Connexion r?-initialis?e par le correspondant = connection reset by peer.)

Does anyone know what's going on ?
I don't know if the errors are related.
I don't know either why nmbd tries to contact 169.254.2.2, which
looks like a dummy address...


Thanks in advance for your help.


Tanguy