@Julien_HENRY , could you please confirm the VM arguments to enforce the usage of the Proxy? In my company connections to sonarQube also need to go through a proxy and using the mentioned syntax, the direct connection is still tried. I believe, based on my attempts, that the syntax should be as documented for Maven: -DproxyHost=<Host> -DproxyPort=<Port>.
When I configure the sonar VMARGs as mentioned below, it starts the connection via the proxy (I can confirm this via tshark) but after a while a error is shown - see below - in the output window. It seem to be trying to reuse the connection even though it was closed. Can you help me understand what is the reason?
Thank you.
Warn - 12:44:58.706] Failed to request SonarLint notifications
[Trace - 12:44:58 PM] Received notification 'window/logMessage'.
[Warn - 12:44:58.707] java.lang.IllegalStateException: org.apache.hc.core5.http.ConnectionClosedException: Connection is closed
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:95)
(...)
We are using a connection pool, so indeed connections are reused. This is the first time I see this error, so I’m tempted to say the issue is coming from your proxy, not properly closing connections.
Out of curiosity, do you face the same problem when using SonarLint in Eclipse or IntelliJ?
Hey, thank you for reporting this. I created a ticket to track this issue: I managed to reproduce similar exceptions without a proxy.
[Warn - 14:29:41.278] Failed to request SonarLint notifications
[Warn - 14:29:41.279] java.lang.IllegalStateException: org.apache.hc.core5.http.ConnectionClosedException: Connection is closed
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.executeSync(ApacheHttpClient.java:95)
at org.sonarsource.sonarlint.ls.http.ApacheHttpClient.get(ApacheHttpClient.java:66)
at org.sonarsource.sonarlint.core.serverapi.ServerApiHelper.rawGet(ServerApiHelper.java:94)
at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(NotificationChecker.java:61)
at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(NotificationTimerTask.java:79)
at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.run(NotificationTimerTask.java:63)
at java.base/java.util.TimerThread.mainLoop(Timer.java:566)
at java.base/java.util.TimerThread.run(Timer.java:516)
Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection is closed
at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamDuplexer.disconnected(ClientHttp1StreamDuplexer.java:220)
at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onDisconnect(AbstractHttp1StreamDuplexer.java:400)
at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.disconnected(AbstractHttp1IOEventHandler.java:95)
at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.disconnected(ClientHttp1IOEventHandler.java:39)
at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.disconnected(SSLIOSession.java:212)
at org.apache.hc.core5.reactor.InternalDataChannel.disconnected(InternalDataChannel.java:193)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.processClosedSessions(SingleCoreIOReactor.java:231)
at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:133)
at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
at java.base/java.lang.Thread.run(Thread.java:833)