2016-08-12 56 views
0

我正在使用Jenkins 2.8和Sonarqube Plugin 2.2.1。一週前,我們遇到了聲納服務器的問題,我們得到這個error。爲了解決這個問題,我們決定創建一個新的mysql模式並將其與聲納服務器連接起來。 我們做了這樣的事情:詹金斯錯誤:授權無法在sonarqube svn。

mysql –u root -plinux; 
create database sonarqube2 character set utf8; 
grant all privileges on sonarqube2.* to 'sonarsuer'@'localhost' identified by 'linux'; 
grant all privileges sonarqube2.* to 'sonaruser'@'%' identified by 'linux'; 
flush privileges; 

注:我們用我們在舊的數據庫

與sonar.properties和詹金斯配置新的數據更新sonar.jdbc.url後同一用戶我們設法再次部署sonarqube。然後,我們試圖推出,我們之前已經創建了一個SONAR的工作,我們得到這個錯誤:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) 

這是整個堆棧跟蹤:

[INFO] --- sonar-maven-plugin:2.6:sonar (default-cli) @ cas --- 
[INFO] SonarQube version: 5.0.1 
[WARNING] Invalid POM for org.samba.jcifs:jcifs-ext:jar:0.9.4, transitive dependencies (if any) will not be available, enable debug logging for more details 
INFO: Default locale: "es_ES", source code encoding: "UTF-8" (analysis is platform dependent) 
INFO: Work directory: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar 
INFO: SonarQube Server 5.0.1 
[INFO] [13:47:05.297] Load global referentials... 
[INFO] [13:47:05.751] Load global referentials done: 458 ms 
[INFO] [13:47:05.771] User cache: /home/tomcat/.sonar/cache 
[INFO] [13:47:05.801] Install plugins 
[INFO] [13:47:07.792] Install JDBC driver 
[INFO] [13:47:07.802] Create JDBC datasource for jdbc:mysql://myserver:3306/sonarqube2?useUnicode=true&characterEncoding=utf8 
[INFO] [13:47:11.353] Initializing Hibernate 
[ERROR] [13:47:15.591] No license for plugin views 
[INFO] [13:47:16.958] Load project referentials... 
[INFO] [13:47:18.003] Load project referentials done: 1045 ms 
[INFO] [13:47:18.003] Load project settings 
[INFO] [13:47:19.038] Loading technical debt model... 
[INFO] [13:47:19.097] Loading technical debt model done: 59 ms 
[INFO] [13:47:19.115] Apply project exclusions 
[INFO] [13:47:19.336] ------------- Scan CAS (Central Authentication Service) 
[INFO] [13:47:19.339] Load module settings 
[INFO] [13:47:21.334] Loading rules... 
[INFO] [13:47:23.049] Loading rules done: 1715 ms 
[INFO] [13:47:23.115] Configure Maven plugins 
[INFO] [13:47:23.367] No quality gate is configured. 
[INFO] [13:47:29.435] Initializer FindbugsMavenInitializer... 
[INFO] [13:47:29.437] Initializer FindbugsMavenInitializer done: 2 ms 
[INFO] [13:47:29.437] Base dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk 
[INFO] [13:47:29.437] Working dir: /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/sonar 
[INFO] [13:47:29.438] Source paths: src/main/webapp, pom.xml, src/main/java 
[INFO] [13:47:29.438] Test paths: src/test/java 
[INFO] [13:47:29.439] Binary dirs: target/classes 
[INFO] [13:47:29.439] Source encoding: UTF-8, default locale: es_ES 
[INFO] [13:47:29.439] Index files 
[INFO] [13:47:30.480] 36 files indexed 
[INFO] [13:47:31.213] Quality profile for java: Sonar way 
[INFO] [13:47:31.213] Quality profile for js: Sonar way 
[INFO] [13:47:31.300] JIRA issues sensor will not run as some parameters are missing. 
[INFO] [13:47:31.392] Sensor JavaSquidSensor... 
[INFO] [13:47:32.089] Java Main Files AST scan... 
[INFO] [13:47:32.094] 25 source files to be analyzed 
[INFO] [13:47:36.733] Java Main Files AST scan done: 4643 ms 
[INFO] [13:47:36.733] 25/25 source files analyzed 
[INFO] [13:47:36.746] Java bytecode scan... 
[INFO] [13:47:37.302] Java bytecode scan done: 556 ms 
[INFO] [13:47:37.305] Java Test Files AST scan... 
[INFO] [13:47:37.306] 5 source files to be analyzed 
[INFO] [13:47:37.626] 5/5 source files analyzed 
[INFO] [13:47:37.627] Java Test Files AST scan done: 321 ms 
[INFO] [13:47:37.633] Package design analysis... 
[INFO] [13:47:37.684] Package design analysis done: 51 ms 
[INFO] [13:47:37.801] Sensor JavaSquidSensor done: 6409 ms 
[INFO] [13:47:37.813] Sensor QProfileSensor... 
[INFO] [13:47:37.819] Sensor QProfileSensor done: 6 ms 
[INFO] [13:47:37.819] Sensor Maven dependencies... 
[INFO] [13:47:40.023] Sensor Maven dependencies done: 2204 ms 
[INFO] [13:47:40.026] Sensor JavaScriptSquidSensor... 
[INFO] [13:47:40.205] 6 source files to be analyzed 
[INFO] [13:47:45.590] 6/6 source files analyzed 
[INFO] [13:47:48.499] Sensor JavaScriptSquidSensor done: 8473 ms 
[INFO] [13:47:48.506] Sensor CoverageSensor... 
[INFO] [13:47:48.507] Sensor CoverageSensor done: 1 ms 
[INFO] [13:47:48.507] Sensor InitialOpenIssuesSensor... 
[INFO] [13:47:48.525] Sensor InitialOpenIssuesSensor done: 18 ms 
[INFO] [13:47:48.525] Sensor ProjectLinksSensor... 
[INFO] [13:47:48.557] Sensor ProjectLinksSensor done: 32 ms 
[INFO] [13:47:48.558] Sensor VersionEventsSensor... 
[INFO] [13:47:48.600] Sensor VersionEventsSensor done: 42 ms 
[INFO] [13:47:48.600] Sensor FileHashSensor... 
[INFO] [13:47:48.608] Sensor FileHashSensor done: 8 ms 
[INFO] [13:47:48.610] Sensor CoberturaSensor... 
[INFO] [13:47:48.616] parsing /u01/jenkins_home/jobs/SONAR - MC - Cas/workspace/trunk/target/site/cobertura/coverage.xml 
[INFO] [13:47:49.078] Sensor CoberturaSensor done: 468 ms 
[INFO] [13:47:49.078] Sensor SCM Sensor... 
[INFO] [13:47:49.089] SCM provider for this project is: svn 
[INFO] [13:47:49.089] Retrieve SCM blame information... 
[INFO] [13:47:49.218] 36 files to be analyzed 
[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD FAILURE 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 1:04.240s 
[INFO] Finished at: Fri Aug 12 13:47:54 CEST 2016 
[INFO] Final Memory: 58M/955M 
[INFO] ------------------------------------------------------------------------ 
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) -> [Help 1] 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project cas: The svn blame command [svn blame --xml --non-interactive -x -w src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java] failed: svn: OPTIONS of 'https://my_svn_server/svn/mycompanyxf/cas/trunk/src/main/java/net/mycompany/cas/CookieRetrievingCookieGeneratorPatch.java': authorization failed: Could not authenticate to server: rejected Basic challenge (https://my_svn_server) 

我應該改變aditional的憑證在詹金斯? 任何幫助,將不勝感激。

回答

0

有關如何使用sonar.svn.usernamesonar.svn.password.secured配置SVN身份驗證(這裏是失敗)的詳細信息,請參見SonarQube 5.0 SCM support documentation

(邊注:SonarQube 5.0是很老的和已知的有性能問題,你應該升級到最新的/ LTS版本)

+0

感謝您的答覆。我已經檢查過這些屬性,他們沒問題,就像我以前那樣。 – mestepa

+0

我剛剛找到解決方案。這不是一個解決方案,因爲它是因爲我做了一個解決方法。我會盡快更新問題 – mestepa

+0

您好,Iam面臨同樣的問題,您是否知道問題所在。您可以發佈workaroud。 – Ravi