SonarLint Eclipse connecting to SonarQube server gives "No storage for server 'sonar'. Please update." - eclipse

My company upgraded to SonarQube 5.3. This requires changing from the SonarQube plugin for Eclipse to SonarLint. I regret that upgrade because my project quality profile contains 494 rules and only 12 are from Squid, so we have a massive project to make SonarLint in Eclipse at all useful. But I'm trying to install SonarLint 2.0.2 on my PC anyway. When I try to test the connection to the SQ server I get an error in the SonarLint Console. What's the problem?
No storage for server 'sonar'. Please update.
Fail to request https://sonar.forge.mycompany.com:9000/api/system/status
java.lang.IllegalStateException: Fail to request https://sonar.forge.mycompany.com:9000/api/system/status
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:202)
at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:144)
at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:133)
at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:98)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:97)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:61)
at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:51)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:50)
at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:45)
at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:244)
at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
at sun.security.ssl.InputRecord.handleUnknownRecord(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.squareup.okhttp.internal.io.RealConnection.connectTls(RealConnection.java:192)
at com.squareup.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:149)
at com.squareup.okhttp.internal.io.RealConnection.connect(RealConnection.java:112)
at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184)
at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126)
at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95)
at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281)
at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224)
at com.squareup.okhttp.Call.getResponse(Call.java:286)
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243)
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205)
at com.squareup.okhttp.Call.execute(Call.java:80)
at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:199)
... 11 more

Port 9000 is the default HTTP-Port for SonarQube. SonarLint proposes https:// when configuring a new server connection.
So, if you just change
https://sonar.forge.mycompany.com:9000
to
http://sonar.forge.mycompany.com:9000
and you probably can connect SonarLint with SonarQube.

You're focused on the wrong thing. The "No Storage..." message won't stop it from working, I get that all the time with the latest sonar/sonar lint.
Have a look at your server configuration. It looks like there's a protocol mismatch...
java.lang.IllegalStateException: Fail to request https://sonar.forge.mycompany.com:9000/api/system/status
.
.
.
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?

Related

java.io.IOException: Invalid argument at java.io.WinNTFileSystem.canonicalize0

I am using Eclipse Mars with Tomcat v8.0.30 ,jre 1.8.0_73. Yesterday I didnt have any problems but today my Tomcat server fail to start. A dialog pops up and it says: "Starting Tomcat v8.0 Server at localhost has encountered a problem. Server Tomcat v8.0 Server at localhost failed to start.
I have this error in the console:
org.apache.catalina.startup.Bootstrap initClassLoaders
SEVERE: Class loader creation threw exception
java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.WinNTFileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at java.io.File.getCanonicalFile(Unknown Source)
at org.apache.catalina.startup.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:168)
at org.apache.catalina.startup.Bootstrap.createClassLoader(Bootstrap.java:201)
at org.apache.catalina.startup.Bootstrap.initClassLoaders(Bootstrap.java:146)
at org.apache.catalina.startup.Bootstrap.init(Bootstrap.java:256)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
I have Tomcat EE v7.0 server which gives me the exact same problem.
I reinstalled Eclipse and Tomcat , I restarted my PC , I restored default options multiple times. I created new server couple of times and I even deleted "org.eclipse.core.resources" and the result is still the same.
Any suggestions?
I suspect your CATALINA_HOME is set wrong. Usually users writing path\bin; where it is only-path-to-tomcat without bin or any folder.
Remove backslash \ at the end of the CATALINA_HOME
You must check your tomcat log catalina.out to trace the route cause
Also check your TOMCAT_HOME/conf/catalina.properties file. There may be some unseen character that causesjava.io.IOException: Invalid argument

Issue with MyEclipse Proxy Connection

