Could not connect to Redis at 127.0.0.1:6379:connection refused
1. Locate redis.conf and modify Daemonize No to daemonize Yes so you can run the background by default
[Email protected] trade01 conf.d]# vi/etc/redis.conf
2. Turn on the client to ensure server-side startup
[Email protected] trade01 src]#./redis-server. /etc/redis.conf
Now you can access it normally.
[Email protected] trade01 src]#./redis-cli
Redis 127.0.0.1:6379>set Foo Bar
Ok
127.0.0.1:6379> get foo
"Bar"
127.0.0.1:6379>
If you still have an error
View the configuration file and find that Bind is written as:
Bind 127.0.0.1
Modify the configuration to
Bind 192.168.0.129
192.168.0.129 is the address of the server where Redis resides
Start again
(If bind 127.0.0.1 is modified in order for 192.168.0.129 to start, if not successful, add the 127.0.0.1.
Two addresses to be separated by a space)
Workaround for Redis Could not connect to Redis at 127.0.0.1:6379:connection refused during Linux redis authentication Interactive Connection