2015-11-06 65 views
5

從LDAP 1.4升級後無法進行AD登錄。在TRACE日誌中記錄以下錯誤消息:SonarQube 5.2,LDAP插件1.5:com4j.ComException

DEBUG web[o.s.p.l.w.WindowsUsersProvider] Requesting details for user: xxxxxx 
ERROR web[rails] Error from external users provider: exception Java::Com4j::ExecutionException: com4j.ComException: 8007203a Failed to MkParseDisplayName : The server is not operational. : .\com4j.cpp:217 

從sonar.properties中刪除LDAP設置沒有幫助。降級到LDAP 1.4後,所有事情都可以再次運行。我們錯過了一些配置設置嗎?

+0

在我們的環境中,我們在CN部分使用特殊字符:CN = Doe \\,John,OU = ...,DC = ... 。 –

+0

在Windows 7計算機上使用64位JavaSE 1.8(amd64)安裝了SonarQube 5.2和LDAP 1.5(sonar.security.realm = LDAP,ldap.servers = ...且沒有其他LDAP設置=> compatibilityMode = false)同一網絡:沒有錯誤!)。在2012 R2機器上使用相同的軟件和配置:錯誤。我們在web \ deploy \ plugins \ ldap \ META-INF \ lib中找到了從com4j-2.1.jar中提取的com4j-amd64.dll。只有在停止sonarqube後才能刪除。 –

+0

我發現這個問題:https://issues.jenkins-ci.org/browse/JENKINS-17718這可能是一個逃避問題? –

回答

2

LDAP插件1.5.1與修復此問題(LDAP-49發佈並提供下載從SonarQube的更新中心

參考SonarQube LDAP plugin documentation頁:

LDAP 1.5.1 - 12月2 ,2015 - 與SonarQube 5.2+兼容 針對Active Directory環境的錯誤修復

+0

謝謝;問題解決了! –

-1
Please go through the new changes and try the below mentioned settings. 

LDAP 1.5 plugin is using Waffle to support Windows Authentication and SSO on Windows OS. 
LDAP in Windows auth mode supports two ways of login from browser: 

1.Single sign On 
SSO will be performed on hitting any SonarQube url other than /sessions/login . 
Only domain users are supported through SSO. 

2.Form based login from /sessions/login page 
Domain users 
Login: <domain\alias> or [email protected] or alias 
Password: <domain credentials> 

Technical users 
Login: <username> 
Password: <password> 

On logout, users will be presented login page (/sessions/login), 
where he can choose to login as technical user or domain user by 
passing appropriate credentials. 

    For those users who are already using previous version of LDAP plugin to 
connect to Microsoft AD and have already defined authorization in terms of those 
users and group name use following settings in Windows OS: 


# LDAP configuration 
sonar.security.realm=LDAP 
ldap.windows.compatibilityMode=true 
sonar.log.level=DEBUG (For debugging purpose, remove this if you don't see any issue) 
ldap.windows.auth=true 

----------------------------------------------------------------------- 

Default protocol is NTLM which should work for most of the scenarios. 
Troubleshooting NTLM 
◦Enabling NTLM Logging 
http://goo.gl/3LhU6E 

If you want to use Kerberos "Negotiate" protocol please use the following steps. 

Negotiate Authentication Steps: 
For negotiate authentication to work make sure following steps are followed: 
1.Browser Configuration 
Waffle link: Configuring Browsers (IE/Firefox) 
https://goo.gl/vcPnrk 

2.Kerberos setup 
Make sure that user has privilege for Kerberos delegation 
setspn -L username 
To add preivileges to the current user run 
setspn -S HTTP/machine:port machine 
example: 
setspn -S HTTP/machine:9000 machine 

3.The SonarQube application is running as a service(NT service) 
Troubleshooting Resources 
1.Useful Kerberos troubleshooting resources 
◦Enabling Kerberos Logging 
http://support.microsoft.com/kb/262177/en-us 
◦Troubleshooting Kerberos Delegation 
http://www.microsoft.com/en-us/download/confirmation.aspx?id=4754 
+0

DEBUG web [o.s.p.l.w.WindowsUsersProvider]請求用戶的詳細信息:xxxxx TRACE web [sql] time = 0ms | sql = select cq.uuid ... TRACE web [sql] time = 0ms | sql = select cq.uuid ... TRACE web [sql] time = 0ms | sql = select cq.uuid ... TRACE web [sql] time = 0ms | sql = select cq.uuid ... 錯誤web [rails]外部用戶提供程序發生錯誤:異常Java :: Com4j :: ExecutionException:com4j.ComException:8007203a MkParseDisplayName失敗:服務器無法運行。 :。\ com4j.cpp:217 TRACE web [sql] time = 0ms | sql = SELECT t。* FROM(SELECT ROW_NUMBER().... DEBUG web [http] POST/sessions/login | time = .... ms –

+0

Windows 2012 R2 –

+0

sonar.security.realm = LDAP 聲納。 authenticator.downcase = true ldap.servers = A,B ldap.A.url = ldap:// A1:3268 ldap.A.user.baseDn = OU = ...,DC = ...,DC = ...,DC = ... ldap.A.user.request =(&(objectClass = user)(sAMAccountName = {login})) ldap.A.bindDn = ... ldap.A.bindPassword = ... ldap.A.group.baseDn = OU = ...,DC = ...,DC = ...,DC = ... ldap.A.group.request =(&(objectClass = group )(member = {dn})) ldap.A.group.idAttribute = sAMAccountName ldap.B.url = ldap:// B1:3268 ldap.B.user.baseDn = OU = ...,DC = ...,DC = ...,DC = ... .... ldap.B.group.idAttribute = sAMAccountName sonar.security .localUsers = .... –