I have just installed Redis on a remote Ubuntu machine (VM configurations) and used port forwarding to be able to access it from a remote client. Redis is working correctly on the machine itself : I am able to get response for 'ping' commands sent through redis-clients on the same machine. However, when I try to access the Redis server from a remote-machine (using a jedis client for a java application), I get a socket time-out error.
On researching the problem a little, I realized that the redis-server on the remote machine is not working as a service. The output of the service
command is given below which shows that the redis-server service is currently stopped ([-] option in front of "redis-server").
Also, using netstat
command, I have ensured that the port 6379 is assigned to redis-server. Attached below is the snapshot of the same.
Also, in my configuration file (redis.conf), I have uncommented the line that binds the server to 127.0.0.1 and also changed the "daemon" option to 'yes'. I start the server using this config file.
Any help on how I can access the remote server (or run the service in the background such that it actively listens for new connections) through my application is highly appreciated! Thanks in advance.