
我的 Jenkins 建置呼叫一個 Sonar 任務,該任務從 Jira 中提取已儲存過濾器的結果。我遇到的問題是聲納的請求總是被拒絕。我有一個相當複雜的機器叢集(Jira 4.4.3、Sonar 3.2.1、Jenkins 1.473 等),全部透過 Crowd 2.2.2 進行身份驗證。
2012.10.17 12:00:03 INFO c.a.c.i.s.s.c.SecurityServerClientImpl Existing application token is null, authenticating ...
2012.10.17 12:00:03 ERROR o.c.x.t.h.HttpChannel Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details
2012.10.17 12:00:03 ERROR rails Error from external authenticator: org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details
我已驗證 Sonar 用於聯絡 Jira 的帳戶有效且有權存取 Jira。我已經安裝了 Sonar Crowd 插件並根據文件,但有些不對勁。當我登入 Sonar 時,我在 sonar.log 中看到以下錯誤(但我登入成功):
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Loading property: 'application.name' : 'sonar'
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Failed to find value for property: application.login.url
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Loading property: 'crowd.server.url' : 'http://10.74.47.120:8095/crowd/services/'
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Failed to find value for property: session.isauthenticated
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Failed to find value for property: session.tokenkey
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Failed to find value for property: session.lastvalidation
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.ClientPropertiesImpl Loading property: 'session.validationinterval' : '5'
2012.10.17 15:49:53 INFO c.a.c.i.s.s.c.SecurityServerClientImpl Existing application token is null, authenticating ...
2012.10.17 15:49:54 ERROR o.c.x.t.h.HttpChannel Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details
2012.10.17 15:49:54 ERROR rails Error from external authenticator: org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Server returned error code = 403 for URI : http://10.74.47.12:8095/crowd/services/SecurityServer. Check server logs for details
- 關鍵點:
- Crowd 伺服器上的伺服器日誌沒有告訴我任何資訊。即使到達 Crowd,也沒有 Sonar 身份驗證請求的記錄。
- 我已經在 sonar-3.2.1/conf/sonar.properties 和 Sonar-Tomcat/conf/crowd.properties 中定義了 application.login.url,但 sonar.log 沒有拾取它。
- Sonar 從 sonar-3.2.1/conf/sonar.properties 中取得一些資訊。我更改了 crowd.url 以查看聲納是否會記錄更改,結果確實如此。
- session.validationinterval 在 Sonar-Tomcat/conf/crowd.properties 中定義為 0,但 sonar.log 顯示 session.validationinterval 為 5。
http://10.74.47.12:8095/crowd/services/SecurityServer
是一個有效的 URL,並且那裡有一個可用的 SOAP 伺服器。
我還安裝了 Jenkins Crowd 插件和 Jenkins Jira 插件,我沒有看到任何問題。
有其他人嘗試過這個嗎?
答案1
:) 我有一個答案給你!一週前我發現這個時我很興奮。我有類似的問題。
http://wiki.idalko.com/display/SONAUT/Sonar+Authenticator+for+JIRA
這個人分叉了程式碼並修復了它以與 Jira 嵌入式人群一起使用。我現在正在將它部署到測試伺服器......它對我來說非常有用!