Sonar Scanner engine is not started

风流意气都作罢 提交于 2020-01-13 19:14:10

问题


I follow the instruction at Analyzing with SonarQube Scanner for Ant to analyzing an ant project and got following error:

Buildfile: C:\Projects\my-sonar\build.xml
     [echo] Build properties read from build.properties
clean:
sonar:
[sonar:sonar] Apache Ant(TM) version 1.9.4 compiled on April 29 2014
[sonar:sonar] SonarQube Ant Task version: 2.5
[sonar:sonar] Loaded from: file:/C:/Projects/my-sonar/.ant/lib/sonarqube-ant-task-2.5.jar
[sonar:sonar] User cache: C:\Users\test\.sonar\cache
[sonar:sonar] Load global settings

BUILD FAILED
C:\Projects\my-sonar\build.xml:541: java.lang.IllegalStateException: Scanner engine is not started. Unable to execute task.

I'm using JDK 1.8 and connecting to a remote SonarQube server.

Do I have to start sonar-scanner as a service locally?

Any helps are appreciated.

UPDATE:

This works after adding "sonar.login" & "sonar.password" in build.xml. The error message is kind of misleading...


回答1:


I received the exact same log message from the production environment. The configuration works in the test environment. The issue was credentials. I agree with your update, "The error message is kind of misleading..."

In my case the SonarQube token was incorrect in the sonar-project.properties file. I corrected the token and reran the analysis successfully.




回答2:


Instead of adding "sonar.login" & "sonar.password", it would be better to generate a token and just add sonar.login property. Password is not required if an authentication token is being used. This is how a token can be generated.



来源:https://stackoverflow.com/questions/45039524/sonar-scanner-engine-is-not-started

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!