SonarQube:java.lang.ArrayIndexOutOfBoundsException:索引 1 超出长度 1 的范围

SonarQube: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1

我正在尝试使用 SonarQube 8.9.1 和 sonar-运行ner 2.4 分析 Python 代码。 当我运行

/opt/sonar-runner-2.4/bin/sonar-runner -X

我得到以下结果:

SonarQube Runner 2.4
Java 11.0.11 Ubuntu (64-bit)
Linux 5.4.0-80-generic amd64
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /opt/sonar-runner-2.4/conf/sonar-runner.properties
INFO: Project configuration file: /data/Projects/momentum-git/AppsAws/RiskLambdaPoc/sonar-project.properties
INFO: Default locale: "en_ZA", source code encoding: "UTF-8"
INFO: Work directory: /data/Projects/momentum-git/AppsAws/RiskLambdaPoc/./.sonar
INFO: SonarQube Server 8.9.1.44547
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.365s
Final Memory: 1M/17M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
java.lang.IllegalStateException: Fail to download libraries from server
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
        at org.sonar.runner.impl.Jars.download(Jars.java:57)
        at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
        at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
        at org.sonar.runner.impl.BatchLauncher.run(BatchLauncher.java:71)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
        at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
        at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
        at org.sonar.runner.api.Runner.execute(Runner.java:100)
        at org.sonar.runner.Main.executeTask(Main.java:70)
        at org.sonar.runner.Main.execute(Main.java:59)
        at org.sonar.runner.Main.main(Main.java:53)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
        at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:72)
        ... 12 more

当我使用 org.sonarqube Gradle 插件版本分析 Java 1.8 代码时 (org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.6.2)它工作正常。

但我的 Python 代码不行。

请协助

用 sonar-scanner 替换 sonar-runner 解决了这个问题。 可以找到下载和配置here