question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Do not fail if COMMAND command fails on startup

See original GitHub issue

hello,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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mp911decommented, Jan 31, 2018

Yes (see attached commits). It’s fixed for 4.4.3, 4.5.0, 5.0.2 and 5.1.0.

0reactions
pujian1984commented, Jan 31, 2018

thanks. will this question be fixed on 5.0.x?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found