You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In my company's project we have added http2 configuration in the gateway mode when setting up CosmosDB async client.
Reasoning was to optimize the http requests with the benefits of http2 protocol.
After this setup we have observed the following in our logs occasionally: WARN [2025-10-17 08:27:25,259] io.netty.channel.DefaultChannelPipeline: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. ! java.net.SocketException: Connection reset
Checking the operations outcomes it seems CosmosDB queries are working as expected(createItem, patchItem, queryItems etc all work fine)
Seems like an internal netty issue ? inside the CosmosDB client execution.
Exception or Stack Trace
WARN [2025-10-17 08:27:25,259] io.netty.channel.DefaultChannelPipeline: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
! java.net.SocketException: Connection reset
! at java.base/sun.nio.ch.SocketChannelImpl.throwConnectionReset(SocketChannelImpl.java:401)
! at java.base/sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:434)
! at io.netty.buffer.PooledByteBuf.setBytes(PooledByteBuf.java:255)
! at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1132)
! at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:356)
! at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:151)
! at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:796)
! at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:732)
! at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:658)
! at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
! at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:998)
! at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
! at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
! at java.base/java.lang.Thread.run(Thread.java:1583)
To Reproduce
Using the code snippet below perform various CosmosDB container actions(createItem, patchItem, queryItems)
The Azure Cosmos DB account is accessible only through a private endpoint and doesn't export a public endpoint.
Code Snippet
Example code setting up the java client:
Expected behavior
CosmosDB java sdk actions shouldn't lead to such exceptions that show that something is not performing as expected in the underlying sockets, raising doubts about the operations succeeding or not.
Or in the http2 configuration a way to handle the underlying netty functionality should have been exposed in case the end user needs to adjust any netty configuration.
Screenshots
Setup (please complete the following information):
OS: [Linux myhostname 5.15.0-1092-azure 0.3.0 release changes #101-Ubuntu SMP Fri Jun 27 23:08:17 UTC 2025 aarch64 aarch64 aarch64 GNU/Linux]
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
Describe the bug
In my company's project we have added http2 configuration in the gateway mode when setting up CosmosDB async client.
Reasoning was to optimize the http requests with the benefits of http2 protocol.
After this setup we have observed the following in our logs occasionally:
WARN [2025-10-17 08:27:25,259] io.netty.channel.DefaultChannelPipeline: An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception. ! java.net.SocketException: Connection resetChecking the operations outcomes it seems CosmosDB queries are working as expected(createItem, patchItem, queryItems etc all work fine)
Seems like an internal netty issue ? inside the CosmosDB client execution.
Exception or Stack Trace
To Reproduce
Using the code snippet below perform various CosmosDB container actions(createItem, patchItem, queryItems)
The Azure Cosmos DB account is accessible only through a private endpoint and doesn't export a public endpoint.
Code Snippet
Example code setting up the java client:
Expected behavior
CosmosDB java sdk actions shouldn't lead to such exceptions that show that something is not performing as expected in the underlying sockets, raising doubts about the operations succeeding or not.
Or in the http2 configuration a way to handle the underlying netty functionality should have been exposed in case the end user needs to adjust any netty configuration.
Screenshots
Setup (please complete the following information):
Additional context
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report