Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins + Active Directory Authentication - Slow Login

I have a Jenkins master running on Windows 2008 SP2 set up with Active Directory authentication. The authentication is working fine and normally there is no issue with Login. Occasionally however Jenkins will take 4 to 5 minutes to log a user in. This seems to correlate with the amount of time a user has been inactive (i.e. A user who has not logged in for 2 or 3 weeks will experience extremely slow response when trying to log in).

Has anyone else experienced this behavior? I'm really not sure if I should start looking at active directory or Jenkins to troubleshoot this.

like image 525
CIGuy Avatar asked Aug 03 '12 22:08

CIGuy


2 Answers

The plugin maintainers actively suggest to enable logging (using "hudson.plugins.active_directory" to ALL) and file a bug if a problem happens.

like image 186
coffeebreaks Avatar answered Nov 14 '22 08:11

coffeebreaks


Jenkins slow login with Active directory seens to be almost alway's related to DNS issue. Check your dns Service (srv), NS, DomainDnsZones, _ldap.tcp.domaine.com, _gc._tcp.domaine.com and ForestDnsZone response from your AD/DNS server. If you can't reach all ip/port listed, you will face some random slow loggin (30 or 60 seconds, depend on the query) when the jenkins AD pluggins will try to query those servers/services.

You can easly trap the dns query with tcpdump or wireshark on your jenkin's server or on the DNS server.

tcpdump -i interface port 53

specifying sites can help you to make a potable workaround as that will limit slow loging to only bad result when querying inexistant/unreachable ip/port return by ForestDnsZone.

like image 1
wyzeman Avatar answered Nov 14 '22 08:11

wyzeman