1 year ago

#363091

test-img

Happy Coder

Could not connect to Redis at 127.0.0.1:6379: Connection refused, But Redis is running already

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 ?

redis

redis-cli

0 Answers

Your Answer

Accepted video resources