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

ERR proxy upstream not available with camellia proxy #356

Open
jzhao20230918 opened this issue Nov 27, 2024 · 7 comments
Open

ERR proxy upstream not available with camellia proxy #356

jzhao20230918 opened this issue Nov 27, 2024 · 7 comments
Labels
question Further information is requested

Comments

@jzhao20230918
Copy link

Module: camellia-redis-proxy
Version: 1.2.30

hello,

I'm using camellia proxy to proxy a redis cluster. I tried with the command EVALSHA and got an error "ERR proxy upstream not available". It is working if send the command directly to the redis cluster.
The config is:
server: port: 6379 spring: application: name: camellia-redis-proxy-server camellia-redis-proxy: password: test console-port: 6380 monitor-enable: false monitor-interval-seconds: 60 plugins: - monitorPlugin - bigKeyPlugin - hotKeyPlugin transpond: type: local local: type: simple resource: redis-cluster://[email protected]:6370

Any help is greatly appreciated.

@jzhao20230918 jzhao20230918 added the question Further information is requested label Nov 27, 2024
@caojiajun
Copy link
Collaborator

any proxy log?

@jzhao20230918
Copy link
Author

jzhao20230918 commented Nov 27, 2024

any proxy log?

2024-11-27 02:36:02,512 ERROR camellia-work-group-3-2 c.n.n.c.r.p.u.ErrorLogCollector:91 - com.netease.nim.camellia.redis.proxy.command.CommandsTransponder:sendCommand error, bid = null, bgroup = null, ex = java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException: null
2024-11-27 02:36:08,831 ERROR error-log-collector-pool-10-thread-1 c.n.n.c.r.p.u.ErrorLogCollector:108 - com.netease.nim.camellia.redis.proxy.command.CommandsTransponder:sendCommand error, bid = null, bgroup = null, ex = java.lang.ArrayIndexOutOfBoundsException, count = 1

@jzhao20230918
Copy link
Author

I connect the proxy as Standalone/single node mode.

@jzhao20230918
Copy link
Author

2024-11-27 03:25:38,956 ERROR camellia-work-group-3-1 c.n.n.c.r.p.u.ErrorLogCollector:91 - com.netease.nim.camellia.redis.proxy.command.CommandsTransponder:sendCommand error, bid = null, bgroup = null, ex = java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 1
java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 1
at com.netease.nim.camellia.redis.proxy.util.KeyParser.evalOrFcall(KeyParser.java:179)
at com.netease.nim.camellia.redis.proxy.util.KeyParser.findKeys(KeyParser.java:50)
at com.netease.nim.camellia.redis.proxy.command.Command.getKeys(Command.java:74)
at com.netease.nim.camellia.redis.proxy.upstream.cluster.RedisClusterClient.sendCommand(RedisClusterClient.java:285)
at com.netease.nim.camellia.redis.proxy.upstream.UpstreamRedisClientTemplate.sendCommand(UpstreamRedisClientTemplate.java:212)
at com.netease.nim.camellia.redis.proxy.command.CommandsTransponder.flush0(CommandsTransponder.java:505)
at com.netease.nim.camellia.redis.proxy.command.CommandsTransponder.flush(CommandsTransponder.java:477)
at com.netease.nim.camellia.redis.proxy.command.CommandsTransponder.transpond(CommandsTransponder.java:424)
at com.netease.nim.camellia.redis.proxy.command.CommandInvoker.invoke(CommandInvoker.java:104)
at com.netease.nim.camellia.redis.proxy.netty.ServerHandler.channelRead0(ServerHandler.java:35)
at com.netease.nim.camellia.redis.proxy.netty.ServerHandler.channelRead0(ServerHandler.java:16)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:93)
at com.netease.nim.camellia.redis.proxy.netty.InitHandler.channelRead(InitHandler.java:69)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
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)
2024-11-27 03:25:40,283 ERROR error-log-collector-pool-9-thread-1 c.n.n.c.r.p.u.ErrorLogCollector:108 - com.netease.nim.camellia.redis.proxy.command.CommandsTransponder:sendCommand error, bid = null, bgroup = null, ex = java.lang.ArrayIndexOutOfBoundsException: Index 2 out of bounds for length 1, count = 1

@caojiajun
Copy link
Collaborator

EVAL script numkeys [key [key ...]] [arg [arg ...]]

you missing numbeys param

@jzhao20230918
Copy link
Author

EVAL script numkeys [key [key ...]] [arg [arg ...]]

you missing numbeys param

Yes, I'm trying with "EVALSHA_RO" only. With directly connected I got "ERR wrong number of arguments for 'evalsha_ro' command" and with proxy I got "ERR proxy upstream not available". So it is just difference with the error messages? Thanks.

@caojiajun
Copy link
Collaborator

proxy should optimize the error msg, could you pls make a pull request to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants