Taurus Execution failure via yaml scripts for jmeter jmx scripts behind proxy - jmeter

I am trying to execute some jmeter jmx scripts using Tarus via yaml scripts named "ParallelExecution.yml".
Yaml Script:
execution:
- executor: jmeter
execution:
- scenario:
script: C:\Users\SampleScripts\WSO2ServiceAPI.jmx
- scenario:
script: C:\Users\SampleScripts\KongServiceAPI.jmx
reporting:
- module: blazemeter
report-name: TaurusPerformanceTest
test: WSO2andKong
project: SampleProject
But, its fetching the following error after I execute the command "bzt ParallelExecution.yml -report".
C:\Users\YmlScripts>bzt ParallelExecution.yml
12:38:28 INFO: Taurus CLI Tool v1.13.8
12:38:28 INFO: Starting with configs: ['ParallelExecution.yml']
12:38:28 INFO: Configuring...
12:38:28 INFO: Artifacts dir: C:\Users\YmlScripts\2019-11-09_12-38-28.188921
12:38:28 INFO: Preparing...
12:38:28 WARNING: Failed to check for updates
12:38:29 INFO: 1 obsolete CookieManagers are found and fixed
12:38:36 WARNING: Failed to detect plugins for C:\Users\SampleScripts\modified_WSO2ServiceAPI.jmx: Command '['C:\\Users\\.bzt\\jmeter-taurus\\5.1.1\\bin\\PluginsManagerCMD.bat', 'install-for-jmx', 'C:\\Users\\SampleScripts\\modified_WSO2ServiceAPI.jmx']' returned non-zero exit status 1.
>>> START OF STDOUT >>>
2019-11-09 12:38:31,632 INFO o.j.r.PluginManagerCMD: Command is: install-for-jmx
2019-11-09 12:38:32,697 INFO o.j.r.JARSourceHTTP: Requesting https://jmeter-plugins.org/repo/?installID=docker-64602d8e8eb9f2a1a3b0804261cdb5e6-nongui
<<< END OF STDOUT <<<
>>> START OF STDERR >>>
ERROR: java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
*** Problem's technical details go below ***
Home directory was detected as: C:\Users\.bzt\jmeter-taurus\5.1.1\lib
Exception in thread "main" java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:100)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
Caused by: java.net.UnknownHostException: jmeter-plugins.org
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494)
at org.jmeterplugins.repository.JARSourceHTTP.getJSON(JARSourceHTTP.java:152)
at org.jmeterplugins.repository.JARSourceHTTP.getRepositories(JARSourceHTTP.java:276)
at org.jmeterplugins.repository.JARSourceHTTP.getRepo(JARSourceHTTP.java:304)
at org.jmeterplugins.repository.PluginManager.load(PluginManager.java:71)
at org.jmeterplugins.repository.PluginManagerCMD.getPluginsManager(PluginManagerCMD.java:110)
at org.jmeterplugins.repository.PluginManagerCMD.installPluginsForJmx(PluginManagerCMD.java:120)
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:79)
... 7 more
<<< END OF STDERR <<<
12:38:36 INFO: 1 obsolete CookieManagers are found and fixed
12:38:46 WARNING: Failed to detect plugins for C:\Users\SampleScripts\modified_KongServiceAPI.jmx: Command '['C:\\Users\\.bzt\\jmeter-taurus\\5.1.1\\bin\\PluginsManagerCMD.bat', 'install-for-jmx', 'C:\\Users\\SampleScripts\\modified_KongServiceAPI.jmx']' returned non-zero exit status 1.
>>> START OF STDOUT >>>
2019-11-09 12:38:39,605 INFO o.j.r.PluginManagerCMD: Command is: install-for-jmx
2019-11-09 12:38:42,035 INFO o.j.r.JARSourceHTTP: Requesting https://jmeter-plugins.org/repo/?installID=docker-64602d8e8eb9f2a1a3b0804261cdb5e6-nongui
<<< END OF STDOUT <<<
>>> START OF STDERR >>>
ERROR: java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
*** Problem's technical details go below ***
Home directory was detected as: C:\Users\.bzt\jmeter-taurus\5.1.1\lib
Exception in thread "main" java.lang.RuntimeException: Failed to perform cmdline operation: jmeter-plugins.org
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:100)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:62)
at kg.apc.cmdtools.PluginsCMD.processParams(PluginsCMD.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at kg.apc.cmd.UniversalRunner.main(UniversalRunner.java:115)
Caused by: java.net.UnknownHostException: jmeter-plugins.org
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(Unknown Source)
at java.net.InetAddress.getAddressesFromNameService(Unknown Source)
at java.net.InetAddress.getAllByName0(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at java.net.InetAddress.getAllByName(Unknown Source)
at org.apache.http.impl.conn.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:45)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.resolveHostname(DefaultClientConnectionOperator.java:263)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:162)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.open(ManagedClientConnectionImpl.java:326)
at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:605)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:440)
at org.apache.http.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:835)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:499)
at org.jmeterplugins.repository.JARSourceHTTP.execute(JARSourceHTTP.java:494)
at org.jmeterplugins.repository.JARSourceHTTP.getJSON(JARSourceHTTP.java:152)
at org.jmeterplugins.repository.JARSourceHTTP.getRepositories(JARSourceHTTP.java:276)
at org.jmeterplugins.repository.JARSourceHTTP.getRepo(JARSourceHTTP.java:304)
at org.jmeterplugins.repository.PluginManager.load(PluginManager.java:71)
at org.jmeterplugins.repository.PluginManagerCMD.getPluginsManager(PluginManagerCMD.java:110)
at org.jmeterplugins.repository.PluginManagerCMD.installPluginsForJmx(PluginManagerCMD.java:120)
at org.jmeterplugins.repository.PluginManagerCMD.processParams(PluginManagerCMD.java:79)
... 7 more
<<< END OF STDERR <<<
12:38:46 WARNING: No BlazeMeter API key provided, will upload anonymously
12:38:46 ERROR: Network Error: Request to https://a.blazemeter.com/api/v4/web/version failed
12:38:46 INFO: Post-processing...
12:38:46 INFO: Test duration: 0:00:00
12:38:46 INFO: Artifacts dir: C:\Users\YmlScripts\2019-11-09_12-38-28.188921
12:38:46 WARNING: Done performing with code: 1
I am not sure why I taurus is not able to execute the script. It runs correctly as jmeter scripts via jmeter.
Any help would be highly appreticated

