0

I have Redis running on my server and when I check it using the command I get the following output.

● redis.service - Redis persistent key-value database
   Loaded: loaded (/usr/lib/systemd/system/redis.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/redis.service.d
           └─limit.conf
   Active: active (running) since Sun 2020-11-22 23:14:12 EST; 1 years 4 months ago
 Main PID: 1446 (redis-server)
   CGroup: /system.slice/redis.service
           └─1446 /usr/bin/redis-server my-ip-address:6379

But when I try to connect to the instance using redis-cli, it is showing connection refused.

my-ip-address:username /opt/folder/latest $redis-cli
Could not connect to Redis at 127.0.0.1:6379: Connection refused
Could not connect to Redis at 127.0.0.1:6379: Connection refused

Many of the answers I see here suggest to issue redis-server command to start Redis, but in my case I think it is already running as shown in the first command. It would be very much helpful if someone can suggest what I need to do here to connect to Redis CLI ?

Happy Coder
  • 4,255
  • 13
  • 75
  • 152
  • 1
    Can you provide Redis server version and `redis.conf` configuration. `bind` [section](https://github.com/redis/redis/blob/b8eb2a73408fa3b8845760857dd6fcccb62107fe/redis.conf#L57) might be the cause. – usuario Apr 01 '22 at 10:58
  • Can you please tell me how can I check this? – Happy Coder Apr 01 '22 at 13:20

0 Answers0