上传sonnar报告时出错

时间:2017-03-09 16:57:44

标签: php mysql

当我运行sonar-runner命令时,我已经安装了SonnarQube,版本6.2,对于PHP proyecto我有以下错误:

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 3:57.845s
Final Memory: 19M/882M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.impl.RunnerException: Unable to execute Sonar
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
        at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
        at 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: org.sonarqube.ws.client.HttpException: Error 500 on http://127.0.0.1:9000/api/ce/submit?projectKey=pr0j3cT-php&projectName=Project : {"errors":[{"msg":"An error has occurred. Please contact your administrator."}]}
        at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:36)
        at org.sonar.scanner.bootstrap.BatchWsClient.failIfUnauthorized(BatchWsClient.java:102)
        at org.sonar.scanner.bootstrap.BatchWsClient.call(BatchWsClient.java:71)
        at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:173)
        at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:128)
        at org.sonar.scanner.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:64)
        at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:51)
        at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:81)
        at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:182)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:247)
        at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:242)
        at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:232)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
        at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
        at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
        at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
        at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:115)
        at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:116)
        at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:76)
        at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
        ... 9 more

我读了sonnar日志,发现需要在mysql.ini文件中更改max_allowed_pa​​cket,默认情况下它将此值设置为1M,我将其更改为500M,重新启动mysql服务器并重新启动sonnar。当再次执行命令时,我有相同的错误,但在sonnar日志中,前一个错误不会持续存在,任何有解决方案,谢谢。

1 个答案:

答案 0 :(得分:0)

我改为postgreSQL,它工作正常,使用MySql我还没有找到解决方案。