You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Oliver Marshall <ol...@g2support.com> on 2009/01/19 20:37:49 UTC

[users@httpd] Sudden "Can't Contact LDAP Server"

Hi chaps,

I'm running a Ubuntu Apache server (apache version 2.2.8) which serves up only SVN and TRAC sites. All the SVN and TRAC repos use LDAP to authenticate, and the LDAP server is a Windows Active Directory server on the same network.

We are seeing a problem with the server giving end users an "internal error" page at random when viewing trac sites or checking out SVN files. If you hit F5 a few times, for between 1 and 10'ish seconds, the pages start being served up again. This isn't awful in a browser, but for people using SVN via a piece of client software, which may not have an F5 alternative, it's bad as they just get an error.

When this occurs the apache error.log shows very little other than "Can't contact ldap server". The debug listing from the error.log is below.

****************************
139874420-[Mon Jan 19 18:16:56 2009] [info] Initial (No.1) HTTPS request received for child 4 (server dev.company.com:443)
139874531-[Mon Jan 19 18:16:56 2009] [debug] mod_authnz_ldap.c(373): [client 10.1.37.13] [21455] auth_ldap authenticate: using URL ldap://10.1.37.250:389/OU=Users,OU=Company LLP,DC=company,DC=local?sAMAccountName?sub?(objectClass=*), referer: https://dev.company.com/trac/technical/report
139874804:[Mon Jan 19 18:16:56 2009] [warn] [client 10.1.37.13] [21455] auth_ldap authenticate: user john.blogs authentication failed; URI /trac/technical/newticket [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server], referer: https://dev.company.com/trac/technical/report
139875080-[Mon Jan 19 18:16:56 2009] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
139875196-[Mon Jan 19 18:16:56 2009] [info] [client 10.1.37.13] Connection closed to child 4 with standard shutdown (server dev.company.com:443)
139875329-[Mon Jan 19 18:16:56 2009] [info] [client 10.1.37.13] Connection to child 3 established (server dev.company.com:443)
****************************

When this happens, you *can* happily do an ldap-search from the terminal and get valid results, and other boxes which authenticate against the AD server all work fine during this time. It's just this one box.

The LDAP params we are using in the apache conf is;

*****************************
<Location />
  AuthType Basic
  AuthBasicProvider ldap
  AuthzLDAPAuthoritative on
  AuthLDAPBindDN "CN=LDAP USER,CN=Users,DC=company,DC=local"
  AuthLDAPBindPassword PASSWORD
  AuthLDAPURL "ldap://10.1.37.250:389/OU=Users,OU=Company LLP,DC=company,DC=local?sAMAccountName?sub?(objectClass=*)" NONE
  AuthLDAPGroupAttributeIsDN on
</Location>
*****************************

I've changed a few of the LDAP cacheing entries in order to rule out some kind of connection-limit issue, but that hasnt helped a bit. The LDAP config we are using now in apache2.conf is this;

*****************************
LDAPSharedCacheSize 200000
LDAPCacheEntries 2024
LDAPCacheTTL 3600
LDAPOpCacheEntries 2024
LDAPOpCacheTTL 600
LDAPConnectionTimeout 60

LDAPVerifyServerCert Off

<Location /ldap/cache-info>
          SetHandler ldap-status
</Location>
***************************

There's a few bugs on the Ubuntu site which relate mainly to the version of libgnutls13 (https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/306897). According to the results of "aptitude search libgnutls13" I'm already running that - that is to say that the results of that command show "i   libgnutls13" which I take to mean that libgnutls13 is installed. Also, we arent using SSL or TLS for the LDAP authentication between the ubuntu box and the LDAP server so I'm not sure it applies.

Any idea how I can find out more about what's happening or even better how I can resolve the issue? We've been at this about a week now, every day for 8 hours or more and could do with any advice you can give.

Olly

--
G2 Support
Online Backups

Email:  oliver.marshall@g2support.com<ma...@g2support.com>
Web:    http://www.g2support.com


Re: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Eric Covener <co...@gmail.com>.
On Tue, Jan 20, 2009 at 8:41 AM, Oliver Marshall
<ol...@g2support.com> wrote:
> Eric,
>
> If this were a bug, where's the best place to report it?

https://issues.apache.org/bugzilla/enter_bug.cgi?product=Apache%20httpd-2
but you might want to reproduce it on another Apache build first (to
rule out bugs in your distro)

>
> Also, is this the kind of thing that paid-for ubuntu support services would be able to resolve for us ?

Dunno.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Oliver Marshall <ol...@g2support.com>.
Eric,

If this were a bug, where's the best place to report it?

Also, is this the kind of thing that paid-for ubuntu support services would be able to resolve for us ?

Olly

-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: 19 January 2009 21:02
To: users@httpd.apache.org
Subject: Re: [users@httpd] Sudden "Can't Contact LDAP Server"

