1 (edited by codexwilkes 2012-10-05 01:56:10)

Topic: [Solved] LDAP bind fails -- was 127.0.0.1 deny problem

Using iRedmail .72, Ubuntu 10.04, LDAP.

Encountering these fatal errors:
postfix/proxymap[5875]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=codexwilkes,dc=com: -1 (Can't contact LDAP server)
postfix/trivial-rewrite[6103]: fatal: proxy:ldap:/etc/postfix/ldap_virtual_alias_maps.cf(0,lock|fold_fix): table lookup problem

OpenLAP is running (have tried restarting), and I can browse LDAP using Apache Directory Studio using the same credentials.  What else should I be looking for?

2

Re: [Solved] LDAP bind fails -- was 127.0.0.1 deny problem

By way of context, this is a long running server, and there have been no mail config changes.  I have increased the debug level in ldap_virtual_alias_maps.cf to 1 but I can't see anything in the logs which point to the problem.


09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_create
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_url_parse_ext(ldap://127.0.0.1:389)
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_sasl_bind
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_send_initial_request
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_new_connection 1 1 0
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_int_open_connection
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_connect_to_host: TCP 127.0.0.1:389
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_new_socket: 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_prepare_socket: 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_connect_to_host: Trying 127.0.0.1:389
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_pvt_connect: fd: 9 tm: 10 async: 0
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_ndelay_on: 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_int_poll: fd: 9 tm: 10
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_is_sock_ready: 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_ndelay_off: 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_pvt_connect: 0
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_open_defconn: successful
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_send_server_request
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ber_scanf fmt ({it) ber:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ber_scanf fmt ({i) ber:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ber_flush2: 74 bytes to sd 9
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_result ld 0x7f3d4c031340 msgid 1
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: wait4msg ld 0x7f3d4c031340 msgid 1 (timeout 10000000 usec)
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: wait4msg continue ld 0x7f3d4c031340 msgid 1 all 1
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ** ld 0x7f3d4c031340 Connections:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: * host: 127.0.0.1  port: 389  (default)
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:   refcnt: 2  status: Connected
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:   last used: Thu Oct  4 09:43:21 2012
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ** ld 0x7f3d4c031340 Outstanding Requests:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:  * msgid 1,  origid 1, status InProgress
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:    outstanding referrals 0, parent count 0
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:   ld 0x7f3d4c031340 request count 1 (abandoned 0)
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ** ld 0x7f3d4c031340 Response Queue:
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:    Empty
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug:   ld 0x7f3d4c031340 response count 0
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_chkResponseList ld 0x7f3d4c031340 msgid 1 all 1
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_chkResponseList returns ld 0x7f3d4c031340 NULL
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_int_select
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: read1msg: ld 0x7f3d4c031340 msgid 1 all 1
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ber_get_next
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: dict_ldap_debug: ldap_err2string
Oct  4 09:43:21 perotinus postfix/proxymap[7836]: warning: dict_ldap_connect: Unable to bind to server ldap://127.0.0.1:389 as cn=vmail,dc=codexwilkes,dc=com: -1 (Can't contact LDAP server)

3

Re: [Solved] LDAP bind fails -- was 127.0.0.1 deny problem

Well, the problem turned out to be simple: for some reason all connections to 127.0.0.1 were being blocked (via /etc/hosts.deny).  My LDAP test was invalid because I was addressing a different (cached) IP.  And, slapd was only the first error, not the only error, which confused me initially.