Looking into this line:
Caused by: java.net.UnknownHostException: jmeter-plugins.org
It appears that the underlying JMeter Plugins Manager is not able to reach JMeter Plugins backend, presumably this is due to the fact you're using corporate proxy for the internet access.
You can configure Taurus to use the proxy of your choice by adding the next lines to your YAML config file:
settings:
proxy:
address: http://localhost:8080
username: johndoe
password: secret
of course replace address, username and password with your own values. Once done - restart the test and Taurus will propagate proxy settings to the downstream JMeter. JMeter Plugins Manager respects JMeter proxy settings so you should be able to execute the test normally.
Just in case check out Plugins Manager Network Configuration page.

Related

lock deletion issue when uploading information to Sonar server on AIX

I'm actually trying to use sonarqube 5.4 on an AIX server and I've got some errors when running the analysis.
the same configuration has been tested on Windows and it's working.
The information are stored in an Oracle database(11gr2)
At the end of the analysis, it says that a lock file can't be deleted, but when I check after this file, it's not there anymore.
I've tried to use the last version of the wrapper, but in vain.
has anyone faced the same issue?
09:58:13.581 DEBUG - POST 500
http:/foobar:9001/api/ce/submit?projectKey=IHM&projectName=IHM
| time=92ms 09:58:13.594 INFO - Analysis report generated in
/applis/swgi/produits/ictools/workdir/batch-report 09:58:13.604 DEBUG
- Couldn't delete lock file: /applis/swgi/produits/ictools/sonar-runner-2.4_IHM/bin/./.sonar_lock
java.nio.file.NoSuchFileException:
/applis/swgi/produits/ictools/sonar-runner-2.4_IHM/bin/./.sonar_lock
at
sun.nio.fs.UnixException.translateToIOException(UnixException.java:98)
at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:114)
at
sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:119)
at
sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:256)
at
sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:115)
at java.nio.file.Files.delete(Files.java:1137) at
org.sonar.home.cache.DirectoryLock.unlock(DirectoryLock.java:98)
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(AccessController.java:594)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:100)
at org.sonar.runner.Main.executeTask(Main.java:70)
at org.sonar.runner.Main.execute(Main.java:59)
at org.sonar.runner.Main.main(Main.java:53) Caused by: org.sonarqube.ws.client.HttpException: Error 500 http:/foobar:9001/api/ce/submit?projectKey=IHM&projectName=IHM
at org.sonarqube.ws.client.BaseResponse.failIfNotSuccessful(BaseResponse.java:32)
at org.sonar.batch.bootstrap.BatchWsClient.failIfUnauthorized(BatchWsClient.java:96)
at org.sonar.batch.bootstrap.BatchWsClient.call(BatchWsClient.java:67)
at org.sonar.batch.report.ReportPublisher.upload(ReportPublisher.java:158)
at org.sonar.batch.report.ReportPublisher.execute(ReportPublisher.java:117)
at org.sonar.batch.phases.PhaseExecutor.publishReportJob(PhaseExecutor.java:129)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:112)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:185)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:264)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:259)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:249)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:127)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:135)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:120)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:122)
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:95)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:508)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 9 more

