Get IOException on websocket in "connected mode"

  • Operating system: Debian Stable 12
  • IDE name and version : Eclipse IDE for Java Developers 2024-12 (4.34.0)
  • SonarQube for Eclipse plugin version: 11.1.0.82589
  • Programming language you’re coding in: Java
  • Is connected mode used: true
    • SonarQube Cloud

I just face an “issue”. Not a big deal but not so cool for user experience.

Regularly, I face this popup :

The corresponding log seems to be :

Creating websocket connection to wss://events-api.sonarcloud.io/
WebSocket opened
sent 'subscribe' for project 'eclipse-leshan_leshan'
sent 'subscribe' for project 'eclipse-leshan_leshan'
Server event received: {"action":"subscribe","events":["MyNewIssues"],"status":"success"}
Server event received: {"action":"subscribe","events":["IssueChanged","QualityGateChanged","SecurityHotspotChanged","SecurityHotspotClosed","SecurityHotspotRaised","TaintVulnerabilityClosed","TaintVulnerabilityRaised"],"status":"success"}
Error occurred on the WebSocket

java.io.IOException: Connexion terminée par expiration du délai d'attente
	at java.base/sun.nio.ch.SocketDispatcher.read0(Native Method)
	at java.base/sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:47)
	at java.base/sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:341)
	at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:295)
	at java.base/sun.nio.ch.IOUtil.read(IOUtil.java:270)
	at java.base/sun.nio.ch.SocketChannelImpl.implRead(SocketChannelImpl.java:426)
	at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:493)
	at java.net.http/jdk.internal.net.http.SocketTube.readAvailable(SocketTube.java:1178)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.read(SocketTube.java:841)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowTask.run(SocketTube.java:181)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler$SchedulableTask.run(SequentialScheduler.java:207)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:280)
	at java.net.http/jdk.internal.net.http.common.SequentialScheduler.runOrSchedule(SequentialScheduler.java:233)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$InternalReadSubscription.signalReadable(SocketTube.java:782)
	at java.net.http/jdk.internal.net.http.SocketTube$InternalReadPublisher$ReadEvent.signalEvent(SocketTube.java:965)
	at java.net.http/jdk.internal.net.http.SocketTube$SocketFlowEvent.handle(SocketTube.java:253)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.handleEvent(HttpClientImpl.java:1478)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.lambda$run$3(HttpClientImpl.java:1423)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1597)
	at java.net.http/jdk.internal.net.http.HttpClientImpl$SelectorManager.run(HttpClientImpl.java:1423)

Closing SonarCloud WebSocket connection, reason=WebSocket was closed by server or reached EOL...
Creating websocket connection to wss://events-api.sonarcloud.io/
WebSocket opened
sent 'subscribe' for project 'eclipse-leshan_leshan'
sent 'subscribe' for project 'eclipse-leshan_leshan'

I suspect this is when connection is lost. (e.g. when my computer go to sleep)
So this sounds ok that connection is lost and a new one is recreated but maybe it should be done silently ? no need to annoy user with an error popup which makes think that something wrong happen ?

Hey @sbernard,

thanks for raising the topic. We discussed this internally and created a ticket for it. Still trying to find the root cause, we will come back to you on this. For now this can be ignored.

Best,
Tobias