Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Seeing unhandled exception when client reacts to sentinel failover #396

Open
rmmasse40 opened this issue Jul 6, 2023 · 2 comments
Open
Labels
Milestone

Comments

@rmmasse40
Copy link
Contributor

Questions

Version

4.3.8

Context

2023-07-06T12:41:44,081 [vert.x-eventloop-thread-6] ERROR ContextBase - Unhandled exception
java.lang.ClassCastException: class io.vertx.redis.client.impl.PooledRedisConnection cannot be cast to class io.vertx.redis.client.impl.RedisStandaloneConnection (io.vertx.redis.client.impl.PooledRedisConnection and io.vertx.redis.client.impl.RedisStandaloneConnection are in unnamed module of loader 'app')
at io.vertx.redis.client.impl.RedisSentinelClient.lambda$null$0(RedisSentinelClient.java:91) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.impl.EventLoopContext.execute(EventLoopContext.java:76) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.impl.ContextBase.execute(ContextBase.java:232) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.redis.client.impl.RedisStandaloneConnection.handle(RedisStandaloneConnection.java:362) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.redis.client.impl.RESPParser.handleResponse(RESPParser.java:296) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:128) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.redis.client.impl.RESPParser.handle(RESPParser.java:24) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.net.impl.NetSocketImpl.lambda$new$1(NetSocketImpl.java:100) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.streams.impl.InboundBuffer.handleEvent(InboundBuffer.java:239) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.streams.impl.InboundBuffer.write(InboundBuffer.java:129) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.net.impl.NetSocketImpl$DataMessageHandler.handle(NetSocketImpl.java:414) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.impl.EventLoopContext.emit(EventLoopContext.java:55) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.impl.ContextBase.emit(ContextBase.java:239) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.net.impl.NetSocketImpl.handleMessage(NetSocketImpl.java:390) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:157) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[braincloud-rtt-manager.jar:D4.15.0-398]
at java.lang.Thread.run(Thread.java:829) ~[?:?]

Do you have a reproducer?

Steps to reproduce

  1. connect to sentinel ("redis-cli -p 26379"
  2. initiate failover "sentinel failover

Extra

Using Java 11. Have two types of clients, one does a blpop to listen on a queue, the other subscribes to a channel

@rmmasse40 rmmasse40 added the bug label Jul 6, 2023
@vietj
Copy link
Contributor

vietj commented Jul 6, 2023

can you provide a PR with a modified test that fails like this @rmmasse40 ?

@vietj vietj added this to the 4.4.5 milestone Jul 6, 2023
@Ladicek
Copy link
Contributor

Ladicek commented Jul 7, 2023

I believe this is exactly what I found in this commit: Ladicek@0dffca4

Once the metrics/tracing work is merged, assuming the commit is kept, this would be fixed.

@vietj vietj modified the milestones: 4.4.5, 4.4.6 Aug 30, 2023
@vietj vietj modified the milestones: 4.4.6, 4.5.0 Sep 12, 2023
@vietj vietj modified the milestones: 4.5.0, 4.5.1 Nov 15, 2023
@vietj vietj modified the milestones: 4.5.1, 4.5.2 Dec 13, 2023
@vietj vietj modified the milestones: 4.5.2, 4.5.3 Jan 30, 2024
@vietj vietj modified the milestones: 4.5.3, 4.5.4 Feb 6, 2024
@vietj vietj modified the milestones: 4.5.4, 4.5.5 Feb 22, 2024
@vietj vietj modified the milestones: 4.5.5, 4.5.6 Mar 14, 2024
@vietj vietj modified the milestones: 4.5.6, 4.5.7, 4.5.8 Mar 21, 2024
@vietj vietj modified the milestones: 4.5.8, 4.5.9 May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants