I'm using jedis for simple key-value data store... My code is as follows
private static final String HOST = "50.30.35.9";
private static final int PORT = 2863;
Jedis jedis = new Jedis(HOST, PORT);
try {
jedis.set("foo", "bar");
jedis.get("foo");
} catch (Exception e) {
System.err.println("Unable to connect to Redis");
e.printStackTrace();
}
When i test redis server with jedis client, i got the following exception.
redis.clients.jedis.exceptions.JedisConnectionException:
java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:124)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java: 54)
at redis.clients.jedis.Connection.sendCommand(Connection.java: 77)
at redis.clients.jedis.BinaryClient.set(BinaryClient.java:71)
at redis.clients.jedis.Client.set(Client.java:21)
at redis.clients.jedis.Jedis.set(Jedis.java:48)
Can someone please help?
Because you cannot connect to the host and port you have in your code, since you cannot telnet 50.30.35.9 2863
to it.
Contact Redis4You, and find out. From Redis4You contact page:
=> You can contact us with questions or for support issues at following email: redis (@) e-nick . org
In case of problems with status of the servers, please follow our Twitter account: redis4you
. You can also post comments and questions there, but email will be easier and faster way.
Also looking at their Twitter feed on October 17th they "have upgraded the system to newly released Redis 2.4.0. You need to stop and then start your instance so the upgrade to happen for you."