title: Jenkins and Active Directory authentication
body: <p>we're trying to set up Jenkins to automate builds. We've used Hudson for a long time but now we're migrating to Jenkins because of the Active Directory authentication support. AD-plugin is already installed:
  <a href="https://wiki.jenkins-ci.org/display/JENKINS/Active+Directory+plugin" rel="nofollow">https://wiki.jenkins-ci.org/display/JENKINS/Active+Directory+plugin</a>
  As far as I can see, Jenkins is trying to connect to the AD server but gets "socket closed" error. Here's the part of the stack trace:</p>
  
  <pre><code>Failed to test the validity of the user name &lt;SOMEUSER&gt;
  org.acegisecurity.BadCredentialsException: Failed to retrieve user information for &lt;SOMEUSER&gt;; nested exception is javax.naming.ServiceUnavailableException: &lt;SOMENAME&gt;.&lt;SOMENAME&gt;:636; socket closed; remaining name 'DC=&lt;SOMENAME&gt;,DC=&lt;SOMENAME&gt;'
  at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.retrieveUser(ActiveDirectoryUnixAuthenticationProvider.java:306)
  at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.retrieveUser(ActiveDirectoryUnixAuthenticationProvider.java:190)
  at hudson.plugins.active_directory.ActiveDirectoryUnixAuthenticationProvider.retrieveUser(ActiveDirectoryUnixAuthenticationProvider.java:134)
  at hudson.plugins.active_directory.AbstractActiveDirectoryAuthenticationProvider.loadUserByUsername(AbstractActiveDirectoryAuthenticationProvider.java:30)
  </code></pre>
  
  <p>I'm 100% sure, that the credentials are correct. The server that runs Jenkins is in the domain, so from this point is everything OK.
  What I suppose is that Jenkins hides some error messages, therefore I'm not able to specify the problem precisely...</p>