I am unable to get MyEclipse to connect to the marketplace. I am aware of the proxy setup. These are the steps I followed within a proxy environment and within a direct environment.
A. Within the Company Network. (browers use automatic configuration script)
Chose Native option. Does not work.
Chose Manual option. Set the domain, username. Opened the proxy script to figure out available proxy servers. Verified independently that these proxy servers work. Does not work.
Modified the vmargs to provide the http host, user, password and port properties. Does not work.
Did steps 1-3 with restarts of Eclipse.
B. Within home environment. (Direct connection to internet)
Tried Direct Option. Does not work.
Tried Native Option. Does not work.
The error message that I constantly see (through error logs) is this.
java.lang.reflect.InvocationTargetException
at org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand$3.run(MarketplaceWizardCommand.java:203)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: org.eclipse.core.runtime.CoreException: HTTP Server Unknown HTTP Response Code (-1):http://marketplace.eclipse.org/catalogs/api/p
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.stream(RepositoryTransport.java:161)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.epp.internal.mpc.core.util.AbstractP2TransportFactory.invokeStream(AbstractP2TransportFactory.java:35)
at org.eclipse.epp.internal.mpc.core.util.TransportFactory$1.stream(TransportFactory.java:69)
at org.eclipse.epp.internal.mpc.core.service.RemoteMarketplaceService.processRequest(RemoteMarketplaceService.java:141)
at org.eclipse.epp.internal.mpc.core.service.RemoteMarketplaceService.processRequest(RemoteMarketplaceService.java:80)
at org.eclipse.epp.internal.mpc.core.service.DefaultCatalogService.listCatalogs(DefaultCatalogService.java:36)
at org.eclipse.epp.internal.mpc.ui.commands.MarketplaceWizardCommand$3.run(MarketplaceWizardCommand.java:200)
... 1 more
Caused by: org.eclipse.ecf.filetransfer.BrowseFileTransferException: Could not connect to http://marketplace.eclipse.org/catalogs/api/p
at com.genuitec.pulse2.common.http.ecf.PulseRetrieveFileTransfer.openStreams(Unknown Source)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:889)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.sendRetrieveRequest(FileReader.java:349)
at org.eclipse.equinox.internal.p2.transport.ecf.FileReader.read(FileReader.java:213)
at org.eclipse.equinox.internal.p2.transport.ecf.RepositoryTransport.stream(RepositoryTransport.java:153)
... 11 more
Is there any alternative or any other step that I can take to resolve this problem. I know I can go through the manual update by downloading the plugin and all. But I really want to solve this issue.
MyEclipse Version Information:
MyEclipse Blue Edition
Version: 10.7.1 Blue
Build id: 10.7.1-Blue-20130201
Apparently it could be a bug.
I just read this whole bug report here.
I tried adding the VM arguments to ensure the the HTTPClient workaround can be achieved via a configuration change. Did not work.
However, I was able to remove the http client libraries from the plugins folder, courtesy Comment #27 and #29 on the bug report.
Now I'm able to connect over proxy and direct as well.

Error when trying to create a new JBOSS OpenShift project

I am trying to have a play around with openshift, but am running into a config issue at the first hurdle.
i have RedHatJBOSS Developer Studio 8.0.0 installed, and have the JBOSS Integration and SOA Development Plugin installed.
I also have an openshift user account and can login just fine to their website.
Basically, when I select the create openshift project from the JBoss central page, and enter my valid openshift credentials and pres next, it tries to connect and immediately throws an error stating an SSL handshake exception occurred (details below).
I am a bit lost if I am honest; is there something I need to install?
I am using JRE 7 in case that is significant
com.openshift.client.OpenShiftEndpointException: Could not request https://openshift.redhat.com/broker/rest/api: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.openshift.internal.client.RestService.request(RestService.java:120)
at com.openshift.internal.client.RestService.request(RestService.java:92)
at com.openshift.internal.client.AbstractOpenShiftConnectionFactory.getConnection(AbstractOpenShiftConnectionFactory.java:36)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:198)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:158)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:114)
at com.openshift.client.OpenShiftConnectionFactory.getConnection(OpenShiftConnectionFactory.java:103)
at org.jboss.tools.openshift.express.internal.core.connection.Connection.createUser(Connection.java:229)
at org.jboss.tools.openshift.express.internal.core.connection.Connection.connect(Connection.java:205)
at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPageModel.connect(ConnectionWizardPageModel.java:247)
at org.jboss.tools.openshift.express.internal.ui.wizard.connection.ConnectionWizardPage$ConnectJob.run(ConnectionWizardPage.java:479)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: com.openshift.internal.client.httpclient.HttpClientException: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:201)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:161)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:140)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.get(UrlConnectionHttpClient.java:99)
at com.openshift.internal.client.RestService.request(RestService.java:160)
at com.openshift.internal.client.RestService.request(RestService.java:107)
... 11 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:85)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:57)
at java.lang.reflect.Constructor.newInstance(Constructor.java:541)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1686)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1684)
at java.security.AccessController.doPrivileged(AccessController.java:330)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1682)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1255)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:479)
at com.ibm.net.ssl.www2.protocol.https.b.getResponseCode(b.java:40)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:184)
... 16 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at com.ibm.jsse2.j.a(j.java:33)
at com.ibm.jsse2.j.a(j.java:31)
at com.ibm.jsse2.qc.b(qc.java:190)
at com.ibm.jsse2.qc.a(qc.java:456)
at com.ibm.jsse2.qc.h(qc.java:352)
at com.ibm.jsse2.qc.a(qc.java:523)
at com.ibm.jsse2.qc.startHandshake(qc.java:730)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:70)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:9)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1311)
at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:89)
at com.openshift.internal.client.httpclient.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:157)
... 15 more
This looks very weird, I didnt spot this so far. SSL handshake is failing for some unknown reason.
What is the exact version of your JDK7?
What is your OS?
Cheers
Andre

