Can’t Sync gitstack with Active Directory after testing LDAP

0
I am trying to syncronize gitstack with Active Directory accounts, but an exception is being thrown.  I tested the gitstack user credentials using another LDAP browser and the test LDAP function completes successfully in both the LDAP browser and the gitstack configuration page.  However after saving and testing credentials and trying to sync an exception is thrown. I am running Windows Server 2008 on both the AD machine and the git server. Any thoughts?   Thanks? Exception at /rest/settings/authentication/ldap/sync/ ‘cn’ Request Method: GET Request URL: http://git.company.com/rest/settings/authentication/ldap/sync/?_=1343853267842 Django Version: 1.4 Python Executable: C:\GitStack\apache\bin\httpd.exe Python Version: 2.7.2 Python Path: ['C:\\GitStack\\app', 'C:\\GitStack\\python\\lib\\site-packages\\rsa-3.0.1-py2.7.egg', 'C:\\GitStack\\python\\lib\\site-packages\\pyasn1-0.1.3-py2.7.egg', 'C:\\GitStack\\python\\lib', 'C:\\GitStack\\python\\python27.zip', 'C:\\GitStack\\python\\DLLs', 'C:\\GitStack\\python\\lib\\plat-win', 'C:\\GitStack\\python\\lib\\lib-tk', 'C:\\GitStack\\apache\\bin', 'C:\\GitStack\\python', 'C:\\GitStack\\python\\lib\\site-packages'] Server time: Wed, 1 Aug 2012 13:34:27 -0700 Installed Applications: (‘django.contrib.auth’, ‘django.contrib.contenttypes’, ‘django.contrib.sessions’, ‘django.contrib.sites’, ‘django.contrib.messages’, ‘django.contrib.staticfiles’, ‘gitstack’, ‘rest’) Installed Middleware: (‘django.middleware.common.CommonMiddleware’, ‘django.contrib.sessions.middleware.SessionMiddleware’, ‘django.middleware.csrf.CsrfViewMiddleware’, ‘django.contrib.auth.middleware.AuthenticationMiddleware’, ‘django.contrib.messages.middleware.MessageMiddleware’) Traceback: File “C:\GitStack\python\lib\site-packages\django\core\handlers\base.py” in get_response 111. response = callback(request, *callback_args, **callback_kwargs) File “C:\GitStack\app\rest\views.py” in rest_settings_authentication_ldap_sync 623. UserLdap.sync() Exception Type: Exception at /rest/settings/authentication/ldap/sync/ Exception Value: ‘cn’ Request information: GET: _ = u’1343853267842′ POST: No POST data FILES: No FILES data COOKIES: csrftoken = ‘jLwRdACK9NwAFgJXnjCObAEquAVsDsHA’ sessionid = ‘d421a551940593a6afdc469376a82508′ META: wsgi.multiprocess = False HTTP_REFERER = ‘http://git.company.com/gitstack/settings/authentication/’ SERVER_SOFTWARE = ‘Apache/2.2.22 (Win32) mod_ssl/2.2.22 OpenSSL/0.9.8u mod_wsgi/3.3 Python/2.7.2 PHP/5.4.3′ SCRIPT_NAME = u” mod_wsgi.handler_script = ” SERVER_SIGNATURE = ” REQUEST_METHOD = ‘GET’ PATH_INFO = u’/rest/settings/authentication/ldap/sync/’ SERVER_PROTOCOL = ‘HTTP/1.1′ QUERY_STRING = ‘_=1343853267842′ HTTP_ACCEPT_CHARSET = ‘ISO-8859-1,utf-8;q=0.7,*;q=0.3′ HTTP_USER_AGENT = ‘Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.60 Safari/537.1′ HTTP_CONNECTION = ‘keep-alive’ HTTP_COOKIE = ‘sessionid=d421a551940593a6afdc469376a82508; csrftoken=jLwRdACK9NwAFgJXnjCObAEquAVsDsHA’ SERVER_NAME = ‘git.company.com’ REMOTE_ADDR = ’192.168.0.6′ REMOTE_USER=$REDIRECT_REMOTE_USER = ” mod_wsgi.request_handler = ‘wsgi-script’ PATHEXT = ‘.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC’ wsgi.url_scheme = ‘http’ GIT_HTTP_EXPORT_ALL = ” PATH_TRANSLATED = ‘C:\\GitStack\\app\\app\\wsgi.py\\rest\\settings\\authentication\\ldap\\sync\\’ SERVER_PORT = ’80′ mod_wsgi.version = mod_wsgi.input_chunked = ’0′ GIT_PROJECT_ROOT = ‘C:/GitStack/repositories’ SERVER_ADDR = ’192.168.0.6′ DOCUMENT_ROOT = ‘C:/GitStack/apache/htdocs’ mod_wsgi.process_group = ” COMSPEC = ‘C:\\Windows\\system32\\cmd.exe’ HTTP_X_REQUESTED_WITH = ‘XMLHttpRequest’ SCRIPT_FILENAME = ‘C:/GitStack/app/app/wsgi.py’ SERVER_ADMIN = ‘admin@example.com’ wsgi.input = HTTP_HOST = ‘git.company.com’ mod_wsgi.callable_object = ‘application’ wsgi.multithread = True SystemRoot = ‘C:\\Windows’ REQUEST_URI = ‘/rest/settings/authentication/ldap/sync/?_=1343853267842′ HTTP_ACCEPT = ‘*/*’ WINDIR = ‘C:\\Windows’ wsgi.version = GATEWAY_INTERFACE = ‘CGI/1.1′ wsgi.run_once = False wsgi.errors = REMOTE_PORT = ’49528′ HTTP_ACCEPT_LANGUAGE = ‘en-US,en;q=0.8′ mod_wsgi.application_group = ‘*|’ mod_wsgi.script_reloading = ’1′ wsgi.file_wrapper = ” CSRF_COOKIE = ‘jLwRdACK9NwAFgJXnjCObAEquAVsDsHA’ HTTP_ACCEPT_ENCODING = ‘gzip,deflate,sdch’ Settings: Using settings module app.settings USE_L10N = True USE_THOUSAND_SEPARATOR = False CSRF_COOKIE_SECURE = False LANGUAGE_CODE = ‘en-us’ ROOT_URLCONF = ‘app.urls’ MANAGERS = DEFAULT_CHARSET = ‘utf-8′ STATIC_ROOT = ‘C:/GitStack/app/app/staticfiles/’ MESSAGE_STORAGE = ‘django.contrib.messages.storage.fallback.FallbackStorage’ EMAIL_SUBJECT_PREFIX = ‘[Django] ‘ FILE_UPLOAD_PERMISSIONS = None URL_VALIDATOR_USER_AGENT = ‘Django/1.4 (https://www.djangoproject.com)’ STATICFILES_FINDERS = SESSION_COOKIE_DOMAIN = None SESSION_COOKIE_NAME = ‘sessionid’ ADMIN_FOR = TIME_INPUT_FORMATS = DATABASES = {‘default’: {‘ENGINE’: ‘django.db.backends.sqlite3′, ‘TEST_MIRROR’: None, ‘NAME’: ‘C:/GitStack/data/data.db’, ‘TEST_CHARSET’: None, ‘TIME_ZONE’: ‘America/Chicago’, ‘TEST_COLLATION’: None, ‘PORT’: ”, ‘HOST’: ”, ‘USER’: ”, ‘TEST_NAME’: None, ‘PASSWORD’: u’********************’, ‘OPTIONS’: {}}} SERVER_EMAIL = ‘root@localhost’ FILE_UPLOAD_HANDLERS = DEFAULT_CONTENT_TYPE = ‘text/html’ APPEND_SLASH = True FIRST_DAY_OF_WEEK = 0 DATABASE_ROUTERS = [] YEAR_MONTH_FORMAT = ‘F Y’ STATICFILES_STORAGE = ‘django.contrib.staticfiles.storage.StaticFilesStorage’ CACHES = {‘default’: {‘LOCATION’: ”, ‘BACKEND’: ‘django.core.cache.backends.locmem.LocMemCache’}} INSTALL_DIR = ‘C:/GitStack’ SESSION_COOKIE_PATH = ‘/’ USE_X_FORWARDED_HOST = False MIDDLEWARE_CLASSES = USE_I18N = True THOUSAND_SEPARATOR = ‘,’ SECRET_KEY = u’********************’ LANGUAGE_COOKIE_NAME = ‘django_language’ DEFAULT_INDEX_TABLESPACE = ” TRANSACTIONS_MANAGED = False LOGGING_CONFIG = ‘django.utils.log.dictConfig’ SEND_BROKEN_LINK_EMAILS = False TEMPLATE_LOADERS = WSGI_APPLICATION = None TEMPLATE_DEBUG = True X_FRAME_OPTIONS = ‘SAMEORIGIN’ AUTHENTICATION_BACKENDS = ‘django.contrib.auth.backends.ModelBackend’ FORCE_SCRIPT_NAME = None CACHE_BACKEND = ‘locmem://’ SIGNING_BACKEND = ‘django.core.signing.TimestampSigner’ SESSION_COOKIE_SECURE = False CSRF_COOKIE_DOMAIN = None FILE_CHARSET = ‘utf-8′ DEBUG = True SESSION_FILE_PATH = None DEFAULT_FILE_STORAGE = ‘django.core.files.storage.FileSystemStorage’ INSTALLED_APPS = LANGUAGES = SETTINGS_PATH = ‘C:/GitStack/data/settings.ini’ COMMENTS_ALLOW_PROFANITIES = False STATICFILES_DIRS = PREPEND_WWW = False SECURE_PROXY_SSL_HEADER = None GIT_PATH = ‘C:/GitStack/git/bin/git.exe’ SESSION_COOKIE_HTTPONLY = True DEBUG_PROPAGATE_EXCEPTIONS = False LDAP_USERS_PATH = ‘C:/GitStack/data/ldapusers.json’ MONTH_DAY_FORMAT = ‘F j’ LOGIN_URL = ‘/registration/login/’ SESSION_EXPIRE_AT_BROWSER_CLOSE = False TIME_FORMAT = ‘P’ DATE_INPUT_FORMATS = CSRF_COOKIE_NAME = ‘csrftoken’ EMAIL_HOST_PASSWORD = u’********************’ PASSWORD_RESET_TIMEOUT_DAYS = u’********************’ CACHE_MIDDLEWARE_ALIAS = ‘default’ SESSION_SAVE_EVERY_REQUEST = False ADMIN_MEDIA_PREFIX = ‘/static/admin/’ NUMBER_GROUPING = 0 SESSION_ENGINE = ‘django.contrib.sessions.backends.db’ CSRF_FAILURE_VIEW = ‘django.views.csrf.csrf_failure’ CSRF_COOKIE_PATH = ‘/’ LOGIN_REDIRECT_URL = ‘/accounts/profile/’ LOGGING = {‘loggers’: {‘console’: {‘handlers’: ['console'], ‘level’: ‘DEBUG’}, ‘django.request’: {‘handlers’: ['mail_admins'], ‘propagate’: True, ‘level’: ‘ERROR’}}, ‘version’: 1, ‘disable_existing_loggers’: False, ‘filters’: {‘require_debug_false’: {‘()’: ‘django.utils.log.RequireDebugFalse’}}, ‘handlers’: {‘console’: {‘class’: ‘logging.StreamHandler’, ‘level’: ‘DEBUG’}, ‘mail_admins’: {‘class’: ‘django.utils.log.AdminEmailHandler’, ‘filters’: ['require_debug_false'], ‘level’: ‘ERROR’}}} IGNORABLE_404_URLS = LOCALE_PATHS = TEMPLATE_STRING_IF_INVALID = ” LOGOUT_URL = ‘/accounts/logout/’ EMAIL_USE_TLS = False FIXTURE_DIRS = EMAIL_HOST = ‘localhost’ DATE_FORMAT = ‘N j, Y’ MEDIA_ROOT = ” DEFAULT_EXCEPTION_REPORTER_FILTER = ‘django.views.debug.SafeExceptionReporterFilter’ ADMINS = FORMAT_MODULE_PATH = None DEFAULT_FROM_EMAIL = ‘webmaster@localhost’ MEDIA_URL = ” DATETIME_FORMAT = ‘N j, Y, P’ TEMPLATE_DIRS = ‘C:/GitStack/templates’ SITE_ID = 1 DISALLOWED_USER_AGENTS = ALLOWED_INCLUDE_ROOTS = DECIMAL_SEPARATOR = ‘.’ SHORT_DATE_FORMAT = ‘m/d/Y’ TEST_RUNNER = ‘django.test.simple.DjangoTestSuiteRunner’ CACHE_MIDDLEWARE_KEY_PREFIX = u’********************’ TIME_ZONE = ‘America/Chicago’ FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440 EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend’ DEFAULT_TABLESPACE = ” TEMPLATE_CONTEXT_PROCESSORS = SESSION_COOKIE_AGE = 1209600 SETTINGS_MODULE = ‘app.settings’ USE_ETAGS = False LANGUAGES_BIDI = FILE_UPLOAD_TEMP_DIR = None INTERNAL_IPS = STATIC_URL = ‘/static/’ EMAIL_PORT = 25 USE_TZ = False SHORT_DATETIME_FORMAT = ‘m/d/Y P’ PASSWORD_HASHERS = u’********************’ ABSOLUTE_URL_OVERRIDES = {} CACHE_MIDDLEWARE_SECONDS = 600 DATETIME_INPUT_FORMATS = GROUP_FILE_PATH = ‘C:/GitStack/data/groupfile’ EMAIL_HOST_USER = ” PROFANITIES_LIST = u’********************’ You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.
asked August 1, 2012
draposo
10

6 Answers

1
Turns out I needed this in the filter   objectClass=person  not objectClass=*
draposo
10
0
Make sure to click on the "Save" button before clicking on the synchronize button.
0
I definitely clicked on Save.  I tried it in two browsers as well.  IE 9 and Chrome (latest)  
draposo
10
0
Anyone have any thoughts on this?  Could it be the base DN even if my test settings are successful?    
draposo
10
0
Could you try to use : "sAMAccountName" instead of "cn" ?
0
I actually started with "sAMAccountName" first and then tried switching to cn.  could it be the starting point for my Base DN?
draposo
10

Your Answer

Please login to post questions.