ConnectionClosedException in SonarLint VSCode when using a proxy

Hi, Sorry to bring this up again.

@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

Hi @che ,

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?

Sorry. I do not use Eclipse nor IntelliJ in the work environment.

Thank you for the Quick response.


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.core.serverapi.ServerApiHelper.rawGet(
	at org.sonarsource.sonarlint.core.notifications.NotificationChecker.request(
	at org.sonarsource.sonarlint.core.notifications.NotificationTimerTask.requestForServer(
	at java.base/java.util.TimerThread.mainLoop(
	at java.base/
Caused by: org.apache.hc.core5.http.ConnectionClosedException: Connection is closed
	at org.apache.hc.core5.http.impl.nio.ClientHttp1StreamDuplexer.disconnected(
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onDisconnect(
	at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.disconnected(
	at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.disconnected(
	at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.disconnected(
	at org.apache.hc.core5.reactor.InternalDataChannel.disconnected(
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.processClosedSessions(
	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(
	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(
	at java.base/