When we setup haproxy with redirect and reverse proxy from http://sonar.company.com to http://sonar-server.company.com:8080. Though the URL is opening fine, we are getting below issue while running sonar runner in Jenkins-
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 0.185s
Final Memory: 1M/117M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
java.lang.IllegalStateException: Fail to download libraries from server
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:78)
at org.sonar.runner.impl.Jars.download(Jars.java:57)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:46)
at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:37)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:71)
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: java.lang.ArrayIndexOutOfBoundsException: 1
at org.sonar.runner.impl.Jars.dowloadFiles(Jars.java:72)
... 12 more
Any idea about issue or this is bug with sonarqube?
You should check your proxy set up is not changing response from /batch_bootstrap/index. Please compare response from:
http://sonar.company.com/batch_bootstrap/index and http://sonar-server.company.com:8080/batch_bootstrap/index
++
Related
I have setup SonarQube 8.9 on my local laptop using Docker image. I am able to launch the SonarQube server at http://localhost:9000/. Every thing works good from Browser. But if I try to run sonnar scanner I get this error. Any help is appreciated
C:\repo>sonar-scanner -Dsonar.host.url="http://localhost:9000" -Dsonar.login="key"
[18:00:22] Starting analysis...
[18:00:22] Checking if executable exists: C:\Users\shashk\.sonar\native-sonar-scanner\sonar-scanner-4.5.0.2216-windows\bin\sonar-scanner.bat
[18:00:22] Platform binaries for SonarScanner found. Using it.
INFO: Scanner configuration file: C:\Users\shashk\.sonar\native-sonar-scanner\sonar-scanner-4.5.0.2216-windows\bin\..\conf\sonar-scanner.properties
INFO: Project root configuration file: C:\repo\sonar-project.properties
INFO: SonarScanner 4.5.0.2216
INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
INFO: Windows 10 10.0 amd64
INFO: User cache: C:\Users\shashk\.sonar\cache
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 5:00.631s
INFO: Final Memory: 3M/20M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarScanner execution
org.sonarsource.scanner.api.internal.ScannerException: Unable to execute SonarScanner analysis
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:85)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:74)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.createLauncher(IsolatedLauncherFactory.java:70)
at org.sonarsource.scanner.api.EmbeddedScanner.doStart(EmbeddedScanner.java:185)
at org.sonarsource.scanner.api.EmbeddedScanner.start(EmbeddedScanner.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:73)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
Caused by: java.lang.IllegalStateException: Fail to get bootstrap index from server
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:42)
at org.sonarsource.scanner.api.internal.JarDownloader.getScannerEngineFiles(JarDownloader.java:58)
at org.sonarsource.scanner.api.internal.JarDownloader.download(JarDownloader.java:53)
at org.sonarsource.scanner.api.internal.IsolatedLauncherFactory.lambda$createLauncher$0(IsolatedLauncherFactory.java:76)
... 7 more
Caused by: java.net.SocketTimeoutException: timeout
at org.sonarsource.scanner.api.internal.shaded.okio.Okio$4.newTimeoutException(Okio.java:232)
at org.sonarsource.scanner.api.internal.shaded.okio.AsyncTimeout.exit(AsyncTimeout.java:286)
at org.sonarsource.scanner.api.internal.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
at org.sonarsource.scanner.api.internal.shaded.okio.RealBufferedSource.read(RealBufferedSource.java:51)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http1.Http1ExchangeCodec$AbstractSource.read(Http1ExchangeCodec.java:389)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.http1.Http1ExchangeCodec$UnknownLengthSource.read(Http1ExchangeCodec.java:529)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.connection.Exchange$ResponseBodySource.read(Exchange.java:286)
at org.sonarsource.scanner.api.internal.shaded.okio.RealBufferedSource.select(RealBufferedSource.java:100)
at org.sonarsource.scanner.api.internal.shaded.okhttp.internal.Util.bomAwareCharset(Util.java:467)
at org.sonarsource.scanner.api.internal.shaded.okhttp.ResponseBody.string(ResponseBody.java:181)
at org.sonarsource.scanner.api.internal.ServerConnection.downloadString(ServerConnection.java:100)
at org.sonarsource.scanner.api.internal.BootstrapIndexDownloader.getIndex(BootstrapIndexDownloader.java:39)
... 10 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.base/java.net.SocketInputStream.socketRead0(Native Method)
at java.base/java.net.SocketInputStream.socketRead(Unknown Source)
at java.base/java.net.SocketInputStream.read(Unknown Source)
at java.base/java.net.SocketInputStream.read(Unknown Source)
at org.sonarsource.scanner.api.internal.shaded.okio.Okio$2.read(Okio.java:140)
at org.sonarsource.scanner.api.internal.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
... 19 more
ERROR:
I am trying to analyze my project with sonarqube scanner in Jenkins. However when I'm building job it's always reporting some kind of an error, more exactly:
INFO: Option -e/--errors is no longer supported and will be ignored
INFO: Scanner configuration file: /var/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/SonarScanner1/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarQube Scanner 3.0.3.778
INFO: Java 1.8.0_151 Oracle Corporation (64-bit)
INFO: Linux 4.9.60-linuxkit-aufs amd64
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Publish mode
INFO: Load global settings
INFO: Load global settings (done) | time=232ms
INFO: Server id: AWEptYvpPRWpK4xbT0G4
INFO: User cache: /var/jenkins_home/.sonar/cache
INFO: Load plugins index
INFO: Load plugins index (done) | time=124ms
INFO: SonarQube server 6.7.1
INFO: Default locale: "en", source code encoding: "UTF-8" (analysis is platform dependent)
INFO: Process project properties
ERROR: Invalid value of sonar.sources for test
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3.218s
INFO: Final Memory: 42M/114M
INFO: ------------------------------------------------------------------------
ERROR: Error during SonarQube Scanner execution
ERROR: The folder 'polacpat/Documents/Jenkins2/workspace/SonarScanningTestProject/src/test' does not exist for 'test' (base directory = /var/jenkins_home/workspace/SonarScanningTestProject)
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE
Those are my Sonarqube analysis properties
AnalysisProperties
This is location of my project, it's automatically created because code is from gitlab...
Project Location
Now I don't really understand how does this work and how should I configure it. I have added the same name to a new sonarqube project and also sonarqube project key I have created within a sonarqube which is connected with a jenkins to those analyse properties in here, I don't understand how exactly does this works...
Updated folder:
Wrong Folder Being Analysed
Updated second error log after trying to set: sonar.sources=./src or
sonar.sources=./src/main
11:19:28.650 ERROR: Error during SonarQube Scanner execution
org.sonar.squidbridge.api.AnalysisException: Please provide compiled classes of your project with sonar.java.binaries property
at org.sonar.java.JavaClasspath.init(JavaClasspath.java:59)
at org.sonar.java.AbstractJavaClasspath.getElements(AbstractJavaClasspath.java:281)
at org.sonar.java.SonarComponents.getJavaClasspath(SonarComponents.java:141)
at org.sonar.java.JavaSquid.<init>(JavaSquid.java:83)
at org.sonar.plugins.java.JavaSquidSensor.execute(JavaSquidSensor.java:83)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:88)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:82)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:68)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:88)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:180)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:288)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:283)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:261)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.task.ScanTask.execute(ScanTask.java:48)
at org.sonar.scanner.task.TaskContainer.doAfterStart(TaskContainer.java:84)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:121)
at org.sonar.scanner.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:121)
at org.sonar.batch.bootstrapper.Batch.doExecuteTask(Batch.java:116)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:111)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:63)
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:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:123)
at org.sonarsource.scanner.cli.Main.execute(Main.java:77)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
11:19:28.651 DEBUG: Execution getVersion
11:19:28.656 DEBUG: Execution stop
ERROR: SonarQube scanner exited with non-zero code: 1
Finished: FAILURE
"Invalid value of sonar.sources for test"
sonar.sources must be relative to worskspace
sonar.sources=./src/test
And
Please provide compiled classes of your project with sonar.java.binaries property
means you need set sonar.java.binaries pointing to binaries
sonar.java.binaries=target/classes
See sonar paramenters
I am working in a .NET environment. I am currently using Jenkins to kick off my automated builds, SCM is Rational Team Concert. I am using SonarQube with the MSBuild Scanner, and the "SonarQube Jazz RTC SCM Plugin" to retrieve blame info (annotate in Rational). Most of the time this works perfectly. Sporadically I was seeing failures with no specific details of why the call was failing. If I resubmited the same jenkins job the run would succeed and I would get my scans through, including all my blame info. Recently in one of my jobs the failures started happening every time, and on the exact same file every time. This is the stack that I get out of the jenkins console log.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 3:16.401s
ERROR: Error during SonarQube Scanner execution
INFO: Final Memory: 47M/138M
INFO: ------------------------------------------------------------------------
java.lang.IllegalStateException: The jazz annotate command [cmd /C call lscm annotate -u _serviceAccount -P somePassword Areas/SomeArea/Scripts/SomeFile.js] failed:
at org.sonar.plugins.scm.jazzrtc.JazzRtcBlameCommand.blame(JazzRtcBlameCommand.java:74)
at org.sonar.plugins.scm.jazzrtc.JazzRtcBlameCommand.blame(JazzRtcBlameCommand.java:58)
at org.sonar.scanner.scm.ScmSensor.execute(ScmSensor.java:86)
at org.sonar.scanner.sensor.SensorWrapper.analyse(SensorWrapper.java:53)
at org.sonar.scanner.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:57)
at org.sonar.scanner.phases.SensorsExecutor.execute(SensorsExecutor.java:49)
at org.sonar.scanner.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:78)
at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:184)
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:241)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:234)
at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
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:118)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
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:498)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:233)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
at org.sonarsource.scanner.cli.Main.execute(Main.java:74)
at org.sonarsource.scanner.cli.Main.main(Main.java:61)
ERROR:
ERROR: Re-run SonarQube Scanner using the -X switch to enable full debug logging.
The SonarQube Scanner did not complete successfully
I have set the -X switch like its asking for and I do not get any more detailed info. I have also tried setting the trace setting in the sonar.log.level to trace in the SonarQube.Analysis.xml file and I can not seem to get any more details about my failure. There is nothing special that I can see about the file that it is failing on. Its JavaScript, its ~1700 lines long. It was getting the annotate/blame calls successfully up until a couple days ago.
Anyone have this issue? Anyone know what I can do to get more details about my failure? Any help is appreciated.
Version info: SonarQube 6.0 SonarQube Jazz Plugin 1.1 Rational
6.0.3 iFix005
Update 1: 8/29
After 11 failed runs, I finally got it to go through without any errors. This is how it looked.
- Run1 failed on FileA
- Run2 failed on FileA
- Run3 failed on FileA
- Run4 failed on FileA
- Run5 failed on FileA
- Run6 failed on FileA
- Run7 failed on FileA
- Run8 aborted
- Run9 failed on FileB
- Run10 failed on FileB
- Run11 failed on FileB
- Run12 successful on all files.
This problem is not gone, but just back to random failures.
Here's the sonar-runner.properties file in the project's root directory.
sonar.projectKey=baedalpos
sonar.projectName=baedal
sonar.projectVersion=1.0
sonar.scm.provider=svn
sonar.language=delph
sonar.dynamicAnalysis=false
sonar.sourceEncoding=UTF-8
sonar.sources=/home/svntest/30.1.Client/.
As you can see above, the project is written in Delphi, so I already downloaded and installed the Delphi plugin. When I run the sonar-runner command, it ends up leaving the following error message.
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 10.024s
Final Memory: 55M/807M
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: java.lang.IllegalArgumentException: 737 is not a valid line for pointer. File [moduleKey=baedalpos, relative=Basic/uStoreTable.pas, basedir=/home/svntest/30.1.Client TEST] has 525 line(s)
at org.sonar.api.internal.google.common.base.Preconditions.checkArgument(Preconditions.java:148)
at org.sonar.api.batch.fs.internal.DefaultInputFile.checkValid(DefaultInputFile.java:215)
at org.sonar.api.batch.fs.internal.DefaultInputFile.newPointer(DefaultInputFile.java:209)
at org.sonar.api.batch.fs.internal.DefaultInputFile.selectLine(DefaultInputFile.java:246)
at org.sonar.batch.issue.DeprecatedIssueBuilderWrapper.line(DeprecatedIssueBuilderWrapper.java:59)
at org.sonar.plugins.delphi.metrics.DeadCodeMetrics.save(DeadCodeMetrics.java:168)
at org.sonar.plugins.delphi.DelphiSensor.processFiles(DelphiSensor.java:134)
at org.sonar.plugins.delphi.DelphiSensor.analyse(DelphiSensor.java:112)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47)
at org.sonar.batch.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.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:79)
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:498)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more
I'm using Jenkins to run sonar on all my projects. One of them have over 2 millions line of code and started to produce a timeout error when connecting to sonar (posted bellow is the jenkins build log):
[JENKINS] Archiving /app/users/jenkins/jobs/*****RunSonar/workspace/******/pom.xml to com.****.***.****/****Gui/9.1.0/****Gui-9.1.0.pom
[JENKINS] Archiving /app/users/jenkins/jobs/****_****Gui_RunSonar/workspace/****Gui/target/****Gui.war to com.****.***.****/****Gui/9.1.0/****Gui-9.1.0.war
channel stopped
[workspace] $ /app/tools/apache-maven-3.2.1/bin/mvn -f /app/users/jenkins/jobs/****_****Gui_RunSonar/workspace/****Gui/pom.xml -Dgitbranch=my_development -e -B sonar:sonar -Dsonar.preview.readTimeout=90000 -Dsonar.jdbc.driver=oracle.jdbc.driver.OracleDriver -Dsonar.jdbc.url=jdbc:oracle:thin:#mydb:1521:orcl ******** ******** -Dsonar.host.url=https://********/sonar/ -Dsonar.branch=$gitbranch ******** ********
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.****.***.****:****Gui:war:9.1.0
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-war-plugin is missing. # line 408, column 23
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ****Gui 9.1.0
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact aspectj:aspectjrt:jar:1.5.4 has been relocated to org.aspectj:aspectjrt:jar:1.5.4
[WARNING] The artifact aspectj:aspectjweaver:jar:1.5.4 has been relocated to org.aspectj:aspectjweaver:jar:1.5.4
[WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2
[INFO]
[INFO] --- sonar-maven-plugin:2.5:sonar (default-cli) # ****Gui ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 34.033 s
[INFO] Finished at: 2015-01-14T10:31:44+00:00
[INFO] Final Memory: 12M/148M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project ****Gui: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'. connect timed out -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar (default-cli) on project *******: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.5:sonar failed: SonarQube server can not be reached at https://*********/sonar. Please check the parameter 'sonar.host.url'.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:144)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.IllegalStateException: SonarQube server can not be reached at https://********/sonar. Please check the parameter 'sonar.host.url'.
at org.codehaus.mojo.sonar.ServerMetadata.getVersion(ServerMetadata.java:70)
at org.codehaus.mojo.sonar.ServerMetadata.logSettings(ServerMetadata.java:84)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
... 20 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:618)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at org.codehaus.mojo.sonar.ServerMetadata.getConnection(ServerMetadata.java:119)
at org.codehaus.mojo.sonar.ServerMetadata.remoteContent(ServerMetadata.java:91)
at org.codehaus.mojo.sonar.ServerMetadata.getVersion(ServerMetadata.java:66)
... 23 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
Sonar analysis completed: FAILURE
I'm pretty sure the sonar.host.url is correct because all of my other jobs in jenkins that run sonar are working. I already tried to use the "sonar.preview.readTimeout" property but with no success. Sonar produces no log.
Does anyone have any idea how to run sonar to avoid this problem?
Best regards
Have you tried with localhost instead and see if its able to connect to localhost at the very least? For localhost you need to have sonar server running locally of course.