Running jmeter .jmx tests locally using windows command line giving illegal argument exception

Using below command to run the tests on windows cmd - Is there any initialization required in jmeter for doing so.
jmeter -n -t C:/Users/meiyer/Desktop/LOAD TOOLS/jmeter samples/50users10count.jmx
stacktrace -
2016/08/29 15:17:18 INFO - jmeter.util.JMeterUtils: Setting Locale to en_US
2016/08/29 15:17:18 INFO - jmeter.JMeter: Loading user properties from:
C:\Users\meiyer\Documents\apache-jmeter-3.0\apache-jmeter-
3.0\bin\user.properties
2016/08/29 15:17:18 INFO - jmeter.JMeter: Loading system properties from:
C:\Users\meiyer\Documents\apache-jmeter-3.0\apache-jmeter-
3.0\bin\system.properties
2016/08/29 15:17:18 FATAL - jmeter.JMeter: An error occurred:
java.lang.IllegalArgumentException: Unknown arg: TOOLS/jmeter
at org.apache.jmeter.JMeter.initializeProperties(JMeter.java:746)
at org.apache.jmeter.JMeter.start(JMeter.java:385)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.jmeter.NewDriver.main(NewDriver.java:259)
Your issue comes from the space between LOAD and TOOLS.
Use quote around the path:
jmeter -n -t "C:/Users/meiyer/Desktop/LOAD TOOLS/jmeter samples/50users10count.jmx"

Jenkins-Maven Project - Could not initialize class org.apache.tools.ant.Location

