Comments (11)
@AkashKumarAM21 Reactor Netty never changes the class loaders, we don't have any logging about this.
from reactor-netty.
@AkashKumarAM21 Can you check for two versions of Reactor Netty in your dependencies?
from reactor-netty.
@AkashKumarAM21 Another thing that you might try to check is the change of the class loaders described here spring-projects/spring-boot#19427
from reactor-netty.
@AkashKumarAM21 Can you check for two versions of Reactor Netty in your dependencies?
@violetagg We can't have duplicate versions of same dependency and we fail if there are duplicate class paths from different packages, our build tools enforce it! I'll double check it though.
from reactor-netty.
This is the latest stack trace, after we upgraded the dependencies.
encountered due to root cause: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
at com.xxxx.xxxxx(xxxx.java:106) ~[classes!/:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.RuntimeException: Unexpected exception from Netty
at com.xxxx.xxxx(xxxx.java:89) ~[classes!/:?]
at java.io.OutputStream.write(OutputStream.java:162) ~[?:?]
at java.io.InputStream.transferTo(InputStream.java:783) ~[?:?]
at com.xxxx.xxxx(xxxx.java:252) ~[classes!/:?]
... 6 more
Suppressed: java.lang.RuntimeException: Unexpected exception from Netty
at com.xxxx.xxxx(xxxxxxx.java:89) ~[classes!/:?]
at com.xxxx.xxxx(xxxxxxx.java:66) ~[classes!/:?]
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:840) [?:?]
Caused by: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
at reactor.netty.http.server.HttpServerOperations.requestsCounter(HttpServerOperations.java:788) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at reactor.netty.http.server.HttpTrafficHandler.write(HttpTrafficHandler.java:307) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at reactor.netty.http.server.AbstractHttpServerMetricsHandler.write(AbstractHttpServerMetricsHandler.java:154) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
at reactor.netty.http.server.SimpleCompressionHandler.write(SimpleCompressionHandler.java:50) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:416) ~[Netty4-24-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
... 1 more
Caused by: java.lang.ClassCastException: class reactor.netty.http.server.HttpServerOperations cannot be cast to class java.util.concurrent.atomic.AtomicLong (reactor.netty.http.server.HttpServerOperations is in unnamed module of loader org.springframework.boot.loader.LaunchedURLClassLoader @39fb3ab6; java.util.concurrent.atomic.AtomicLong is in module java.base of loader 'bootstrap')
at reactor.netty.http.server.HttpServerOperations.requestsCounter(HttpServerOperations.java:788) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at reactor.netty.http.server.HttpTrafficHandler.write(HttpTrafficHandler.java:307) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at reactor.netty.http.server.AbstractHttpServerMetricsHandler.write(AbstractHttpServerMetricsHandler.java:154) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:863) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:968) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:856) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:113) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
at io.netty.handler.codec.MessageToMessageCodec.write(MessageToMessageCodec.java:116) ~[Netty4-2-4.1.jar!/:4.1.100.Final]
at reactor.netty.http.server.SimpleCompressionHandler.write(SimpleCompressionHandler.java:50) ~[reactor-netty-http-1.0.36.jar!/:1.0.36]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:879) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:940) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1247) ~[Netty4-23-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:173) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:166) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:416) ~[Netty4-24-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[Netty4-14-4.1.jar!/:4.1.100.Final]
... 1 more
```
from reactor-netty.
@AkashKumarAM21 Another thing that you might try to check is the change of the class loaders described here spring-projects/spring-boot#19427
@violetagg We already provide custom Executor for our runAsync
call, so this is not the issue ?
from reactor-netty.
@AkashKumarAM21 Can you provide a reproducible example so that we can investigate the issue?
from reactor-netty.
@AkashKumarAM21 Can you provide a reproducible example so that we can investigate the issue?
Thats where we came to a blocker, this exception is infrequently (like 1 request fails for every 200,000 requests) and we are unable to produce it. We tried upgrading our dependencies to check if thats going to fix the issue, not luck yet.
from reactor-netty.
@AkashKumarAM21 It is hard for us to proceed without a clear scenario/reproducible example.
from reactor-netty.
@AkashKumarAM21 It is hard for us to proceed without a clear scenario/reproducible example.
Yup, i understand that! we don't have any reproduction steps :(
Is there any feature/property that we can enable to get more information ? It would be helpfully if there is any logging or instrumentation we can turn on to get more details in this scenario.
from reactor-netty.
@AkashKumarAM21 I'm closing this as I cannot reproduce the issue. We can reopen it, if you are able to provide reproducible example.
from reactor-netty.
Related Issues (20)
- Cookie handling does not conform to RFC 6265 when sending multiple cookies
- CI: Add GitHub Actions to Auto-Format Java Files according to Checkstyle configuration HOT 2
- Connection prematurely closed BEFORE response on half closed connection HOT 19
- reactor netty (1.0.33) not able to decode the packet with PRI* method [PRI* HTTP/2.0] in HTTPS connection HOT 8
- org.springframework.web.reactive.function.client.WebClientRequestException: Connection prematurely closed BEFORE response HOT 2
- Tracing Context not logged in access-log when replacing ReactorNettyHttpTracing with standard HttpClient/HttpServer integration HOT 6
- HTTP client unable to specify which IP to bind to, what should I do? HOT 8
- HttpServer Underlying Downstream HttpClient Connection Getting Closed Quietly HOT 5
- Spring gateway use reactor netty switch thread spend too many time HOT 7
- TlsMetricsHandler throws NPE when used together with SniHandler HOT 2
- How to chain multiple send and receive operations with reactor-netty TcpClient HOT 1
- LEAK: ByteBuf.release() was not called before it's garbage-collected. HOT 4
- How to implement CORS in Reactor Netty? HOT 1
- Unable to add cookie in redirectRequestBiConsumer HOT 1
- Unable to configure Websocket compression when both HttpProtocol.H2C and HttpProtocol.HTTP1.1 are configured HOT 2
- Is it possible to be able to add custom labels to the metrics already being emitted HOT 2
- Regression from SpringBoot 3.2.2 Factory method 'webClientHttpConnector' threw exception with message: Cannot reserve 49152 bytes of direct buffer memory (allocated: 10452747, limit: 10485760) HOT 8
- out of memory when prometheus is enabled and url with path varaible HOT 5
- Error decoding client data HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactor-netty.