I am trying to connect to redis in java using lettuce. Following is my code
import io.lettuce.core.RedisClient;
import io.lettuce.core.api.StatefulRedisConnection;
RedisClient redisClient = RedisClient.create("redis://192.168.42.223/0");
StatefulRedisConnection<String, String> redisConnection = redisClient.connect();
I am getting following error.
Unable to connect to 192.168.42.223/<unresolved>:6379
in exception following is showing as cause (Exception e.cause)
"java.lang.IllegalStateException: RedisHandshakeHandler not registered"
What wrong am I doing?
I found that if I use older version of lettuce (3.2.Final) as following, then it works (official site is using older version https://redislabs.com/lp/redis-java/).
import com.lambdaworks.redis.*;
RedisClient redisClient = new RedisClient(RedisURI.create("redis://192.168.42.223"));
RedisConnection<String, String> connection = redisClient.connect();
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…