I am getting an error as it is not able to initialize the ANT location although it's a Maven project.
For Jenkins job.
The output can be found below:
[htmlpublisher] Archiving HTML reports... [htmlpublisher] Archiving at
PROJECT level
C:\Jenkins\workspace\Capybaras-STAGE-Regression-OnDemand\target\dashboard-reports
to
/home/scmbuildmaster/.jenkins/jobs/Capybaras-STAGE-Regression-OnDemand/htmlreports/Dashboard_Full_Report_with_Screenshot FATAL: HTML Publisher failure java.io.IOException:
java.util.concurrent.ExecutionException:
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
hudson.FilePath.copyRecursiveTo(FilePath.java:2213) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2101) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2084) at
htmlpublisher.HtmlPublisher.perform(HtmlPublisher.java:213) at
hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at
hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:770)
at
hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:734)
at hudson.model.Build$BuildExecution.post2(Build.java:183) at
hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:683)
at hudson.model.Run.execute(Run.java:1784) at
hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at
hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240) Caused by:
java.util.concurrent.ExecutionException:
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
hudson.remoting.Channel$3.adapt(Channel.java:784) at
hudson.remoting.Channel$3.adapt(Channel.java:779) at
hudson.remoting.FutureAdapter.get(FutureAdapter.java:55) at
hudson.FilePath.copyRecursiveTo(FilePath.java:2211) ... 12 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.apache.tools.ant.Location at
org.apache.tools.ant.ProjectComponent.(ProjectComponent.java:43)
at org.apache.tools.ant.types.DataType.(DataType.java:40) at
org.apache.tools.ant.types.AbstractFileSet.(AbstractFileSet.java:82)
at org.apache.tools.ant.types.FileSet.(FileSet.java:36) at
hudson.Util.createFileSet(Util.java:1077) at
hudson.util.DirScanner$Glob.scan(DirScanner.java:124) at
hudson.FilePath.writeToTar(FilePath.java:2249) at
hudson.FilePath.access$2100(FilePath.java:191) at
hudson.FilePath$45.invoke(FilePath.java:2190) at
hudson.FilePath$45.invoke(FilePath.java:2186) at
hudson.FilePath$FileCallableWrapper.call(FilePath.java:2665) at
hudson.remoting.UserRequest.perform(UserRequest.java:121) at
hudson.remoting.UserRequest.perform(UserRequest.java:49) at
hudson.remoting.Request$2.run(Request.java:324) at
hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at
hudson.remoting.Engine$1$1.run(Engine.java:63) at
java.lang.Thread.run(Unknown Source) at ......remote call to
QA-Automation-Node(Native Method) at
hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1356)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at
hudson.remoting.Channel$3.adapt(Channel.java:782) ... 15 more Build
step 'Publish HTML reports' changed build result to FAILURE
Try the following, in the following order:
Try to upgrade the JRE version that you use to run the slave process
If you are using a JRE to run your slave, use a JDK If you are using
an OpenJDK, try with an Oracle JDK

SonarQube Error During Runner Execution

I am new to SonarQube and was having a connection timed out error preventing sonar-runner from publishing a small application to sonarqube.
Versions:
SonarQube Runner 2.4
Java 1.7.0_45 Oracle Corporation (64-bit)
Linux 3.5.0-42-generic amd64
The confusing part is that this works fine when executing sonar-runner on the windows machine hosting sonarqube. I have changed the port default port from 9000 and tested both connections for validity. That has not resolved the issue.
Only when attempting to run sonar-runner manually from the command line on the virtual machine storing the source code does and error occur. I have also increased the allowable memory in the heap size via the SONAR_RUNNER_OPTS in the sonar-runner.bat file.
Please advise or let me know what additional information is needed.
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: /opt/sonar-runner/sonar-runner-2.4/conf/sonar-runner.properties
INFO: Project configuration file: /var/lib/svn/repos/secureci/secureciDemoRepo/LaserGem_Sample/sonar-project.properties
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Work directory: /var/lib/svn/repos/secureci/secureciDemoRepo/LaserGem_Sample/./.sonar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 30.047s Final Memory: 0M/30M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution org.sonar.runner.kevinsawicki.HttpRequest$HttpRequestException: java.net.SocketTimeoutException: connect timed out
at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1392)
at org.sonar.runner.kevinsawicki.HttpRequest.ok(HttpRequest.java:1417)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:93)
at org.sonar.runner.impl.ServerVersion.downloadVersion(ServerVersion.java:47)
at org.sonar.runner.impl.ServerVersion.version(ServerVersion.java:38)
at org.sonar.runner.impl.ServerVersion.is37Compatible(ServerVersion.java:58)
at org.sonar.runner.impl.JarDownloader.checkVersionAndDownload(JarDownloader.java:36)
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.net.SocketTimeoutException: connect timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1675)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1673)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1671)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1244)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1390) ... 15 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.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.http.HttpClient.<init>(HttpClient.java:211)
at sun.net.www.http.HttpClient.New(HttpClient.java:308)
at sun.net.www.http.HttpClient.New(HttpClient.java:326)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:996)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:932)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:850)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1300)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678)
at org.sonar.runner.kevinsawicki.HttpRequest.header(HttpRequest.java:1903)
at org.sonar.runner.kevinsawicki.HttpRequest.contentType(HttpRequest.java:2308)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:89) ... 13 more
This looks like your Linux server on which you try to run the SonarQube analysis cannot reach the Windows server on which the SonarQube server runs. You might have some firewall or network settings that prevents this communication.

