2016-07-20 37 views
2

Haben mehr als 20 Stunden zu diesem Thema verbracht, konnte aber nicht beheben.SonarQube für MSBuild - End Analysis Fehler

Anforderung - SONARQube Integration mit MSBuild in Visual Studio online.

Schritte gefolgt -

Um Setup-Sonarqube-5,6

  1. Ein Windows Server VM auf Azure mit SQL Server 2012.
  2. Gefolgt die folgenden Schritte in der folgenden zwei Links bereitgestellt

http://docs.sonarqube.org/display/SONAR/Installing+the+Server http://donovanbrown.com/post/2015/06/17/how-to-setup-a-sonarqube-server-in-azure

  1. Verwenden von SQL Server mit SQL-Authentifizierung.
  2. Sonar läuft als Windows-Dienst.
  3. JDK 8, JRE 8 installiert

Problem 1- Sonarqube ist erreichbar mit der URL folgenden http://abc.cloudapp.net:9000 auf dem Server selbst. Außerhalb des Servers über das Internet ist es nicht zugänglich.

Integration von Sonarqube in MSBuild

folgten die Schritte in der unten angegebenen Link https://blogs.msdn.microsoft.com/visualstudioalm/2015/08/24/build-tasks-for-sonarqube-analysis/

Problem 2-

Wenn i den Build Warteschlange, der Analyseschritt Beginnen erfolgreich ausgeführt wird, um Holen Sie das SONAR-Profil. Nach dem Lösungs-Build-Schritt, wenn der End Analysis-Schritt ausgeführt wird, schlägt dieser Schritt mit dem folgenden Fehler fehl.

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) 

Überraschungsmoment

  1. Die End Analyseschritt ausgeführt wurde, und der Bericht zunächst hochgeladen wurde. Nach 2-3 Tagen hatte ich die VM heruntergefahren. Eines Tages fing ich wieder an und die Dinge hörten auf zu arbeiten.

  2. Die sonar.properties Datei in der Konfig, wo das Sonar installiert ist, nichts wurde nach dem Extrahieren aus der heruntergeladenen Zip-Version geändert. Wenn ich die Änderungen wie in der Installationsanleitung der SONARQube-Website aufgefordert den Windows-Dienst Sonar Qube nicht einmal ausgeführt wird, startet und stoppt mit einem Fehler protokolliert.

Ich füge auch die Protokolle von Sonarqube für mehr Klarheit

Inhalt von 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-process374050properties 
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 [email protected] [pattern=/sessions/init/*] 
2016.07.20 11:44:09 INFO web[o.s.s.p.MasterServletFilter] Initializing servlet filter [email protected] [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' 
+0

Ihr Protokoll scheint anzuzeigen, dass der Analysebericht an den Server gesendet wurde. Siehst du es auf dem Server? Wird es erfolgreich auf dem Server verarbeitet? Gibt es etwas Relevantes/Interessantes im Serverprotokoll? (Bitte antworten Sie mit einer Frage [Bearbeiten], kein Kommentar) –

Antwort

3

Der Fehler auf der Serverseite (tritt während eines Gesprächs api/ce/einreichen auf der Client-Seite) Spiele ziemlich gut mit bekannten Fehler SONAR-7896 - Analyse schlägt fehl, wenn Sonarqube läuft als Windows-Dienst (was hier der Fall ist).

Abhilfen sind im Ticket aufgeführt:

  • in <sonar_install_dir>/conf/wrapper.conf,
  • OR in den Windows-Dienste-Verwaltungstool set.TMPDIR=../../temp hinzufügen, um die Eigenschaften Sonarqube Service bearbeitet, ändern von ‚Lokale System 'Anmelden' Konto‘auf ‚dieses Konto‘
  • oder manuell ausführen Sonarqube von der Kommandozeile (die lokale Admin-Benutzername/Passwort Providing)
+0

Sie hatten Recht. Sonar, das als Windows-Dienst gehostet wurde, verursachte das Problem. 1. Ich hosste jetzt als Webserver. Es klappt. 2. Es wurde versucht, die Anmeldung für dieses Konto mit dem Benutzernamen und dem Kennwort des Benutzers zu ändern. Der Dienst hat das Ereignis nicht gestartet und hat einen Anmeldefehler gemeldet. Ich habe die anderen beiden Lösungen nicht versucht. Werde es in der Freizeit versuchen. Danke für die Antwort –

+0

@Ravi Der erste Workaround sollte trotzdem funktionieren, versuchen Sie es. Akzeptieren Sie diese Antwort (http://stackoverflow.com/help/accepted-answer), wenn Sie Ihre Frage gelöst haben. –

+0

Akzeptiert es :). Entschuldigungen dafür, es zu verpassen. Sie können auch Hosting-Sonar als Webserver hinzufügen. Nur ein Vorschlag –