2
votes

I'm running the sonarqube alpine docker image via docker-toolbox with the following command:

docker run --rm -d --name sonarqube -p 9000:9000 -p 9092:9092 sonarqube:alpine

I can access sonarqube just fine via the url http://192.168.99.100:9000.

Now, on to getting my project analyzed for sonarqube.

Following the instructions at SonarQube Gradle Plugin:

...
plugins {
  ...
  id 'org.sonarqube' version '2.5'
}
...

and setting sonar.host.url in my gradle.properties like so:

systemProp.sonar.host.url=http://192.168.99.100:9000

I get the following error:

10:18:24.135 [LIFECYCLE] [class org.gradle.internal.buildevents.TaskExecutionLogger] :sonarqube FAILED
10:18:24.136 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :sonarqube (Thread[Daemon worker Thread 5,5,main]) completed. Took 4 mins 52.472 secs.
10:18:24.136 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationWorkerRegistry] Worker root.8 completed (0 in use)
10:18:24.136 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 5,5,main]] finished, busy: 4 mins 56.471 secs, idle: 0.005 secs
10:18:24.137 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':sonarqube'.
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Fail to request http://192.168.99.100:9000/api/ce/submit?projectKey=com.company:core&projectName=core
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:18:24.138 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:84)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:55)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:62)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:46)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:236)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.execute(DefaultTaskGraphExecuter.java:228)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:228)
10:18:24.139 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:215)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:77)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:58)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:32)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:113)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:256)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher$RunTasksAction.execute(DefaultGradleLauncher.java:253)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:175)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:49)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:31)
10:18:24.140 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.util.Swapper.swap(Swapper.java:38)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)
10:18:24.141 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.lang.IllegalStateException: Fail to request http://192.168.99.100:9000/api/ce/submit?projectKey=com.company:core&projectName=core
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:176)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.ws.client.HttpConnector.post(HttpConnector.java:143)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:102)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.bootstrap.ScannerWsClient.call(ScannerWsClient.java:73)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.report.ReportPublisher.upload(ReportPublisher.java:180)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.report.ReportPublisher.execute(ReportPublisher.java:131)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.phases.PublishPhaseExecutor.publishReportJob(PublishPhaseExecutor.java:71)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.phases.PublishPhaseExecutor.executeOnRoot(PublishPhaseExecutor.java:53)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:80)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:178)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:259)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:254)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:243)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:47)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:86)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:144)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:129)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:118)
10:18:24.142 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:117)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.sun.proxy.$Proxy197.execute(Unknown Source)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:99)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.doExecute(DefaultTaskClassInfoStore.java:141)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:123)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:632)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:615)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:95)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:76)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 70 more
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: java.io.FileNotFoundException: /Users/user/Sources/company/core/build/sonar/.sonartmp/batch-report4657850404686963239.zip (Permission denied)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okio.Okio.source(Okio.java:166)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.RequestBody$3.writeTo(RequestBody.java:117)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.MultipartBody.writeOrCountBytes(MultipartBody.java:171)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.MultipartBody.writeTo(MultipartBody.java:113)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:62)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.ws.client.OkHttpClientBuilder.addUserAgent(OkHttpClientBuilder.java:190)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.143 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at okhttp3.RealCall.execute(RealCall.java:69)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:173)
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   ... 106 more
10:18:24.144 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 
10:18:24.144 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 
10:18:24.144 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED

And just for some more color, here are some more logging statements that show successful connection to sonarqube during the analysis and also successful batch-report creation:

...

10:13:35.931 [INFO] [org.sonarqube.gradle.SonarQubeTask] Process project properties
10:13:35.932 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Process project properties (done) | time=1ms
10:13:35.982 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load project repositories
10:13:35.990 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 404 http://192.168.99.100:9000/batch/project.protobuf?key=com.company%3Acore | time=8ms
10:13:35.991 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Project repository not available - continuing without it
10:13:35.993 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load project repositories (done) | time=12ms
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Available languages:
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * C# => "cs"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * Python => "py"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * Java => "java"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * Flex => "flex"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * XML => "xml"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * PHP => "php"
10:13:36.059 [DEBUG] [org.sonarqube.gradle.SonarQubeTask]   * JavaScript => "js"
10:13:36.062 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load quality profiles
10:13:36.075 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://192.168.99.100:9000/api/qualityprofiles/search.protobuf?defaults=true | time=13ms
10:13:36.080 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load quality profiles (done) | time=18ms
10:13:36.082 [INFO] [org.sonarqube.gradle.SonarQubeTask] Load active rules
10:13:36.273 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://192.168.99.100:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV2ukYLYAVqjf-jDh137&p=1&ps=500 | time=191ms
10:13:36.838 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://192.168.99.100:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV2ukYQiAVqjf-jDh16c&p=1&ps=500 | time=468ms
10:13:36.956 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://192.168.99.100:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV2ukYV5AVqjf-jDh1-s&p=1&ps=500 | time=109ms
10:13:36.978 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] GET 200 http://192.168.99.100:9000/api/rules/search.protobuf?f=repo,name,severity,lang,internalKey,templateKey,params,actives,createdAt&activation=true&qprofile=AV2ukYXBAVqjf-jDh1_p&p=1&ps=500 | time=19ms

...

10:18:04.115 [INFO] [org.sonarqube.gradle.SonarQubeTask] Analysis reports compressed in 6173ms, zip size=9 MB
10:18:04.115 [INFO] [org.sonarqube.gradle.SonarQubeTask] Analysis report generated in /Users/user/Sources/company/core/build/sonar/batch-report
10:18:04.115 [DEBUG] [org.sonarqube.gradle.SonarQubeTask] Upload report

...
1
java.io.FileNotFoundException: /Users/user/Sources/company/core/build/sonar/.sonartmp/batch-report4657850404686963239.zip (Permission denied): permission denied, user that is running gradle process has no permission on that directory.Bruno Ribeiro
How can the analysis report be generated and compressed then? Not saying you're wrong, I just don't understand how that would be possible if what you say is true.Matthew Carrier
Just to try out your recommendation I chmod -R 777 and am still getting the same issue. One more thing I noticed was that .sonartmp does not exist after the build is completed. Either the build process is cleaning that up or the actual zip archive gets created somewhere else?Matthew Carrier
@BrunoCésar You were right. It turned out to be a Corporate Group Settings issue, and a restart fixed the permissions issue. If you post an answer I'll gladly accept it.Matthew Carrier

1 Answers

0
votes

As in the following log excerpt the problem is due user permissions:

java.io.FileNotFoundException: /Users/user/Sources/company/core/build/sonar/.sonartmp/batch‌​-report4657850404686‌​963239.zip (Permission denied)

So user that is running gradle process has no permission on that directory, related to a group settings in your environment.