sonar runner SocketTimeoutException when running

i was working with sonar and everything was working just fine. then after a month or so not using it i started receiving the following exception when running the sonar-runner.bat
i am using the embedded h2 db server and use the default ports.
INFO: Error stacktraces are turned on.
INFO: Runner configuration file: C:\sonar\sonar-runner-2.2.2\conf\sonar-runner.properties
INFO: Project configuration file: c:\eclipse\workspaces\projName\sonar-project.properties
INFO: Default locale: "iw_IL", source code encoding: "UTF-8"
INFO: Work directory: c:\eclipse\workspaces\projName\.sonar
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 1:00.553s
Final Memory: 1M/242M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
org.sonar.runner.kevinsawicki.HttpRequest$HttpRequestException: java.net.SocketTimeoutException: Read timed out
at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1392)
at org.sonar.runner.kevinsawicki.HttpRequest.ok(HttpRequest.java:1417)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:83)
at org.sonar.runner.impl.ServerVersion.downloadVersion(ServerVersion.java:49)
at org.sonar.runner.impl.ServerVersion.version(ServerVersion.java:40)
at org.sonar.runner.impl.ServerVersion.is35Compatible(ServerVersion.java:64)
at org.sonar.runner.impl.JarDownloader.download(JarDownloader.java:39)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:59)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:57)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:71)
at org.sonar.runner.api.Runner.execute(Runner.java:89)
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:41)
Caused by: java.net.SocketTimeoutException: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
at org.sonar.runner.kevinsawicki.HttpRequest.code(HttpRequest.java:1390)
... 15 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:697)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:640)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2300)
at org.sonar.runner.kevinsawicki.HttpRequest.header(HttpRequest.java:1903)
at org.sonar.runner.kevinsawicki.HttpRequest.contentType(HttpRequest.java:2308)
at org.sonar.runner.impl.ServerConnection.downloadString(ServerConnection.java:79)
... 13 more
Go to: sonar-runner-2.3/conf/sonar-runner.properties
Uncomment the line: #sonar.host.url=http://localhost:9000
Replace localhost with your IP and save the file!
example:sonar.host.url=http://192.168.0.12:9000
Default port used by sonar is 9000,may be this has been used by some other application on your system.
Change your listening port in
sonarqube-4.2/conf/sonar.properties,
sonar-runner-2.3/conf/sonar-runner.properties
Restart sonar
sonarqube-4.2/bin/linux-x86-64/sonar.sh restart
I have same problem and found that I have installed my sql but forget to reset mysql password.
I found my mistake by accessing logs under /logs/access.log
So logs will surely help you to figure out problem.
This error is triggered by a SonarQube plugin that I'm not aware of : "kevinsawicki". I guess removing this plugin should fix your issue.

Resources