Do not fail if COMMAND command fails on startup
See original GitHub issuehello,i use lettuce to connect to tile38,but there is some exception. i can use normal with the tile38-cli. my tile38 version is 1.10.0, lettuce version is lettuce-core 5.0.1.RELEASE. my java code is
package com.hdnav;
import io.lettuce.core.dynamic.Commands;
public interface KeyCommands extends Commands{
String get(String key);
}
package com.hdnav;
import io.lettuce.core.RedisClient;
import io.lettuce.core.dynamic.RedisCommandFactory;
public class Tile{
public static void main(String[] args) {
RedisClient client = RedisClient.create("redis://190.0.0.35:9851");
RedisCommandFactory factory = new RedisCommandFactory(client.connect());
KeyCommands commands = factory.getCommands(KeyCommands.class);
String value = commands.get("Walter");
System.out.println(value);
}
}
my log is
Exception in thread "main" io.lettuce.core.RedisCommandExecutionException: ERR unknown command 'COMMAND'
at io.lettuce.core.LettuceFutures.awaitOrCancel(LettuceFutures.java:122)
at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:62)
at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
at com.sun.proxy.$Proxy0.command(Unknown Source)
at io.lettuce.core.dynamic.RedisCommandFactory.getCommands(RedisCommandFactory.java:129)
at io.lettuce.core.dynamic.RedisCommandFactory.<init>(RedisCommandFactory.java:121)
at io.lettuce.core.dynamic.RedisCommandFactory.<init>(RedisCommandFactory.java:104)
at com.hdnav.Tile.main(Tile.java:16)
Caused by: io.lettuce.core.RedisCommandExecutionException: ERR unknown command 'COMMAND'
at io.lettuce.core.protocol.AsyncCommand.completeResult(AsyncCommand.java:118)
at io.lettuce.core.protocol.AsyncCommand.complete(AsyncCommand.java:109)
at io.lettuce.core.protocol.CommandHandler.decode(CommandHandler.java:558)
at io.lettuce.core.protocol.CommandHandler.channelRead(CommandHandler.java:511)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:138)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)
at java.lang.Thread.run(Thread.java:745)
the exception run at this line
RedisCommandFactory factory = new RedisCommandFactory(client.connect());
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Make: how to continue after a command fails? - Stack Overflow
Just add the -f flag to rm and it'll no longer fail when trying to delete files which don't exist. It will however...
Read more >Bash: run command2 if command1 fails - Unix StackExchange
This works, but I'm confused why || doesn't look at the output of the first echo command. ... printf "$(( 1/0 ))" ||...
Read more >The Azure CLI Task does not fail when a command fails #10125
Any failing exit code returned from any command should immediately terminate the script and mark the task as failed.
Read more >How to fix a start-up / boot-time command line error message
When I'm signing onto my Windows 10 computer and it's booting up a pop-up box comes up. It states: "Error" and says "Invalid...
Read more >How to fix a "Command not found" error in Linux - Red Hat
Learn five ways to deal with a "Command not found" error, Linux users.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes (see attached commits). It’s fixed for 4.4.3, 4.5.0, 5.0.2 and 5.1.0.
thanks. will this question be fixed on 5.0.x?