Reputation: 25
I use Jedis, and I want to establish connection to Redis server which is not same server where my application running... i.e Redis is on server X and my application is on server Y. How can I establish connection?
Upvotes: 0
Views: 6072
Reputation: 1453
Jedis jedis = new Jedis("23.27.123.100",6379);
Upvotes: 1
Reputation: 20182
Have you tried specifying the IP address when you instantiate Jedis as follows:
Example (replace with actual ip address)
Jedis jedis = new Jedis(IP address);
like this
Jedis jedis = new Jedis(23.27.123.100);
Also, is redis listening on 6379 or some other port? Are firewall/ip tables settings in place to avoid a connection attempt on that port from being blocked? Can you share more details about what happens when you try to connect to the remote host.
Upvotes: 0