Im trying to install sonarQube and this is the steps I have taken:
Downloaded sonarqube version 4.3
Unpacked sonarqube-4.3.zip to C:\sonarqube
Start sonarqube by running: C:\sonarqube\bin\windows-x86-64\StartSonar.bat
Server running
Testet access to server on http://localhost:9000
Comment out the following line in C:\sonarqube\conf\sonar.properties
sonar.jdbc.url=jdbc:h2:tcp://localhost:9092/sonar
Edit the following lines in C:\sonarqube\conf\sonar.properties
sonar.jdbc.username=sonar to sonar.jdbc.username=username
sonar.jdbc.password=sonar to sonar.jdbc.password=password
#sonar.jdbc.url=jdbc:oracle:thin:#host/XE to sonar.jdbc.url=jdbc:oracle:thin:#host:port/db
Download ojdbc6.jar
Copy ojdbc6.jar to C:\sonarqube\extensions\jdbc-driver\oracle\
Stop server
Start server
Starting server fails
I get this in the log:
Any help or pointers appreciated
2014.06.03 11:13:55 INFO [o.s.a.Connectors] HTTP connector is enabled on port 9000
2014.06.03 11:13:56 INFO [o.a.c.h.Http11Protocol] Initializing ProtocolHandler ["http-bio-0.0.0.0-9000"]
2014.06.03 11:13:56 INFO [o.a.c.c.StandardService] Starting service Tomcat
2014.06.03 11:13:56 INFO [o.a.c.c.StandardEngine] Starting Servlet Engine: Apache Tomcat/7.0.42
2014.06.03 11:13:57 INFO [o.a.c.s.ContextConfig] No global web.xml found
2014.06.03 11:13:59 INFO [o.s.s.p.ServerImpl] SonarQube Server / 4.3 / 05cc0b97a0e8064857d02c03a8086695e154e2ba
2014.06.03 11:13:59 ERROR [o.s.s.p.PlatformServletContextListener] Fail to start server
java.lang.NullPointerException: null
at org.sonar.server.db.EmbeddedDatabaseFactory.start(EmbeddedDatabaseFactory.java:39) ~[EmbeddedDatabaseFactory.class:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91) ~[sonar-plugin-api-4.3.jar:na]
at org.sonar.server.platform.Platform.startLevel1Container(Platform.java:91) ~[Platform.class:na]
at org.sonar.server.platform.Platform.init(Platform.java:71) ~[Platform.class:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:53) ~[PlatformServletContextListener.class:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.42.jar:7.0.42]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.42.jar:7.0.42]
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) [na:1.7.0]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0]
at java.lang.Thread.run(Unknown Source) [na:1.7.0]
<-- Wrapper Stopped
You're getting this error because the property "sonar.jdbc.url" is not defined or is commented-out in your sonar.properties file.
Related
I got three kind of errors while using load run via JMeter. Probably this can be happen due to SSL issue but can't identify the point. Here are the exceptions that I got. I did try with jmeter.properties , user.properties files but nothing was worked. I changed the SSLv3 to SSL as well.
at sun.security.ssl.SSLSocketImpl.handleEOF(Unknown Source)
at sun.security.ssl.SSLSocketImpl.decode(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:91)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:404)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:935)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:646)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2155)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2123)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
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 java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
at sun.security.ssl.SSLSocketInputRecord.decode(Unknown Source)
at sun.security.ssl.SSLTransport.decode(Unknown Source)
... 28 more
at sun.security.ssl.Alert.createSSLException(Unknown Source)
at sun.security.ssl.TransportContext.fatal(Unknown Source)
at sun.security.ssl.TransportContext.fatal(Unknown Source)
at sun.security.ssl.TransportContext.fatal(Unknown Source)
at sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.access$400(Unknown Source)
at sun.security.ssl.SSLSocketImpl$AppInputStream.read(Unknown Source)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:137)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:153)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:280)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:138)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:56)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:259)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:163)
at org.apache.http.impl.conn.CPoolProxy.receiveResponseHeader(CPoolProxy.java:157)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:273)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:125)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:272)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:935)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:646)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2155)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2123)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
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 java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.SSLSocketInputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketInputRecord.readHeader(Unknown Source)
at sun.security.ssl.SSLSocketInputRecord.bytesInCompletePacket(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readApplicationRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.access$300(Unknown Source)
... 28 more
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:368)
at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:91)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:404)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:935)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:646)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:66)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2155)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase$ASyncSample.call(HTTPSamplerBase.java:2123)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
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 java.lang.Thread.run(Unknown Source)
Can someone help me with this matter?
Your stacktraces don't tell the full story, to get more verbose information about the handshake and related problems add the next line to system.properties file
javax.net.debug=all
More information: Diagnosing TLS, SSL, and HTTPS
most probably you're using lower version, less secure protocol and the server requires higher version of the protocol. You can check which protocols are being used using
openssl tool like `openssl s_client -connect -debug your-host
or nmap tool like nmap --script ssl-enum-ciphers -p 443 your-host
once you figure out which protocol is being used you can enable it via https.protocols system property like:
https.protocols=TLSv1.3
More information:
Configuring JMeter
Apache JMeter Properties Customization Guide
Try to run the test with only one thread. If you don't get this error with only one thread, the problem can be about your system under test gets overloaded and cannot properly respond and end the connection.
If this is not the case, make sure that you have enabled TLS 1.2 in your application (JVM argument?)(-Dhttps.protocols=TLSv1.2). You can use openssl to check the connection and see if you are getting a certificate. Then check your keystore and make sure you have the correct certificate. This will help you to get a proper authorization.
I'm using SonarQube 5.1 and sometimes am able to complete the analysis but most of the times it is failing.
I tried to set this in sonar.properties:
sonar.jdbc.maxWait=400000
sonar.preview.readTimeout=400000
I'm using mysql as SonarQube database and there is only 60% of disk space utilized.
Still, when running an analysis, I get these logs and the analysis fails:
[sonar:sonar] 06:25:38.262 INFO - Initializing Hibernate
[sonar:sonar] 06:25:49.056 INFO - Load project repositories
BUILD FAILED
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.ant.SonarTask.launchAnalysis(SonarTask.java:51)
at org.sonar.ant.SonarTask.execute(SonarTask.java:46)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
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.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.Main.runBuild(Main.java:853)
at org.apache.tools.ant.Main.startAnt(Main.java:235)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
Caused by: java.lang.IllegalStateException: Unable to request: /batch/project?key=XYZ-ALL%3Astatic-test&preview=false
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:109)
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:99)
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:87)
at org.sonar.batch.repository.DefaultProjectRepositoriesLoader.load(DefaultProjectRepositoriesLoader.java:55)
at org.sonar.batch.repository.ProjectRepositoriesProvider.provide(ProjectRepositoriesProvider.java:40)
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.picocontainer.injectors.MethodInjector.invokeMethod(MethodInjector.java:129)
at org.picocontainer.injectors.MethodInjector.access$000(MethodInjector.java:39)
at org.picocontainer.injectors.MethodInjector$2.run(MethodInjector.java:113)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.MethodInjector.decorateComponentInstance(MethodInjector.java:120)
at org.picocontainer.injectors.CompositeInjector.decorateComponentInstance(CompositeInjector.java:58)
at org.picocontainer.injectors.Reinjector.reinject(Reinjector.java:142)
at org.picocontainer.injectors.ProviderAdapter.getComponentInstance(ProviderAdapter.java:96)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:631)
at org.picocontainer.parameters.BasicComponentParameter$1.resolveInstance(BasicComponentParameter.java:118)
at org.picocontainer.parameters.ComponentParameter$1.resolveInstance(ComponentParameter.java:136)
at org.picocontainer.injectors.SingleMemberInjector.getParameter(SingleMemberInjector.java:78)
at org.picocontainer.injectors.ConstructorInjector$CtorAndAdapters.getParameterArguments(ConstructorInjector.java:309)
at org.picocontainer.injectors.ConstructorInjector$1.run(ConstructorInjector.java:335)
at org.picocontainer.injectors.AbstractInjector$ThreadLocalCyclicDependencyGuard.observe(AbstractInjector.java:270)
at org.picocontainer.injectors.ConstructorInjector.getComponentInstance(ConstructorInjector.java:364)
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.getComponentInstance(AbstractInjectionFactory.java:56)
at org.picocontainer.behaviors.AbstractBehavior.getComponentInstance(AbstractBehavior.java:64)
at org.picocontainer.behaviors.Stored.getComponentInstance(Stored.java:91)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:698)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:646)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:677)
at org.sonar.api.platform.ComponentContainer.getComponentByType(ComponentContainer.java:209)
at org.sonar.batch.scan.ProjectScanContainer.doBeforeStart(ProjectScanContainer.java:92)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:90)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:57)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:135)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:158)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:48)
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.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
... 25 more
Caused by: java.net.SocketTimeoutException: Read 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.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:298)
at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:255)
at org.sonar.batch.bootstrap.ServerClient.request(ServerClient.java:105)
... 75 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1323)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2678)
at java.net.URLConnection.getContentEncoding(URLConnection.java:533)
at org.sonar.api.utils.HttpDownloader$BaseHttpDownloader$HttpInputSupplier.getInput(HttpDownloader.java:296)
... 77 more
Total time: 44 seconds
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
Help us localize this page
SonarQube 5.1 is an old version of SonarQube, the latest LTS being 5.6.
I recommend you to upgrade to 5.6 in order to be able to get some help.
I have my own customized plugins of csharp of version 2.1 when i deployed stylecope plugin in sonar 4.5.4 server, some rules getting exception like below but after removing those rule its working fine. This exception am getting in sonar 4.5.4 but not facing any issues in sonar 4.2 and lesser version. I need to know why this issue occuring and what is mean to say? Please explain. Thanks
java.lang.IllegalArgumentException: Debt definition on rule 'stylecopcsharp:ConstFieldNamesMustBeginWithUpperCaseLetter' is invalid
at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.remediationFunction(DeprecatedRulesDefinitionLoader.java:135) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.updateRuleDebtDefinitions(DeprecatedRulesDefinitionLoader.java:117) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.rule.DeprecatedRulesDefinitionLoader.complete(DeprecatedRulesDefinitionLoader.java:107) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.rule.RuleDefinitionsLoader.load(RuleDefinitionsLoader.java:53) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.rule.RegisterRules.start(RegisterRules.java:102) ~[sonar-server-4.5.4.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_55]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_55]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.7.0_55]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.7.0_55]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92) ~[sonar-plugin-api-4.5.4.jar:na]
at org.sonar.server.platform.ServerComponents$1.doPrivileged(ServerComponents.java:590) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.user.DoPrivileged.execute(DoPrivileged.java:43) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.platform.ServerComponents.executeStartupTasks(ServerComponents.java:586) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.platform.Platform.executeStartupTasks(Platform.java:126) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:122) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:81) ~[sonar-server-4.5.4.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:43) ~[sonar-server-4.5.4.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) [tomcat-embed-core-7.0.54.jar:7.0.54]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) [tomcat-embed-core-7.0.54.jar:7.0.54]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.7.0_55]
at java.lang.Thread.run(Unknown Source) [na:1.7.0_55]
The .NET and C# plugins version 2.1 are not compatible with newer versions of SonarQube (including 4.5.4).
You should really consider upgrading to the latest C# plugin and use the MSBuild SonarQube Runner developed in partnership with Microsoft to analyze all .NET projects: It vastly improves the experience, provides much better analysis results, and is way easier to use.
See http://redirect.sonarsource.com/plugins/csharp.html to get started.
The information below is informative only, and will allow you to proceed with an unsupported deprecated version of the C# plugin (which is bad, so think twice :p):
I see that you created your own StyleCop plugin, with the key stylecopcsharp: You should define valid SQALE remediation costs for each rule - or SonarQube will refuse to start.
The easiest way is actually to remove all SQALE remediation cost information. Now, if you'd like to keep SQALE, you can have a look at the stack trace and see how SonarQube's validation works: DeprecatedRulesDefinitionLoader.java#L135
There could be more obstacles preventing the use of .NET and C# with SonarQube 4.5.4, so again think twice before going this way.
When upgrading SonarQube to 5.1 from 4.4 I get the following error
java.lang.NoClassDefFoundError: org/sonar/api/batch/maven/DependsUponMavenPlugin
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_20]
at java.lang.ClassLoader.defineClass(Unknown Source) ~[na:1.8.0_20]
at java.security.SecureClassLoader.defineClass(Unknown Source) ~[na:1.8.0_20]
at java.net.URLClassLoader.defineClass(Unknown Source) ~[na:1.8.0_20]
at java.net.URLClassLoader.access$100(Unknown Source) ~[na:1.8.0_20]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_20]
at java.net.URLClassLoader$1.run(Unknown Source) ~[na:1.8.0_20]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0_20]
at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_20]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf(ClassRealm.java:389) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:42) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) ~[plexus-classworlds-2.5.1.jar:na]
at org.sonar.plugins.clirr.ClirrPlugin.getExtensions(ClirrPlugin.java:68) ~[na:na]
at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:51) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.ServerComponents.startLevel4Components(ServerComponents.java:819) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.Platform.startLevel34Containers(Platform.java:120) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.Platform.doStart(Platform.java:81) ~[sonar-server-5.1.jar:na]
at org.sonar.server.platform.PlatformServletContextListener.contextInitialized(PlatformServletContextListener.java:44) ~[sonar-server-5.1.jar:na]
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4720) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5154) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.0.18.jar:8.0.18]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [tomcat-embed-core-8.0.18.jar:8.0.18]
at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_20]
at java.lang.Thread.run(Unknown Source) [na:1.8.0_20]
Caused by: java.lang.ClassNotFoundException: org.sonar.api.batch.maven.DependsUponMavenPlugin
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235) ~[plexus-classworlds-2.5.1.jar:na]
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227) ~[plexus-classworlds-2.5.1.jar:na]
... 29 common frames omitted
SonarQube the fails to load and the wrapper then stops running. The database upgrade also failed because of this error.
Has anyone seen this before?
Thanks
It looks like you're using an outdated version of the CLIRR plugin, please update to the latest 1.2 release.
We are trying to upgrade SonarQube from 3.6.2 to 3.7.4 LTS in order to have PL/SQL plugin working.
As per the plugin Matrix for 3.7.4 LTS version, Java Plugin 2.0 and Cobertura 1.6.1 are recommended.
However, when we restart SonarQube with above plugins, it keeps on reporting below error.
Would appreciate a solution here.
Thanks,
Br,
Error message:
2014.06.02 12:32:02 ERROR o.s.s.p.Platform The plugin 'java' is in version 2.0 whereas the plugin 'cobertura' requires a least a version 2.1.
org.sonar.updatecenter.common.exception.IncompatiblePluginVersionException: The plugin 'java' is in version 2.0 whereas the plugin 'cobertura' requires a least a version 2.1.
at org.sonar.updatecenter.common.PluginReferential.addOutgoingDependency(PluginReferential.java:148) ~[sonar-update-center-common-1.8.jar:na]
at org.sonar.updatecenter.common.PluginReferentialManifestConverter.fromPluginManifests(PluginReferentialManifestConverter.java:66) ~[sonar-update-center-common-1.8.jar:na]
at org.sonar.server.plugins.PluginReferentialMetadataConverter.getInstalledPluginReferential(PluginReferentialMetadataConverter.java:40) ~[classes/:na]
at org.sonar.server.plugins.InstalledPluginReferentialFactory.init(InstalledPluginReferentialFactory.java:48) ~[classes/:na]
at org.sonar.server.plugins.InstalledPluginReferentialFactory.start(InstalledPluginReferentialFactory.java:37) ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(ReflectionLifecycleStrategy.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.start(ReflectionLifecycleStrategy.java:89) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.start(AbstractInjectionFactory.java:84) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.AbstractBehavior.start(AbstractBehavior.java:169) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored$RealComponentLifecycle.start(Stored.java:132) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.behaviors.Stored.start(Stored.java:110) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.potentiallyStartAdapter(DefaultPicoContainer.java:1015) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.startAdapters(DefaultPicoContainer.java:1008) ~[picocontainer-2.14.3.jar:na]
at org.picocontainer.DefaultPicoContainer.start(DefaultPicoContainer.java:766) ~[picocontainer-2.14.3.jar:na]
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:91) ~[sonar-plugin-api-3.7.4.jar:na]
at org.sonar.server.platform.Platform.startDatabaseConnectors(Platform.java:251) ~[classes/:na]
at org.sonar.server.platform.Platform.init(Platform.java:189) ~[classes/:na]
at org.sonar.server.platform.PlatformLifecycleListener.contextInitialized(PlatformLifecycleListener.java:33) ~[classes/:na]
at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:746) ~[na:na]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:238) ~[na:na]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1240) ~[na:na]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:689) ~[na:na]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:482) ~[na:na]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) ~[jetty-util-7.6.11.v20130520.jar:7.6.11.v20130520]
at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:229) ~[na:na]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) ~[jetty-util-7.6.11.v20130520.jar:7.6.11.v20130520]
at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) ~[na:na]
at org.eclipse.jetty.server.Server.doStart(Server.java:281) ~[na:na]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) ~[jetty-util-7.6.11.v20130520.jar:7.6.11.v20130520]
at org.sonar.application.JettyEmbedder.start(JettyEmbedder.java:67) ~[sonar-application-3.7.4.jar:na]
at org.sonar.application.StartServer.main(StartServer.java:48) ~[sonar-application-3.7.4.jar:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_25]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_25]
at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_25]
at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240) ~[wrapper-3.2.3.jar:3.2.3]
at java.lang.Thread.run(Thread.java:724) ~[na:1.7.0_25]
INFO | jvm 1 | 2014/06/02 12:32:02 | 2014-06-02 12:32:02.897:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,file:/opt/sonar_home/war/sonar-server/},file:/opt/sonar_home/war/sonar-server
There was in fact an error on the plugin compatibility matrix which has been fixed now thanks to your feedback.
Please use the version 1.4 of cobertura plugin with version of Java 2.0. You can find it here.
Just a small update.
Cobertura 1.4 is verified to be working (no more error thrown out during sonar start) with Java 2.0 on Sonar 3.7.4.
You may want to update the compatibility Matrix as well.
Appreciate for the help.