On Tue, Feb 2, 2016 at 11:25 AM, Sam Ruby <ru...@intertwingly.net> wrote:
>
> ... which means that the following returned an empty list:
>
> https://github.com/apache/whimsy/blob/master/lib/whimsy/asf/ldap.rb#L129
>
> And that code looks problematic.  The first thing I would suggest
> would be to remove the begin/rescue/return []/end lines, allowing
> whatever LDAP error occurs to bubble up.  It may turn out that there
> are errors that may be worth retrying (e.g. LDAP server goes down, try
> reconnecting).  If so, a much more focused rescue clause could be
> re-added.
>
>> Unfortunately the Whimsy log files are not kept for any length of time.
>
> There wouldn't be anything in the logs.  If, however, the exception
> weren't captured, that would be logged, and that result would trigger
> an email.

Here's the log:

HTTP/1.1 400 public_json ldap-people
["/srv/whimsy/lib/whimsy/asf/ldap.rb:129:in `search2': Time limit
exceeded (LDAP::ResultError)", "\tfrom
/srv/whimsy/lib/whimsy/asf/ldap.rb:129:in `search_one'", "\tfrom
/srv/whimsy/lib/whimsy/asf/ldap.rb:262:in `preload'", "\tfrom
roster/public_ldap_people.rb:25:in `<main>'"]

So... one LDAP server (my guess: ldaps://ldap2-us-west.apache.org:636)
times out.

Unfortunately, the exception raised isn't very specific, so the only
way to recover from it would be to look at the exception text.

Recovery could be trying another LDAP server.

Meanwhile, this exception should have prevented an empty people file,
the only affect (other than the alert) would be that an update made
during that time would not be reflected until the next time the cron
job fired.

This could also have been the cause for empty email addresses in the
reminder script.

- Sam Ruby

Reply via email to