Skip to content

LDAP Configuration Breaks gitlab-ctl reconfigure

I'm testing out a new install of Gitlab Community Edition 7.5.3 Omnibus for Centos 6.6.

After setting up https access to my new site and confirming it works with the default admin account, I wanted to setup LDAP auth against our Active Directory. Adding in the LDAP configuration and then running gitlab-ctl reconfigure errors out and causes unicorn to hang.

My /etc/gitlab/gitlab.rb file is below:

external_url 'https://fqdn.subdomain.domain.com'
nginx['redirect_http_to_https'] = true
gitlab_rails['ldap_enabled'] = true
gitlab_rails['ldap_servers'] = YAML.load <<-EOS
main:
label: 'test'
host: 'ldap.domain.com'
port: 389
uid: 'sAMAccountName'
method: 'plain'
bind_dn: 'CN=user,OU=Utility,OU=People,DC=subdomain1,DC=subdomain2,DC=com'
password: 'password'
active_directory: true
allow_username_or_email_login: false
base: ''
user_filter: ''
EOS

The reconfigure dies with the following message:

/opt/gitlab/embedded/service/gitlab-rails/config/initializers/1_settings.rb:71:in block in <top (required)>': undefined method []' for nil:NilClass (NoMethodError)

The Unicorn current log contains a neverending stream of:

2014-12-08_22:23:59.74200 master failed to start, check stderr log for details 2014-12-08_22:24:00.74767 failed to start a new unicorn master 2014-12-08_22:24:00.75248 starting new unicorn master

If I remove the LDAP block and restart everything, the system fucntions normally. As far as I can tell, I am using the right syntax for the LDAP configuration. Is there something I'm missing or am I hitting a bug?