Quantcast
Channel: Active questions tagged redis+java - Stack Overflow
Viewing all articles
Browse latest Browse all 2204

Redis: Unable to connect to 192.168.42.223/:6379

$
0
0

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();

Viewing all articles
Browse latest Browse all 2204

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>