java.net.SocketException: Socket closed, JMeter

I'm using JMeter with a load of 3-6 users. And I often get the exception below. Please, tell me what is the cause of this problem? Is this a trouble with JMeter or with server's application? thank you in advance.
Exception is next:
java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
at org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
at org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:61)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
at org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
at org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
at org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
at org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:715)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:520)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:481)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:298)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1094)
at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257)
at java.lang.Thread.run(Unknown Source)
Okay i had this problem and the solution i tried and worked was to update Java version. From 1.8 to 1.12.
As it is a Jar (a Java program compiled) if you try to run it with a previous version of java it might result in this error.
This works for me:
Search "Update Java" on your computer menu and select it, after, on the Java Control Panel, select the option "Update". Now, select "Update Now". Wait for the installation and don't forget to select "Ok" to the end.
When Java is update, the POST works on JMeter. This is the same solution of AndiFB's answer.
Connection Reset since JMeter 2.10 ?
If you upgraded recently to JMeter 2.10 or 2.11, you may have noticed increased errors of this type:
Socket closed
Non HTTP response code: org.apache.http.NoHttpResponseException (the target server failed to respond)
Explanation
The increase of this type of errors can be explained by two settings changes:
retry of failing request (idempotent ones only) has been disabled in JMeter 2.10
stale check in HTTP Client 3 and 4 implementations has been disabled in JMeter 2.11
Why these changes?
Previous retry default settings led to increased number of Requests in certain type of failures.
Previous stale check was a bit expensive, as it applied to every sample. That is why the default was changed to disable it.
Retry or stale check can hide issues on Server configuration:
Server failing to send the (optional) Keep-Alive header
Overwhelmed server refusing connection, retrying would increase load
Changing configuration:
If you think this server behavior is OK, then configuration can be changed in two places:
Enabling retry
For HttpClient 4, in user.properties set :
httpclient4.retrycount=1
This will make JMeter retry once. For HttpClient 3, in user.properties set:
httpclient3.retrycount=1
This will make JMeter retry once.
Enabling stale check
For HC4 Implementation:
In user.properties:
hc.parameters.file=hc.parameters
In hc.parameters set:
http.connection.stalecheck$Boolean=true
For HC3 Implementation:
In user.properties:
httpclient.parameters.file=httpclient.parameters
In httpclient.parameters set:
http.connection.stalecheck$Boolean=true
New setting in JMeter 2.12
Upcoming version of JMeter adds a setting to add an idle connection timeout if the server does not send Keep-Alive headers.
This value is in milliseconds:
httpclient4.idletimeout=

Error constantly thrown by JBoss

2011-06-02 17:27:01,990 ERROR [org.apache.tomcat.util.net.PoolTcpEndpoint] Socket error caused by remote host /a.b.c.d
java.net.SocketException: Invalid argument
at java.net.PlainSocketImpl.socketSetOption(Native Method)
at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:264)
at java.net.Socket.setTcpNoDelay(Socket.java:839)
at org.apache.tomcat.util.net.PoolTcpEndpoint.setSocketOptions(PoolTcpEndpoint.java:503)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:515)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
This is most likely an error in your JVM. If so, its been fixed in the latest VMs.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6378870
What version of Java are you using and on what platform?
Can you provide more info on the issue?