3403: Getting Something Broke error from the server Active Directory authentication with correct password.

shiv*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Oct. 30, 2014
What version are you running?

2.0.1

What's the URL of the page containing the problem?
http://reviewboard.ecosense.co.in

What steps will reproduce the problem?
1. Use a use who is in Active directory and added to reviewboard
2. Use the correct ad password 
3.

What is the expected output? What do you see instead?

The user should be logged in 
What operating system are you using? What browser?
Ubuntu 12.04 & Mozilla firefox

Please provide any additional information below.
chipx86
#1 chipx86
This sounds like a local problem in your company's installation, and not a bug. Are you the administrator at the company?
  • +NeedInfo
#2 shiv*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Yeah I'm the admin of both ad and reviewboard. When I use wrong password it work fine by showing error msg. But using correct password result in something broke msg.
chipx86
#3 chipx86
Anything in the reviewboard.log file? If there's a "Something Broke" message, you should have error information for me to go on.
#4 shiv*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Hi i enabled mail service on the reviewboard. and it sent me a mail on the failure of AD login of the user with trace.  I am pasting the error here. please do help me to solve the issue.

Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/handlers/base.py", line 112, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/views/decorators/debug.py", line 75, in sensitive_post_parameters_wrapper
    return view(request, *args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/utils/decorators.py", line 99, in _wrapped_view
    response = view_func(request, *args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/views/decorators/cache.py", line 52, in _wrapped_view_func
    response = view_func(request, *args, **kwargs)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/contrib/auth/views.py", line 36, in login
    if form.is_valid():

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/forms/forms.py", line 129, in is_valid
    return self.is_bound and not bool(self.errors)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/forms/forms.py", line 121, in errors
    self.full_clean()

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/forms/forms.py", line 274, in full_clean
    self._clean_form()

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/forms/forms.py", line 300, in _clean_form
    self.cleaned_data = self.clean()

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/contrib/auth/forms.py", line 189, in clean
    password=password)

  File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/contrib/auth/__init__.py", line 49, in authenticate
    user = backend.authenticate(**credentials)

  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.1-py2.7.egg/reviewboard/accounts/backends.py", line 652, in authenticate
    filter_format('(&(objectClass=user)(sAMAccountName=%s))',

NameError: global name 'filter_format' is not defined


<WSGIRequest
path:/account/login/,
GET:<QueryDict: {}>,
POST:<QueryDict: {u'username': [u'********************'], u'csrfmiddlewaretoken': [u'********************'], u'password': [u'********************'], u'next': [u'********************']}>,
COOKIES:{'csrftoken': 'TLdRU7OxUbrKxqi3JfyDpOEGnnkdsChe',
 'rbsessionid': 'sgucjsx6pt89rztr97m2y2blw0qsct1s'},
META:{'CONTENT_LENGTH': '94',
 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
 'CONTEXT_DOCUMENT_ROOT': '/var/www/reviewboard/htdocs',
 'CONTEXT_PREFIX': '',
 u'CSRF_COOKIE': u'TLdRU7OxUbrKxqi3JfyDpOEGnnkdsChe',
 'DOCUMENT_ROOT': '/var/www/reviewboard/htdocs',
 'GATEWAY_INTERFACE': 'CGI/1.1',
 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.5',
 'HTTP_CONNECTION': 'Keep-Alive',
 'HTTP_COOKIE': 'csrftoken=TLdRU7OxUbrKxqi3JfyDpOEGnnkdsChe; rbsessionid=sgucjsx6pt89rztr97m2y2blw0qsct1s',
 'HTTP_HOST': 'reviewboard.ecosense.co.in',
 'HTTP_REFERER': 'http://reviewboard.ecosense.co.in/account/login/',
 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0',
 'HTTP_X_FORWARDED_FOR': '42.104.24.166',
 'HTTP_X_FORWARDED_HOST': 'reviewboard.ecosense.co.in',
 'HTTP_X_FORWARDED_SERVER': 'reviewboard.ecosense.co.in',
 'PATH_INFO': u'/account/login/',
 'PATH_TRANSLATED': '/var/www/reviewboard/htdocs/reviewboard.wsgi/account/login/',
 'QUERY_STRING': '',
 'REMOTE_ADDR': '192.168.1.10',
 'REMOTE_PORT': '56371',
 'REQUEST_METHOD': 'POST',
 'REQUEST_SCHEME': 'http',
 'REQUEST_URI': '/account/login/',
 'SCRIPT_FILENAME': '/var/www/reviewboard/htdocs/reviewboard.wsgi',
 'SCRIPT_NAME': u'',
 'SERVER_ADDR': '192.168.1.9',
 'SERVER_ADMIN': '[no address given]',
 'SERVER_NAME': 'reviewboard.ecosense.co.in',
 'SERVER_PORT': '80',
 'SERVER_PROTOCOL': 'HTTP/1.1',
 'SERVER_SIGNATURE': '<address>Apache/2.4.7 (Ubuntu) Server at reviewboard.ecosense.co.in Port 80</address>\n',
 'SERVER_SOFTWARE': 'Apache/2.4.7 (Ubuntu)',
 'mod_wsgi.application_group': 'reviewboard.ecosense.co.in|',
 'mod_wsgi.callable_object': 'application',
 'mod_wsgi.enable_sendfile': '0',
 'mod_wsgi.handler_script': '',
 'mod_wsgi.input_chunked': '0',
 'mod_wsgi.listener_host': '',
 'mod_wsgi.listener_port': '80',
 'mod_wsgi.process_group': '',
 'mod_wsgi.queue_start': '1401973462400462',
 'mod_wsgi.request_handler': 'wsgi-script',
 'mod_wsgi.script_reloading': '1',
 'mod_wsgi.version': (3, 4),
 'wsgi.errors': <mod_wsgi.Log object at 0x7fe1b6c476b0>,
 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7fe19fae37b0>,
 'wsgi.input': <mod_wsgi.Input object at 0x7fe1b6c47fb0>,
 'wsgi.multiprocess': True,
 'wsgi.multithread': True,
 'wsgi.run_once': False,
 'wsgi.url_scheme': 'http',
 'wsgi.version': (1, 0)}>
david
#5 david
What version of python-ldap do you have installed?
#6 shiv*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I have used the latest version of python ldap, not sure about the version number.  do you have any specific version in mind.  I can try that out if required.  I will update the thread with specific version later.
david
#7 david
I'm not sure when exactly "filter_format" was introduced (python-ldap isn't great about their documentation).

Can you open a python command line and try running:
import ldap
from ldap import filter_format

And see what the results are?
#8 fearr******@serrealt******** (Google Code) (Is this you? Claim this profile.)
I just wanted to share what fixed this for me.

Background:
I have an automation script and it sets everything up with the install and/or migration.
In the script I had set this, as the machine is not on the domain and this was the fix (pre 2.0.3):
rb-site manage "/Path/To/Web/Root/ReviewboardSite/" set-siteconfig -- --key=auth_ad_domain_controller --value=OurDomainServer

Now I get the same Broken error and I tried adding:
rb-site manage "/Path/To/Web/Root/ReviewboardSite/" set-siteconfig -- --key=auth_ad_domain_name --value=OurLogonDomain

(this didn't fix it)

Fix:
Set the auth backend to builtin:
rb-site manage "/Path/To/Web/Root/ReviewboardSite/" set-siteconfig -- --key=auth_backend --value=builtin

Then go into the web admin pages (under authentication), switch back to active directory, and after verifying the info click save.
david
#9 david
  • -NeedInfo
    +SetupIssue