kvspb / nginx-auth-ldap

LDAP authentication module for nginx
BSD 2-Clause "Simplified" License
735 stars 252 forks source link

Connecting to Active Directory #55

Open bwellsnc opened 10 years ago

bwellsnc commented 10 years ago

nginx - 1.6.1 latest nginx-auth-ldap built

The issue I am having is that nginx is saying it cannot connect to my active directory domain controllers. I am receiving this error:

2014/09/10 15:08:17 [debug] 28165#0: 5 http_auth_ldap: Authentication loop (phase=1, iteration=0) 2014/09/10 15:08:17 [debug] 28165#0: 5 http_auth_ldap: Wants a free connection to "activedirectory" 2014/09/10 15:08:17 [debug] 28165#0: *5 http_auth_ldap: No connection available at the moment, waiting...

Then I receive this in my error log:

2014/09/10 15:08:27 [error] 28165#0: *5 http_auth_ldap: Authentication timed out,

I have tried pointing to the global catalog address port and ldap port and I still cannot connect. I also have the caching variables configured, but this seems to do nothing. I have tried various username variations to connect and no go. I am curious if anyone has gotten this module to work with active directory.

Thanks!

calvinbui commented 9 years ago

I had the same issue running nginx on Ubuntu 14.04. Moving to CentOS 7 fixed it that 'no connections available at the moment' issue and it would no longer time out.

jbq commented 9 years ago

Same for me with nginx 1.4.6, and I notice with netstat that nginx issues hundreds of connections to the LDAP server (I set connections=200) but without reusing them... I'm banging my head on this to find out what's wrong. The server was running fine during the last month, and suddenly issues Authentication timed out errors, whereas I can login with ldapsearch on the command line.

jbq commented 9 years ago

See this bug report: https://github.com/kvspb/nginx-auth-ldap/issues/80

Double-check with ldapsearch on the command line that both your LDAP URL and binddn are valid.

jbq commented 9 years ago

I submitted a patch for issue #80 for you to have proper error messages in the logs and diagnose the issue yourself. The ticket can be closed now.