我正在使用MSBuild。我安装了Java 8。
我正在运行以下命令:
SonarQube.Scanner.MSBuild.exe begin /k:"ABC" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92" /d:sonar.verbose=true
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\msbuild.exe" /t:rebuild
SonarQube.Scanner.MSBuild.exe end /d:sonar.login="8b839xxxxxxxxxxxxxxxxxxxxxxx6b00125bf92"最后一步失败了:
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
12:53:21.909 Creating a summary markdown file...
12:53:21.918 Post-processing failed. Exit code: 1MSBuild版本大于14。
正确安装了Java 8。文档表明Java 8是足够的。
更新:我安装了Java 9。问题仍然是一样的。Update :使用详细日志记录并使用/n命名参数:
INFO: Analysis report generated in 992ms, dir size=4 MB
INFO: Analysis reports compressed in 549ms, zip size=1 MB
INFO: Analysis report generated in C:\ABC\.sonarqube\out\.sonar\scanner-report
DEBUG: Upload report
DEBUG: POST 400 http://localhost:9000/api/ce/submit?projectKey=ABC | time=1023ms
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 54.833s
INFO: Final Memory: 51M/170M
INFO: ------------------------------------------------------------------------
DEBUG: Execution getVersion
DEBUG: Execution stop
ERROR: Error during SonarQube Scanner execution
ERROR: The 'report' parameter is missing
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
Process returned exit code 1
The SonarQube Scanner did not complete successfully
Creating a summary markdown file...
Post-processing failed. Exit code: 1发布于 2019-02-09 17:30:38
我在SonarQube中遇到了同样的问题,我终于找到了一个解决方案:您需要在使用评估令牌之后重新启动声纳服务。
发布于 2018-04-17 18:41:01
请注意这不是答案,但是我觉得这个反馈对于回答这个问题是有价值的。
http://localhost:9000/api/ce/submit?projectKey=myProjectKey
这会返回
{
"errors": [
{
"msg": "The 'report' parameter is missing"
}
]
}通过删除projectKey查询参数,可以获得类似的错误。我尝试添加一个report查询参数,并收到了相同的错误:
http://localhost:9000/api/ce/submit?projectKey=brian3016&report=report
考虑到这一点,我觉得他们的代码有问题。在创建POST请求时,它应该包含一个报表参数,但是它没有这样做。
-X开关更改为/d:sonar.verbose=true。例如:SonarScanner.MSBuild.exe begin /k:"myProjectKey“/d:sonar.host.url="http://localhost:9000”/d:sonar.login="myLogin“/d:sonar.verbose=true
注意,冗长的日志记录没有给我任何有价值的洞察力。
(还请注意,文档目前说要使用SonarQube.Scanner.MSBuild.exe,但是详细的记录器告诉我切换到SonarScanner.MSBuild.exe)
发布于 2021-02-02 07:26:14
在我的例子中,SonarQube 7.9.1 (与Helm一起部署到Kubernetes集群)在Helm回滚后缺少临时目录/opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT。不知道怎么回事。
日志文件/opt/sonarqube/logs/web.log在SonarQube pod中有以下错误:
2021.02.02 06:57:03 WARN web[AXdZ6l6MParQCncJACv3][o.s.s.w.ServletRequest] Can't read file part for parameter report
java.io.IOException: The temporary upload location [/opt/sonarqube/temp/tc/work/Tomcat/localhost/ROOT] is not valid修复方法是将代码执行到pod中,并创建缺少的目录。想知道原因。
https://stackoverflow.com/questions/48805695
复制相似问题