Stream Failed - Premature end of chunk

We are seeing the following error in both Eclipse and VS Code running that latest version of the SonarQube for IDE plugin. We were seeing these errors both on SonarQube Server 9.9 LTS and post upgrade to 2025.1 LTA. Our SonarQube instance runs in a Docker Container.

Full Error:

Stream failed

org.apache.hc.core5.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
       at org.apache.hc.core5.http.impl.nio.ChunkDecoder.readChunkHead(ChunkDecoder.java:138)
       at org.apache.hc.core5.http.impl.nio.ChunkDecoder.read(ChunkDecoder.java:205)
       at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:322)
       at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
       at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:41)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:624)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202)
       at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:142)
       at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
       at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
       at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
       at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:86)
       at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
       at java.base/java.lang.Thread.run(Thread.java:1583)

IDE and Plugin Details:

Eclipse
Version: 2024-12 (4.34.0)
Build id: 20241128-0757
SonarQube for IDE: 10.12

VS Code
Version: 1.96.4
SonarQube for IDE: 4.15.0

Any thoughts or ideas on what might be wrong, and things to try to solve it?

Hello @zusijepi,

Thanks for reporting here.

This error is related to notifications. SonarQube for IDE opens a permanent connection with the server to receive updates about what happens on the server, using the Server-Sent Events technology.

Premature end of chunk coded message body: closing chunk expected

At what moment are you seeing this error? It it randomly happening? Could you enable verbose logging and share traces here? Another thing you can look at if you have access are the server-side logs

At what moment are you seeing this error?

We see the error 1-2 times a minutes in the IDE.

It it randomly happening?

It appears to be random.

Could you enable verbose logging and share traces here?

Here is the output from Eclipse after enabling verbose logging.

Disconnected from server event-stream, reconnecting now
Connecting to server event-stream at 'api/push/sonarlint_events?projectKeys=*****&languages=abap,apex,css,cobol,web,java,jcl,js,kotlin,php,pli,plsql,py,rpg,ruby,scala,secrets,tsql,ts,jsp,xml'...
Connected to server event-stream
Stream failed

org.apache.hc.core5.http.ConnectionClosedException: Premature end of chunk coded message body: closing chunk expected
       at org.apache.hc.core5.http.impl.nio.ChunkDecoder.readChunkHead(ChunkDecoder.java:138)
       at org.apache.hc.core5.http.impl.nio.ChunkDecoder.read(ChunkDecoder.java:205)
       at org.apache.hc.core5.http.impl.nio.AbstractHttp1StreamDuplexer.onInput(AbstractHttp1StreamDuplexer.java:325)
       at org.apache.hc.core5.http.impl.nio.AbstractHttp1IOEventHandler.inputReady(AbstractHttp1IOEventHandler.java:64)
       at org.apache.hc.core5.http.impl.nio.ClientHttp1IOEventHandler.inputReady(ClientHttp1IOEventHandler.java:41)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:641)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$200(SSLIOSession.java:74)
       at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:202)
       at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:143)
       at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
       at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:176)
       at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:125)
       at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:92)
       at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
       at java.base/java.lang.Thread.run(Thread.java:1583)

Disconnected from server event-stream, reconnecting now

Another thing you can look at if you have access are the server-side logs

The server logs aren’t showing any errors or information that would look to be a problem.

Thanks.

Hello,

Do you know if there is a proxy between you and your SonarQube Server instance? Or do you have any network/security/monitoring tool installed on your machine? It appears something is disconnecting the long lasting connection with the server