Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jenkins:org.sonarsource.scanner.api.internal.ScannerException:无法执行SonarQube_Sonarqube_Sonar Runner - Fatal编程技术网

Jenkins:org.sonarsource.scanner.api.internal.ScannerException:无法执行SonarQube

Jenkins:org.sonarsource.scanner.api.internal.ScannerException:无法执行SonarQube,sonarqube,sonar-runner,Sonarqube,Sonar Runner,使用sonar scanner失败并出现错误,尽管之前成功运行了“获取引导完成”步骤。看见 org.sonarsource.scanner.api.internal.ScannerException:无法执行SonarQube 更多详情: /opt/sonar-scanner/bin/sonar-scanner -X -Djavax.net.debug="ssl,handshake" -Dsonar.projectKey=project-header-forwarding -Dsonar.pro

使用sonar scanner失败并出现错误,尽管之前成功运行了“获取引导完成”步骤。看见

org.sonarsource.scanner.api.internal.ScannerException:无法执行SonarQube

更多详情:

/opt/sonar-scanner/bin/sonar-scanner -X -Djavax.net.debug="ssl,handshake" -Dsonar.projectKey=project-header-forwarding -Dsonar.projectName=project-header-forwarding -Dsonar.projectVersion=0.0.80 -Dsonar.sourceEncoding=UTF-8 -Dsonar.host.url=http://my-sonarsystem:9000 -Dsonar.projectBaseDir=/home/jenkins-master/workspace/project-header-forwarding_master
11:55:59.205 INFO: Scanner configuration file: /opt/sonar-scanner/conf/sonar-scanner.properties
11:55:59.221 INFO: Project root configuration file: NONE
11:55:59.270 INFO: SonarQube Scanner 2.8
11:55:59.270 INFO: Java 1.8.0_212 Oracle Corporation (64-bit)
11:55:59.270 INFO: Linux 3.10.0-957.12.2.el7.x86_64 amd64
11:55:59.560 DEBUG: keyStore is :
11:55:59.561 DEBUG: keyStore type is : jks
11:55:59.561 DEBUG: keyStore provider is :
11:55:59.561 DEBUG: init keystore
11:55:59.562 DEBUG: init keymanager of type SunX509
11:55:59.665 INFO: User cache: /home/wpci/.sonar/cache
11:55:59.665 DEBUG: Extract sonar-scanner-api-batch in temp...
11:55:59.680 DEBUG: Get bootstrap index...
11:55:59.680 DEBUG: Download: http://my-sonarsystem:9000/batch_bootstrap/index
11:55:59.962 DEBUG: Get bootstrap completed
11:55:59.969 INFO: ------------------------------------------------------------------------
11:55:59.970 INFO: EXECUTION FAILURE
11:55:59.970 INFO: ------------------------------------------------------------------------
11:55:59.971 INFO: Total time: 0.832s
11:56:00.014 INFO: Final Memory: 4M/178M
11:56:00.014 INFO: ------------------------------------------------------------------------
11:56:00.014 ERROR: Error during SonarQube Scanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarQube
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:84)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:71)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:71)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:67)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:218)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:156)
at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to download libraries from server
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:93)
at org.sonarsource.scanner.api.internal.Jars.download(Jars.java:70)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:39)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory$1.run(IsolatedLauncherFactory.java:75)
... 8 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonarsource.scanner.api.internal.Jars.downloadFiles(Jars.java:87)
... 11 more

您运行的Sonar Scanner版本与您的SonarQube版本不兼容

更具体地说,您正在使用的Sonar Scanner版本试图通过从SonarQube服务器的batch_bootstrap/index端点获取列表来下载相关的Scanner JAR,但在较新的SonarQube版本中,该版本被弃用,然后被删除,支持引导/索引,因此扫描程序正试图解析JAR的空列表

根据您正在运行的SonarQube的版本,更新到Sonar Scanner 4应该可以解决这一问题