On Mon, Jan 19, 2009 at 3:56 PM, Oliver Marshall
<ol...@g2support.com> wrote:
> Eric,
>
> Reproducing it is possible, you just have to keep hitting f5, but it occurs at random. Maybe once ever hour, maybe once every ten mins. I would say that rebuilding the httpd server with a patch may be beyond me, certainly beyond my sanity level at the moment.
>
> I may look at setting up a packet trace tomorrow if I have time.
>
> In your opinion though, there's nothing up with the setup or the configuration bits I posted?
>

I don't think you have any kind of config problem, and it even looks
like the connection pool is not a problem since this is your first
request being handled.

When it fails, is it always preceded by that "first connection for child" msg?


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by paredes <pa...@aecom.yu.edu>.
Hi Eric!
It's an interesting issue since our education server has recently been 
exhibiting the same symptoms you describe [Can't contact LDAP Server]. 
We are running apache2.0.63 built with ldap & prefork support on osx 
10.5.5 [I've set up LDAP to fail thru to auth against mysql]. The LDAP 
server is a sun box. Our server has gotten extremely busy over the last 
month and that's when the LDAP strangeness started to happen. I rebuilt 
the server with apache2.0.58 and it made no difference. Our development 
server is built identically to the production server. Since it does not 
see heavy traffic it has never run into the LDAP issue. Swapping the 
servers causes the problem to appear on the other server.

Out of desperation I have a cron to periodically apachectl stop 
apachectl start the server until I can find out what's the issue. 
Unfortunately apachectl graceful does not "reset" LDAP. And like you, 
from the command line on the actual server that can't connect to LDAP I 
can issue a searchldap with a bind or not and it always successfully 
returns data from LDAP.

I've started to look for a substitute ldap module compatible with os-x & 
apache2.0.XX. I've also started to build apache2.2.11 to see what happens.

Bill Paredes
Computer Based Education
Albert Einstein College of Medicine

Oliver Marshall wrote:
> Here's another one. The first line, [info] Initial (No.1) HTTPS request received for child 1 (server dev.company.com:443), ALWAYS appears before the error occurs from what i can see in the logs.
>
>
> *************************
> 140295168-[Mon Jan 19 20:53:28 2009] [info] Initial (No.1) HTTPS request received for child 1 (server dev.company.com:443)
> 140295279-[Mon Jan 19 20:53:28 2009] [debug] mod_authnz_ldap.c(373): [client 86.132.127.13] [21424] auth_ldap authenticate: using URL ldap://10.1.37.250:389/OU=Users,OU=Company LLP,DC=company,DC=local?sAMAccountName?sub?(objectClass=*)
> 140295501:[Mon Jan 19 20:53:28 2009] [warn] [client 86.132.127.13] [21424] auth_ldap authenticate: user a.nother authentication failed; URI /trac/technical [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server]
> 140295714-[Mon Jan 19 20:53:28 2009] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
> 140295830-[Mon Jan 19 20:53:28 2009] [info] [client 86.132.127.13] Connection closed to child 1 with standard shutdown (server dev.company.com:443)
> **************************
>
>
> -----Original Message-----
> From: Eric Covener [mailto:covener@gmail.com] 
> Sent: 19 January 2009 21:02
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] Sudden "Can't Contact LDAP Server"
>
> On Mon, Jan 19, 2009 at 3:56 PM, Oliver Marshall
> <ol...@g2support.com> wrote:
>   
>> Eric,
>>
>> Reproducing it is possible, you just have to keep hitting f5, but it occurs at random. Maybe once ever hour, maybe once every ten mins. I would say that rebuilding the httpd server with a patch may be beyond me, certainly beyond my sanity level at the moment.
>>
>> I may look at setting up a packet trace tomorrow if I have time.
>>
>> In your opinion though, there's nothing up with the setup or the configuration bits I posted?
>>
>>     
>
> I don't think you have any kind of config problem, and it even looks
> like the connection pool is not a problem since this is your first
> request being handled.
>
> When it fails, is it always preceded by that "first connection for child" msg?
>
>
>   


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Oliver Marshall <ol...@g2support.com>.
Here's another one. The first line, [info] Initial (No.1) HTTPS request received for child 1 (server dev.company.com:443), ALWAYS appears before the error occurs from what i can see in the logs.


*************************
140295168-[Mon Jan 19 20:53:28 2009] [info] Initial (No.1) HTTPS request received for child 1 (server dev.company.com:443)
140295279-[Mon Jan 19 20:53:28 2009] [debug] mod_authnz_ldap.c(373): [client 86.132.127.13] [21424] auth_ldap authenticate: using URL ldap://10.1.37.250:389/OU=Users,OU=Company LLP,DC=company,DC=local?sAMAccountName?sub?(objectClass=*)
140295501:[Mon Jan 19 20:53:28 2009] [warn] [client 86.132.127.13] [21424] auth_ldap authenticate: user a.nother authentication failed; URI /trac/technical [LDAP: ldap_simple_bind_s() failed][Can't contact LDAP server]
140295714-[Mon Jan 19 20:53:28 2009] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
140295830-[Mon Jan 19 20:53:28 2009] [info] [client 86.132.127.13] Connection closed to child 1 with standard shutdown (server dev.company.com:443)
**************************


-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: 19 January 2009 21:02
To: users@httpd.apache.org
Subject: Re: [users@httpd] Sudden "Can't Contact LDAP Server"

On Mon, Jan 19, 2009 at 3:56 PM, Oliver Marshall
<ol...@g2support.com> wrote:
> Eric,
>
> Reproducing it is possible, you just have to keep hitting f5, but it occurs at random. Maybe once ever hour, maybe once every ten mins. I would say that rebuilding the httpd server with a patch may be beyond me, certainly beyond my sanity level at the moment.
>
> I may look at setting up a packet trace tomorrow if I have time.
>
> In your opinion though, there's nothing up with the setup or the configuration bits I posted?
>

I don't think you have any kind of config problem, and it even looks
like the connection pool is not a problem since this is your first
request being handled.

When it fails, is it always preceded by that "first connection for child" msg?


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Eric Covener <co...@gmail.com>.
On Mon, Jan 19, 2009 at 3:56 PM, Oliver Marshall
<ol...@g2support.com> wrote:
> Eric,
>
> Reproducing it is possible, you just have to keep hitting f5, but it occurs at random. Maybe once ever hour, maybe once every ten mins. I would say that rebuilding the httpd server with a patch may be beyond me, certainly beyond my sanity level at the moment.
>
> I may look at setting up a packet trace tomorrow if I have time.
>
> In your opinion though, there's nothing up with the setup or the configuration bits I posted?
>

I don't think you have any kind of config problem, and it even looks
like the connection pool is not a problem since this is your first
request being handled.

When it fails, is it always preceded by that "first connection for child" msg?


-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Oliver Marshall <ol...@g2support.com>.
Eric,

Reproducing it is possible, you just have to keep hitting f5, but it occurs at random. Maybe once ever hour, maybe once every ten mins. I would say that rebuilding the httpd server with a patch may be beyond me, certainly beyond my sanity level at the moment. 

I may look at setting up a packet trace tomorrow if I have time. 

In your opinion though, there's nothing up with the setup or the configuration bits I posted?

Olly

-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com] 
Sent: 19 January 2009 20:49
To: users@httpd.apache.org
Subject: Re: [users@httpd] Sudden "Can't Contact LDAP Server"


Can you easily reproduce this _and_ easily rebuild your httpd with a
patch? The current code retries in rapid succession without any delay.
Interesting that based on the context this seemed to happen on a "new"
child process.

I'd be interestedif you've ever been able to capture this under a
packet trace -- does the connection attempt ever hit the wire?

Finally, i'd expect openldap bugs would be the ones of interest,
unless I'm misunderstanding.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Sudden "Can't Contact LDAP Server"

Posted by Eric Covener <co...@gmail.com>.
On Mon, Jan 19, 2009 at 2:37 PM, Oliver Marshall
<ol...@g2support.com> wrote:
> Hi chaps,
> We are seeing a problem with the server giving end users an "internal error"
> page at random when viewing trac sites or checking out SVN files. If you hit
> F5 a few times, for between 1 and 10'ish seconds, the pages start being
> served up again. This isn't awful in a browser, but for people using SVN via
> a piece of client software, which may not have an F5 alternative, it's bad
> as they just get an error.
>
>
>
> When this occurs the apache error.log shows very little other than "Can't
> contact ldap server". The debug listing from the error.log is below.
>
>
>
> ****************************
>
> 139874420-[Mon Jan 19 18:16:56 2009] [info] Initial (No.1) HTTPS request
> received for child 4 (server dev.company.com:443)
>
> 139874531-[Mon Jan 19 18:16:56 2009] [debug] mod_authnz_ldap.c(373): [client
> 10.1.37.13] [21455] auth_ldap authenticate: using URL
> ldap://10.1.37.250:389/OU=Users,OU=Company
> LLP,DC=company,DC=local?sAMAccountName?sub?(objectClass=*), referer:
> https://dev.company.com/trac/technical/report
>
> 139874804:[Mon Jan 19 18:16:56 2009] [warn] [client 10.1.37.13] [21455]
> auth_ldap authenticate: user john.blogs authentication failed; URI
> /trac/technical/newticket [LDAP: ldap_simple_bind_s() failed][Can't contact
> LDAP server], referer: https://dev.company.com/trac/technical/report
>
> 139875080-[Mon Jan 19 18:16:56 2009] [debug] ssl_engine_kernel.c(1770):
> OpenSSL: Write: SSL negotiation finished successfully
>
> 139875196-[Mon Jan 19 18:16:56 2009] [info] [client 10.1.37.13] Connection
> closed to child 4 with standard shutdown (server dev.company.com:443)
>
> 139875329-[Mon Jan 19 18:16:56 2009] [info] [client 10.1.37.13] Connection
> to child 3 established (server dev.company.com:443)

Can you easily reproduce this _and_ easily rebuild your httpd with a
patch? The current code retries in rapid succession without any delay.
Interesting that based on the context this seemed to happen on a "new"
child process.

I'd be interestedif you've ever been able to capture this under a
packet trace -- does the connection attempt ever hit the wire?

Finally, i'd expect openldap bugs would be the ones of interest,
unless I'm misunderstanding.

-- 
Eric Covener
covener@gmail.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org