SonarLint for Eclipse does not connect to server

825 views
Skip to first unread message

leone....@gmail.com

unread,
Jan 20, 2017, 3:49:22 AM1/20/17
to SonarLint
Hi guys ... I' ve got a problem with SonarLint and my eclipse:
Eclipse is Neon.1 and Sonarlint version 2.5.1

When I try to connect to my server i get this error:

Fail to request http://server1/sonar/api/system/status
java.lang.IllegalStateException: Fail to request http://cmal132p.hbl.local/sonar/api/system/status
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:305)
    at org.sonarqube.ws.client.HttpConnector.get(HttpConnector.java:245)
    at org.sonarqube.ws.client.HttpConnector.call(HttpConnector.java:234)
    at org.sonarsource.sonarlint.core.container.connected.SonarLintWsClient.rawGet(SonarLintWsClient.java:99)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.fetchServerInfos(ServerVersionAndStatusChecker.java:96)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:60)
    at org.sonarsource.sonarlint.core.container.connected.validate.ServerVersionAndStatusChecker.checkVersionAndStatus(ServerVersionAndStatusChecker.java:50)
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:48)
    at org.sonarsource.sonarlint.core.WsHelperImpl.validateConnection(WsHelperImpl.java:43)
    at org.sonarlint.eclipse.core.internal.server.Server.testConnection(Server.java:318)
    at org.sonarlint.eclipse.ui.internal.server.wizard.ServerConnectionTestJob.run(ServerConnectionTestJob.java:44)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: java.net.SocketTimeoutException: Read timed out
    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 okio.Okio$2.read(Okio.java:140)
    at okio.AsyncTimeout$2.read(AsyncTimeout.java:238)
    at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
    at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
    at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
    at okhttp3.internal.http.Http1xStream.readResponse(Http1xStream.java:184)
    at okhttp3.internal.http.Http1xStream.readResponseHeaders(Http1xStream.java:125)
    at okhttp3.internal.http.HttpEngine.readNetworkResponse(HttpEngine.java:775)
    at okhttp3.internal.http.HttpEngine.access$200(HttpEngine.java:86)
    at okhttp3.internal.http.HttpEngine$NetworkInterceptorChain.proceed(HttpEngine.java:760)
    at okhttp3.internal.http.HttpEngine.readResponse(HttpEngine.java:613)
    at okhttp3.RealCall.getResponse(RealCall.java:244)
    at okhttp3.RealCall$ApplicationInterceptorChain.proceed(RealCall.java:201)
    at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:163)
    at okhttp3.RealCall.execute(RealCall.java:57)
    at org.sonarqube.ws.client.HttpConnector.doCall(HttpConnector.java:302)
    ... 11 more

but if i put http://server1/sonar/api/system/status on a browser it works correctly

On server1 there is an apache server that redirect to sonar server with this config :

<Location /sonar>
    RequestHeader unset iv-user

    ProxyPass http://serverSONAR:9000/sonar timeout=150
    ProxyPassReverse http://serverSONAR:9000/sonar
</Location>

Can u help me?

giga...@gmail.com

unread,
May 24, 2017, 4:46:44 AM5/24/17
to SonarLint, leone....@gmail.com
Same issue :(

Julien HENRY

unread,
May 29, 2017, 4:31:14 AM5/29/17
to giga...@gmail.com, SonarLint, leone....@gmail.com
Hi guys,

SonarLint is configured with a read timeout of 60s (I think this is already enough). Looking at your Apache configuration, I saw you configured a timeout of 150s. Do you really need that time to receive a response from your server?

When opening the URL in your browser, is the response fast to complete? When you hit the "test connection" button in SonarLint server configuration wizard, can you confirm it takes 60 s to fail (to be sure the read timeout is effective).

++

Julien Henry | SonarSource

Developer

http://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sonarlint/205b4933-e164-45f9-87a8-32254c47ff30%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

david...@gmail.com

unread,
May 29, 2017, 5:54:02 AM5/29/17
to SonarLint, leone....@gmail.com, giga...@gmail.com
same here.. 

IntelliJ IDEA 2017.1.3
Build #IU-171.4424.56, built on May 12, 2017
Licensed to <xxx>
Subscription is active until January 13, 2018
JRE: 1.8.0_112-release-736-b21 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.11.6

SonarLint 2.10.0.1922

SonarQube is up and running inside a VM, a request to:  http://localhost:9000/api/system/status  
returns the following response:  {"id":"AVw6vL-z9PrREhWM2rQp","version":"6.3.1.21392","status":"UP"}

let me know if i can provide some more infos.

kind regards
~david

Julien HENRY

unread,
Jun 6, 2017, 6:14:14 AM6/6/17
to david...@gmail.com, SonarLint, leone....@gmail.com, Damien Guérin
Hi guys,

What I need to know is: does the current read timeout that is hardcoded in SonarLint (60s) really working? When you click on the "test connection" button, do you have to wait for 1 min before receiving the error message or does it fail instantly?
If the read timeout is working as expected, and you are asking to increase the value (or making it configurable) then I'm tempted to say no :)

If that's another issue then I need you help to find it (maybe use wireshark to see what's happening).

++

Julien Henry | SonarSource

Developer

http://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.

myst...@gmail.com

unread,
May 17, 2018, 3:54:53 AM5/17/18
to SonarLint
Same here too. I use Intellij 2018.1.x and keep getting the error: Plugin SonarLint was not installed: Cannot download 'http://plugins.jetbrains.com/pluginManager/?action=download&id=org.sonarlint.idea&build=IU-181.4892.42&uuid=d15d1d30-5be3-4cf2-be48-f5faf4cd2635': Read timed out

But if I paste the url in the browser it starts the download.

Op maandag 29 mei 2017 11:54:02 UTC+2 schreef david linse:
same here.. 

IntelliJ IDEA 2017.1.3
Build #IU-171.4424.56, built on May 12, 2017
Licensed to <xxx>
Subscription is active until January 13, 2018.

Julien HENRY

unread,
May 17, 2018, 4:08:14 AM5/17/18
to myst...@gmail.com, SonarLint
Here it seems to be a different problem. You have a connection issue between IntelliJ and Jetbrains plugin repository. Nothing specific to SonarLint (appart that SonarLint is quite a fat plugin). I guess you have a company proxy, I would check with your infra team.

Julien Henry | SonarSource

Developer

https://sonarsource.com


--
You received this message because you are subscribed to the Google Groups "SonarLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonarlint+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages