. Advertisement .
..3..
. Advertisement .
..4..
Hi, everyone. I am having a problem that “can not connect to redis at 127.0.0.1:6379: connection refused” when I log in to it. The problem is as follow:
[root@centoszang ~]# 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
not connected> exit
[root@centoszang ~]#
If everyone have any suggestions to solve this problem, please reply to me as soon as possible. Thanks!
The cause:
You are get this problem because the redis server startup failure and the server have to be begun first.
Solution:
How to open the server: Open redis.conf file to edit in the redis installation directory.
Next, you take the following steps:
Firstly, alter the daemon no in redis.conf to daemon yes because of the redis no running as a daemon.
Secondly, unlock the client.
Carry out redis-server in this directory.
Finally, you can log in the redis.
Here are my suggestions and hope it helps you. Good luck!!!