Hah, well that's less than helpful. How about:

except:
    import traceback
    logging.warning("An error while LDAP-authenticating:")
    logging.warning(traceback.format_exc())

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Tue, May 19, 2009 at 5:42 PM, Alex <atrof...@gmail.com> wrote:

>
> I assume you were talking about the final except in authenticate
>
> 2009-05-19 17:41:31,822 - WARNING - An error while LDAP-
> authenticating:
> 2009-05-19 17:41:31,823 - WARNING - (<class
> exceptions.UnboundLocalError at 0xb7f396bc>,
> <exceptions.UnboundLocalError instance at 0x9f9d82c>, <traceback
> object at 0x9f70f04>)
>
>
> On May 19, 8:26 pm, Christian Hammond <chip...@chipx86.com> wrote:
> > An UnboundLocalError is when you reference a variable that hasn't been
> given
> > a value yet. That doesn't seem to be the case anywhere in that function.
> > Perhaps it's coming from inside ldap.
> >
> > If you can temporarily modify backends.py (this will require a web server
> > restart), try changing that final "except" to be:
> >
> > logging.warning("An error while LDAP-authenticating:")
> > logging.warning(sys.exc_info())
> >
> > And see what that says.
> >
> > Christian
> >
> > --
> > Christian Hammond - chip...@chipx86.com
> > Review Board -http://www.review-board.org
> > VMware, Inc. -http://www.vmware.com
> >
> > On Tue, May 19, 2009 at 5:08 PM, Alex <atrof...@gmail.com> wrote:
> >
> > > Heh sorry for all the posts. Now for some reason something is being
> > > written to the log. This is what is written if I try to login without
> > > the right LDAP credentials:
> > > 2009-05-19 16:54:45,246 - WARNING - LDAP error: The specified object
> > > does not exist in the Directory or provided invalid credentials:
> > > uid=atrofast
> >
> > > This is what it says if I use the right creds:
> > > 2009-05-19 16:54:59,739 - WARNING - An error while LDAP-
> > > authenticating: <exceptions.UnboundLocalError instance at 0x99de82c>
> >
> > > Being thrown in accounts/backend.py:91 I'm guessing since it passes
> > > the search.
> >
> > > On May 19, 7:45 pm, Alex <atrof...@gmail.com> wrote:
> > > > I ran a packet sniffer on port 389 and when I try to log in it DOES
> > > > talk to the LDAP server. Like you I'm not an expert on the LDAP
> > > > protocol so I'm not sure what the output actually signifies. At some
> > > > point RB decides to not use the LDAP credentials it seems.
> >
> > > > Alex
> >
> > > > On May 19, 7:23 pm, Alex <atrof...@gmail.com> wrote:
> >
> > > > > No after I actually restart apache I see the LDAP credentials I
> input.
> > > > > I disabled caching and I don't have to restart apache to see
> changes
> > > > > anymore so it seems the that particular issue is related to caching
> > > > > (used file caching).
> >
> > > > > Logging out and in again, it still doesn't use the LDAP server,
> just
> > > > > the standard auth which only has one user, the install created
> admin.
> > > > > Thanks !
> >
> > > > > Alex
> >
> > > > > On May 19, 6:53 pm, Christian Hammond <chip...@chipx86.com> wrote:
> >
> > > > > > I was pretty sure the restarting Apache issue was fixed. It's a
> bit
> > > worrying
> > > > > > that you're still seeing that.
> >
> > > > > > It does sound like it's never even getting to the LDAP
> > > authentication. So if
> > > > > > you set it to LDAP and then restart Apache and shift-reload the
> page,
> > > you
> > > > > > see Standard Auth again?
> >
> > > > > > Christian
> >
> > > > > > --
> > > > > > Christian Hammond - chip...@chipx86.com
> > > > > > Review Board -http://www.review-board.org
> > > > > > VMware, Inc. -http://www.vmware.com
> >
> > > > > > On Tue, May 19, 2009 at 3:47 PM, Alex <atrof...@gmail.com>
> wrote:
> >
> > > > > > > I turned on logging and the only thing I get in there is this
> (I
> > > > > > > upgraded to 1.0rc3 to see if something changed):
> > > > > > > 2009-05-19 15:33:48,928 - INFO - Logging to /var/www/
> > > > > > > inspect.ingres.com/logs/reviewboard.log with a minimum level
> of
> > > DEBUG
> > > > > > > 2009-05-19 15:33:48,929 - INFO - Log file for Review Board
> v1.0rc3
> >
> > > > > > > It seems to me like it's not using the settings I gave it under
> > > > > > > authentication. Also having to restart apache to see the
> changes
> > > seems
> > > > > > > a little odd to me as well.
> > > > > > > I'm authenticating towards an OpenLDAP I believe
> >
> > > > > > > On May 19, 2:15 pm, Christian Hammond <chip...@chipx86.com>
> wrote:
> > > > > > > > If you turn on logging, there should be some information
> provided
> > > in the
> > > > > > > log
> > > > > > > > file for the reason that the LDAP auth is failing. That'd be
> the
> > > first
> > > > > > > > start.
> >
> > > > > > > > I'm not an expert on LDAP, so I can't really say too much on
> what
> > > might
> > > > > > > be
> > > > > > > > wrong, but maybe the answer will be in the log file.
> >
> > > > > > > > Which LDAP server?
> >
> > > > > > > > Christian
> >
> > > > > > > > --
> > > > > > > > Christian Hammond - chip...@chipx86.com
> > > > > > > > Review Board -http://www.review-board.org
> > > > > > > > VMware, Inc. -http://www.vmware.com
> >
> > > > > > > > On Tue, May 19, 2009 at 10:08 AM, Alex <atrof...@gmail.com>
> > > wrote:
> >
> > > > > > > > > Greetings,
> >
> > > > > > > > > I have ReviewBoard 1rc2 and Django 1.0.2 installed on
> RHEL5,
> > > Python
> > > > > > > > > 2.4. In the administration menu I have set authentication
> to
> > > use LDAP
> > > > > > > > > pointing to an LDAP server on the internal network. This
> server
> > > does
> > > > > > > > > not allow anonymous binding so I've provided bind_dn and
> > > bind_passwd
> > > > > > > > > in the Anonymous fields. If I use these credentials in
> python
> > > on a
> > > > > > > > > command line it works just fine. When I save the settings,
> they
> > > are
> > > > > > > > > not always visible on settings, but if I restart apache
> they
> > > proper
> > > > > > > > > settings will show. Now the problem I'm really having is
> that
> > > > > > > > > reviewboard isn't using the LDAP server for authentication.
> I
> > > still
> > > > > > > > > only have access to the original user created with the
> install
> > > > > > > > > (admin). Any other attempt fails. Are there any
> thoughts/help
> > > on this?
> > > > > > > > > Thank you very much.
> >
> > > > > > > > > Alex Trofast
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to