Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/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
MSBuild的SonarQube-结束分析失败_Sonarqube_Azure Devops_Sonarqube Scan - Fatal编程技术网

MSBuild的SonarQube-结束分析失败

MSBuild的SonarQube-结束分析失败,sonarqube,azure-devops,sonarqube-scan,Sonarqube,Azure Devops,Sonarqube Scan,在这个问题上花费了20多个小时,但无法解决 要求-必须在visual studio online中与MSBuild集成 以下步骤: 设置QUBE-5.6的步骤 Azure上带有SQL server 2012的Windows server虚拟机 遵循以下两个链接中提供的以下步骤 使用SQL Server进行SQL身份验证 Sonar正在以windows服务运行 已安装JDK 8、JRE 8 问题1-SONARQube可通过服务器本身上的以下url访问。无法通过internet访问服务器外部 M

在这个问题上花费了20多个小时,但无法解决

要求-必须在visual studio online中与MSBuild集成

以下步骤:

设置QUBE-5.6的步骤

  • Azure上带有SQL server 2012的Windows server虚拟机
  • 遵循以下两个链接中提供的以下步骤
  • 使用SQL Server进行SQL身份验证
  • Sonar正在以windows服务运行
  • 已安装JDK 8、JRE 8
  • 问题1-SONARQube可通过服务器本身上的以下url访问。无法通过internet访问服务器外部

    MSBuild中SONARQube的集成

    遵循下面链接中提供的步骤

    问题2-

    当我将构建排队时,将成功执行“开始分析”步骤以获取声纳配置文件。在解决方案构建步骤之后,当执行结束分析步骤时,此步骤失败,并出现以下错误

    2016-07-20T11:47:55.0719979Z 11:47:54.868 INFO  - Analysis report generated in 218ms, dir size=1 MB
    2016-07-20T11:47:55.1813633Z 11:47:54.993 INFO  - Analysis reports compressed in 125ms, zip size=593 KB
    2016-07-20T11:47:55.9512068Z INFO: ------------------------------------------------------------------------
    2016-07-20T11:47:55.9512068Z INFO: EXECUTION FAILURE
    2016-07-20T11:47:55.9512068Z INFO: ------------------------------------------------------------------------
    2016-07-20T11:47:55.9512068Z Total time: 25.270s
    2016-07-20T11:47:55.9512068Z Final Memory: 12M/419M
    2016-07-20T11:47:55.9512068Z INFO: ------------------------------------------------------------------------
    2016-07-20T11:47:55.9512068Z ##[error]ERROR: Error during Sonar runner execution
    2016-07-20T11:47:55.9512068Z ##[error]org.sonar.runner.impl.RunnerException: Unable to execute Sonar
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:91)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
    2016-07-20T11:47:55.9512068Z ##[error]at java.security.AccessController.doPrivileged(Native Method)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.api.Runner.execute(Runner.java:100)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.Main.executeTask(Main.java:70)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.Main.execute(Main.java:59)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.Main.main(Main.java:53)
    2016-07-20T11:47:55.9512068Z ##[error]Caused by: org.sonarqube.ws.client.HttpException: Error 500 on http://nstudio36db.cloudapp.net:9000/api/ce/submit?projectKey=nstudio36&projectName=nstudio36POC
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:34)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.bootstrap.BatchWsClient.failIfUnauthorized(BatchWsClient.java:99)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.bootstrap.BatchWsClient.call(BatchWsClient.java:69)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.report.ReportPublisher.upload(ReportPublisher.java:172)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.report.ReportPublisher.execute(ReportPublisher.java:127)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:64)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:51)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:86)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:79)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
    2016-07-20T11:47:55.9512068Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2016-07-20T11:47:55.9512068Z ##[error]at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    2016-07-20T11:47:55.9512068Z ##[error]at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    2016-07-20T11:47:55.9512068Z ##[error]at java.lang.reflect.Method.invoke(Method.java:498)
    2016-07-20T11:47:55.9512068Z ##[error]at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
    2016-07-20T11:47:55.9512068Z ##[error]... 9 more
    2016-07-20T11:47:55.9512068Z ##[error]ERROR:
    2016-07-20T11:47:55.9512068Z ##[error]ERROR: Re-run SonarQube Runner using the -X switch to enable full debug logging.
    2016-07-20T11:47:55.9512068Z ##[error]The SonarQube Scanner did not complete successfully
    2016-07-20T11:47:55.9512068Z 11:47:55.873  Creating a summary markdown file...
    2016-07-20T11:47:55.9668295Z ##[error]Post-processing failed. Exit code: 1
    2016-07-20T11:47:56.0157824Z ##[error]System.Exception: Unexpected exit code received from batch file: 1
    2016-07-20T11:47:56.0157824Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Task.Internal.PowerShell.InvokeBatchScriptCmdlet.ProcessRecord()
    2016-07-20T11:47:56.0157824Z ##[error]   at System.Management.Automation.CommandProcessor.ProcessRecord()
    2016-07-20T11:47:56.0626590Z ##[debug]Calling InvokeGetRestMethod "/api/server/version" 
    2016-07-20T11:47:56.0939103Z ##[debug]GET http://nstudio36db.cloudapp.net:9000/api/server/version with 0-byte payload
    2016-07-20T11:47:56.2411799Z ##[debug]received 3-byte response of content type text/html;charset=utf-8
    2016-07-20T11:47:56.2935352Z Waiting on the SonarQube server to finish processing in order to determine the quality gate status.
    2016-07-20T11:47:56.3327387Z ##[error]System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407 ---> System.Management.Automation.RuntimeException: Cannot determine if the analysis has finished. Possible cause: your SonarQube server version is lower than 5.3 - for more details see https://go.microsoft.com/fwlink/?LinkId=722407
    2016-07-20T11:47:56.3327387Z ##[error]   --- End of inner exception stack trace ---
    2016-07-20T11:47:56.3327387Z ##[error]   at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
    2016-07-20T11:47:56.3327387Z ##[error]   at System.Management.Automation.PowerShell.Worker.ConstructPipelineAndDoWork(Runspace rs, Boolean performSyncInvoke)
    2016-07-20T11:47:56.3327387Z ##[error]   at System.Management.Automation.PowerShell.Worker.CreateRunspaceIfNeededAndDoWork(Runspace rsToUse, Boolean isSync)
    2016-07-20T11:47:56.3327387Z ##[error]   at System.Management.Automation.PowerShell.CoreInvokeHelper[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    2016-07-20T11:47:56.3327387Z ##[error]   at System.Management.Automation.PowerShell.CoreInvoke[TInput,TOutput](PSDataCollection`1 input, PSDataCollection`1 output, PSInvocationSettings settings)
    2016-07-20T11:47:56.3327387Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Handlers.PowerShellHandler.Execute(ITaskContext context, CancellationToken cancellationToken, Int32 timeoutInMinutes)
    2016-07-20T11:47:56.3327387Z ##[error]   at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.RunTask(ITaskContext context, TaskWrapper task, CancellationTokenSource tokenSource)
    
    惊喜元素

  • 正在执行“结束分析”步骤,并且最初正在上载报告。2-3天后,我关闭了虚拟机。有一天我又开始了,事情停止了

  • 安装sonar的配置文件中的
    sonar.properties
    文件,从下载的zip版本中提取后没有任何更改。如果我按照SONARQube网站安装指南中的要求进行更改 windows服务Sonar Qube甚至没有运行,它启动和停止时都记录了一些错误

  • 我还附上SONARQube的日志,以便进一步澄清

    Sonar.log的内容

    SonarQube removed.
    CreateService failed - The specified service has been marked for deletion. (0x430)
    Starting the SonarQube service...
    Unable to start the service - The service cannot be started, either because it is disabled or because it has no enabled devices associated with it. (0x422)
    SonarQube installed.
    Starting the SonarQube service...
    --> Wrapper Started as Service
    Launching a JVM...
    Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
      Copyright 1999-2006 Tanuki Software, Inc.  All Rights Reserved.
    
    2016.07.20 11:42:19 INFO  app[o.s.a.AppFileSystem] Cleaning or creating temp directory C:\SonarCubeNStudio\temp
    2016.07.20 11:42:19 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[es]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Xmx1G -Xms256m -Xss256k -Djava.net.preferIPv4Stack=true -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=C:\SonarCubeNStudio\temp -javaagent:C:\Program Files\Java\jre1.8.0_101\lib\management-agent.jar -cp ./lib/common/*;./lib/search/* org.sonar.search.SearchServer C:\SonarCubeNStudio\temp\sq-process8674696029876155294properties
    2016.07.20 11:42:21 INFO   es[o.s.p.ProcessEntryPoint]  Starting es
    2016.07.20 11:42:21 INFO   es[o.s.s.EsSettings]  Elasticsearch listening on 127.0.0.1:9001
    2016.07.20 11:42:21 INFO   es[o.elasticsearch.node]  [sonar-1469014939182] version[1.7.5], pid[5080], build[00f95f4/2016-02-02T09:55:30Z]
    2016.07.20 11:42:21 INFO   es[o.elasticsearch.node]  [sonar-1469014939182] initializing ...
    2016.07.20 11:42:21 INFO   es[o.e.plugins]  [sonar-1469014939182] loaded [], sites []
    SonarQube started.
    2016.07.20 11:42:23 INFO   es[o.elasticsearch.env]  [sonar-1469014939182] using [1] data paths, mounts [[(C:)]], net usable_space [84.9gb], net total_space [126.9gb], types [NTFS]
    2016.07.20 11:42:26 WARN   es[o.e.bootstrap]  JNA not found. native methods will be disabled.
    2016.07.20 11:42:29 INFO   es[o.elasticsearch.node]  [sonar-1469014939182] initialized
    2016.07.20 11:42:29 INFO   es[o.elasticsearch.node]  [sonar-1469014939182] starting ...
    2016.07.20 11:42:29 INFO   es[o.e.transport]  [sonar-1469014939182] bound_address {inet[/127.0.0.1:9001]}, publish_address {inet[/127.0.0.1:9001]}
    2016.07.20 11:42:29 INFO   es[o.e.discovery]  [sonar-1469014939182] sonarqube/tJjpPHT5QwKQ0DICqUP99w
    2016.07.20 11:42:33 INFO   es[o.e.cluster.service]  [sonar-1469014939182] new_master [sonar-1469014939182][tJjpPHT5QwKQ0DICqUP99w][nstudio36db][inet[/127.0.0.1:9001]]{rack_id=sonar-1469014939182}, reason: zen-disco-join (elected_as_master)
    2016.07.20 11:42:33 INFO   es[o.elasticsearch.node]  [sonar-1469014939182] started
    2016.07.20 11:42:33 INFO   es[o.e.gateway]  [sonar-1469014939182] recovered [0] indices into cluster_state
    2016.07.20 11:42:33 INFO  app[o.s.p.m.Monitor] Process[es] is up
    2016.07.20 11:42:33 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[web]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djruby.management.enabled=false -Djruby.compile.invokedynamic=false -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=C:\SonarCubeNStudio\temp -javaagent:C:\Program Files\Java\jre1.8.0_101\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;C:\SonarCubeNStudio\lib\jdbc\h2\h2-1.3.176.jar org.sonar.server.app.WebServer C:\SonarCubeNStudio\temp\sq-process3740500123831706040properties
    2016.07.20 11:42:35 INFO  web[o.s.p.ProcessEntryPoint] Starting web
    2016.07.20 11:42:36 INFO  web[o.s.s.a.TomcatContexts] Webapp directory: C:\SonarCubeNStudio\web
    2016.07.20 11:42:37 INFO  web[o.a.c.h.Http11NioProtocol] Initializing ProtocolHandler ["http-nio-0.0.0.0-9000"]
    2016.07.20 11:42:37 INFO  web[o.a.t.u.n.NioSelectorPool] Using a shared selector for servlet write/read
    2016.07.20 11:42:39 INFO  web[o.s.s.p.ServerImpl] SonarQube Server / 5.6 / 074f3d1169f9688d15af4aff67e7e672cbeed782
    2016.07.20 11:42:40 INFO  web[o.s.s.d.EmbeddedDatabase] Starting embedded database on port 9092 with url jdbc:h2:tcp://localhost:9092/sonar
    2016.07.20 11:42:40 INFO  web[o.s.s.d.EmbeddedDatabase] Embedded database started. Data stored in: C:\SonarCubeNStudio\data
    2016.07.20 11:42:40 INFO  web[o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://localhost:9092/sonar
    2016.07.20 11:42:41 WARN  web[o.s.d.DatabaseChecker] H2 database should be used for evaluation purpose only
    2016.07.20 11:42:44 INFO  web[o.s.s.p.DefaultServerFileSystem] SonarQube home: C:\SonarCubeNStudio
    2016.07.20 11:42:45 INFO  web[o.e.plugins] [sonar-1469014939182] loaded [], sites []
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Plugin C# [csharp] installed
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Plugin Java [java] installed
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Plugin JavaScript [javascript] installed
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Plugin Git [scmgit] installed
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Plugin SVN [scmsvn] installed
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin C# / 5.0 / 17ddb09047940791828dcb70c9e225f006ab11aa
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Git / 1.2 / a713dd64daf8719ba4e7f551f9a1966c62690c17
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin Java / 3.13.1 / cf0f0c950ba3e83a87c7fe11c6ff7e63f4864bd9
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin JavaScript / 2.11 / a9b1afa9ceef7079811779d9efc5f8026acb1400
    2016.07.20 11:42:48 INFO  web[o.s.s.p.ServerPluginRepository] Deploy plugin SVN / 1.3 / aff503d48bc77b07c2b62abf93249d0a20bd355c
    2016.07.20 11:42:49 INFO  web[o.s.s.d.m.DatabaseMigrator] Create database
    2016.07.20 11:42:51 INFO  web[o.s.s.p.RailsAppsDeployer] Deploying Ruby on Rails applications
    2016.07.20 11:42:53 INFO  web[o.s.s.p.UpdateCenterClient] Update center: http://update.sonarsource.org/update-center.properties (no proxy)
    2016.07.20 11:42:54 INFO  web[o.s.s.e.IndexCreator] Create index tests
    2016.07.20 11:42:55 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [tests] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:42:58 INFO  web[o.s.s.e.IndexCreator] Create type tests/test
    2016.07.20 11:42:58 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [tests] create_mapping [test]
    2016.07.20 11:42:58 INFO  web[o.s.s.e.IndexCreator] Create index activities
    2016.07.20 11:42:58 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:42:59 INFO  web[o.s.s.e.IndexCreator] Create type activities/activity
    2016.07.20 11:42:59 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] create_mapping [activity]
    2016.07.20 11:42:59 INFO  web[o.s.s.e.IndexCreator] Create index rules
    2016.07.20 11:42:59 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [rules] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:43:00 INFO  web[o.s.s.e.IndexCreator] Create type rules/activeRule
    2016.07.20 11:43:00 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [rules] create_mapping [activeRule]
    2016.07.20 11:43:00 INFO  web[o.s.s.e.IndexCreator] Create type rules/rule
    2016.07.20 11:43:00 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [rules] create_mapping [rule]
    2016.07.20 11:43:00 INFO  web[o.s.s.e.IndexCreator] Create index issues
    2016.07.20 11:43:00 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [issues] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:43:01 INFO  web[o.s.s.e.IndexCreator] Create type issues/authorization
    2016.07.20 11:43:01 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [issues] create_mapping [authorization]
    2016.07.20 11:43:01 INFO  web[o.s.s.e.IndexCreator] Create type issues/issue
    2016.07.20 11:43:01 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [issues] create_mapping [issue]
    2016.07.20 11:43:01 INFO  web[o.s.s.e.IndexCreator] Create index users
    2016.07.20 11:43:01 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [users] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:43:02 INFO  web[o.s.s.e.IndexCreator] Create type users/user
    2016.07.20 11:43:02 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [users] create_mapping [user]
    2016.07.20 11:43:02 INFO  web[o.s.s.e.IndexCreator] Create index views
    2016.07.20 11:43:02 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [views] creating index, cause [api], templates [], shards [5]/[0], mappings []
    2016.07.20 11:43:03 INFO  web[o.s.s.e.IndexCreator] Create type views/view
    2016.07.20 11:43:03 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [views] create_mapping [view]
    2016.07.20 11:43:03 INFO  web[o.s.s.n.NotificationService] Notification service started (delay 60 sec.)
    2016.07.20 11:43:04 INFO  web[o.s.s.s.RegisterMetrics] Register metrics
    2016.07.20 11:43:04 INFO  web[o.s.s.r.RegisterRules] Register rules
    2016.07.20 11:43:20 INFO  web[o.s.s.q.RegisterQualityProfiles] Register quality profiles
    2016.07.20 11:43:22 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=cs, name=Sonar way}
    2016.07.20 11:43:24 INFO  web[o.s.s.q.RegisterQualityProfiles] Set default cs profile: Sonar way
    2016.07.20 11:43:24 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=java, name=Sonar way}
    2016.07.20 11:43:27 INFO  web[o.s.s.q.RegisterQualityProfiles] Set default java profile: Sonar way
    2016.07.20 11:43:27 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=js, name=Sonar way}
    2016.07.20 11:43:28 INFO  web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=js, name=Sonar Security Way}
    2016.07.20 11:43:28 INFO  web[o.s.s.q.RegisterQualityProfiles] Set default js profile: Sonar way
    2016.07.20 11:43:31 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filters
    2016.07.20 11:43:31 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filter: Projects
    2016.07.20 11:43:31 INFO  web[o.s.s.s.RegisterNewMeasureFilters] Register measure filter: My favourites
    2016.07.20 11:43:31 INFO  web[o.s.s.s.RegisterDashboards] Register dashboards
    2016.07.20 11:43:32 INFO  web[o.s.s.s.RegisterDashboards] Register dashboard: Custom
    2016.07.20 11:43:32 INFO  web[o.s.s.s.RegisterDashboards] Register dashboard: Home
    2016.07.20 11:43:32 INFO  web[o.s.s.s.RegisterPermissionTemplates] Register permission templates
    2016.07.20 11:43:32 INFO  web[o.s.s.s.RenameDeprecatedPropertyKeys] Rename deprecated property keys
    2016.07.20 11:43:32 INFO  web[o.s.s.s.RenameIssueWidgets] Replacing issue related widgets with issue filter widgets
    2016.07.20 11:43:32 INFO  web[o.s.s.e.IndexerStartupTask] Index activities
    2016.07.20 11:43:34 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] update_mapping [activity] (dynamic)
    2016.07.20 11:43:34 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] update_mapping [activity] (dynamic)
    2016.07.20 11:43:35 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] update_mapping [activity] (dynamic)
    2016.07.20 11:43:35 INFO   es[o.e.cluster.metadata]  [sonar-1469014939182] [activities] update_mapping [activity] (dynamic)
    2016.07.20 11:43:35 INFO  web[o.s.s.e.IndexerStartupTask] Index issues
    2016.07.20 11:43:36 INFO  web[o.s.s.e.IndexerStartupTask] Index tests
    2016.07.20 11:43:36 INFO  web[o.s.s.e.IndexerStartupTask] Index users
    2016.07.20 11:43:36 INFO  web[o.s.s.e.IndexerStartupTask] Index views
    2016.07.20 11:43:37 INFO  web[jruby.rack] jruby 1.7.9 (ruby-1.8.7p370) 2013-12-06 87b108a on Java HotSpot(TM) 64-Bit Server VM 1.8.0_101-b13 [Windows Server 2012 R2-amd64]
    2016.07.20 11:43:37 INFO  web[jruby.rack] using a shared (threadsafe!) runtime
    2016.07.20 11:44:09 INFO  web[jruby.rack] keeping custom (config.logger) Rails logger instance
    2016.07.20 11:44:09 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.InitFilter@1653ae93 [pattern=/sessions/init/*]
    2016.07.20 11:44:09 INFO  web[o.s.s.p.MasterServletFilter] Initializing servlet filter org.sonar.server.authentication.OAuth2CallbackFilter@363262a [pattern=/oauth2/callback/*]
    2016.07.20 11:44:09 INFO  web[o.a.c.h.Http11NioProtocol] Starting ProtocolHandler ["http-nio-0.0.0.0-9000"]
    2016.07.20 11:44:09 INFO  web[o.s.s.a.TomcatAccessLog] Web server is started
    2016.07.20 11:44:09 INFO  web[o.s.s.a.EmbeddedTomcat] HTTP connector enabled on port 9000
    2016.07.20 11:44:10 INFO  app[o.s.p.m.Monitor] Process[web] is up
    2016.07.20 11:44:10 INFO  app[o.s.p.m.JavaProcessLauncher] Launch process[ce]: C:\Program Files\Java\jre1.8.0_101\bin\java -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Xmx512m -Xms128m -XX:+HeapDumpOnOutOfMemoryError -Djava.net.preferIPv4Stack=true -Djava.io.tmpdir=C:\SonarCubeNStudio\temp -javaagent:C:\Program Files\Java\jre1.8.0_101\lib\management-agent.jar -cp ./lib/common/*;./lib/server/*;./lib/ce/*;C:\SonarCubeNStudio\lib\jdbc\h2\h2-1.3.176.jar org.sonar.ce.app.CeServer C:\SonarCubeNStudio\temp\sq-process5870977745631384763properties
    2016.07.20 11:44:12 INFO  ce[o.s.p.ProcessEntryPoint] Starting ce
    2016.07.20 11:44:12 INFO  ce[o.s.ce.app.CeServer] Compute Engine starting up...
    2016.07.20 11:44:13 INFO  ce[o.s.s.p.ServerImpl] SonarQube Server / 5.6 / 074f3d1169f9688d15af4aff67e7e672cbeed782
    2016.07.20 11:44:13 INFO  ce[o.sonar.db.Database] Create JDBC data source for jdbc:h2:tcp://localhost:9092/sonar
    2016.07.20 11:44:13 WARN  ce[o.s.d.DatabaseChecker] H2 database should be used for evaluation purpose only
    2016.07.20 11:44:17 INFO  ce[o.s.s.p.DefaultServerFileSystem] SonarQube home: C:\SonarCubeNStudio
    2016.07.20 11:44:18 INFO  ce[o.e.plugins] [sonar-1469014939182] loaded [], sites []
    2016.07.20 11:44:21 INFO  ce[o.s.c.c.CePluginRepository] Load plugins
    2016.07.20 11:44:26 INFO  ce[o.s.s.c.q.PurgeCeActivities] Delete the Compute Engine tasks created before Fri Jan 22 11:44:26 UTC 2016
    2016.07.20 11:44:26 INFO  ce[o.s.ce.app.CeServer] Compute Engine is up
    2016.07.20 11:44:27 INFO  app[o.s.p.m.Monitor] Process[ce] is up
    2016.07.20 11:47:54 ERROR web[rails] /!\ FAILSAFE /!\  Wed Jul 20 11:47:54 UTC 2016
      Status: 500 Internal Server Error
      No such file or directory - C:/Windows/system32/config/systemprofile/AppData/Local/Temp
        org/jruby/RubyFile.java:842:in `stat'
        jar:file:/C:/SonarCubeNStudio/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:33:in `tmpdir'
        org/jruby/RubyArray.java:1613:in `each'
        jar:file:/C:/SonarCubeNStudio/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:30:in `tmpdir'
        jar:file:/C:/SonarCubeNStudio/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:109:in `tmpdir'
        jar:file:/C:/SonarCubeNStudio/lib/server/jruby-complete-1.7.9.jar!/META-INF/jruby.home/lib/ruby/shared/tmpdir.rb:141:in `create'
        org/jruby/ext/tempfile/Tempfile.java:88:in `initialize'
        org/jruby/RubyIO.java:852:in `new'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/utils.rb:559:in `parse_multipart'
        org/jruby/RubyKernel.java:1519:in `loop'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/utils.rb:537:in `parse_multipart'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/request.rb:268:in `parse_multipart'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/request.rb:146:in `POST'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/methodoverride.rb:15:in `call'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/params_parser.rb:15:in `call'
        file:/C:/SonarCubeNStudio/lib/server/jruby-rack-1.1.13.2.jar!/jruby/rack/session_store.rb:70:in `context'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/rack-1.1.6/lib/rack/session/abstract/id.rb:58:in `call'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/failsafe.rb:26:in `call'
        C:/SonarCubeNStudio/web/WEB-INF/gems/gems/actionpack-2.3.15/lib/action_controller/dispatcher.rb:106:in `call'
        file:/C:/SonarCubeNStudio/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:34:in `serve_rails'
        file:/C:/SonarCubeNStudio/lib/server/jruby-rack-1.1.13.2.jar!/rack/adapter/rails.rb:39:in `call'
        file:/C:/SonarCubeNStudio/lib/server/jruby-rack-1.1.13.2.jar!/rack/handler/servlet.rb:22:in `call'
    

    服务器端的错误(在客户端调用api/ce/submit时发生)与已知的bug非常匹配-如果SonarQube作为Windows服务运行(这里就是您的例子),则分析将失败

    解决方法列在记录单中:

    • /conf/wrapper.conf
      中,添加
      set.TMPDIR=../../temp
    • 或者在Windows服务管理工具中,编辑SonarQube服务属性,将“登录”从“本地系统帐户”更改为 “此帐户”(提供您的本地管理员用户名/密码)
    • 或者从命令行手动运行SonarQube

    您的日志似乎表明分析报告已提交到服务器。你在服务器上看到了吗?它是否在服务器上成功处理?服务器日志中是否有相关/有趣的内容?(请回答一个问题,而不是评论)你是对的。作为windows服务托管的Sonar导致了该问题。1.我现在作为一个网络服务器托管。它起作用了。2.已尝试使用系统的管理员用户名和密码更改此帐户的登录。服务未启动事件,说明登录失败。没有尝试其他两种解决方案。我会在空闲时间试试。谢谢你的邀请answer@Ravi尽管如此,第一个解决方法应该是可行的,试试这个。另外,如果这个答案解决了你的问题,就做这个回答。接受它:)。抱歉错过了。您还可以将主机Sonar作为web服务器添加到同一数据库中。不过,这只是一个建议