Solution to stop reporting errors in the redi service in linux [NOAUTH Authentication required]:

Solution to stop reporting errors in the redi service in linux [NOAUTH Authentication required]:

Report an error

After the password is set for the Redis server, use service redis stop and the following message will appear:

$ service redisd restart
Stopping ...
(error) NOAUTH Authentication required.
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...
Waiting for Redis to shutdown ...

Insert picture description here
When such an error message appears, redis does not stop the service at this time.

You can use ps -ef | grep redis to check the process number and then kill it. If you need to delete the pid file under the deamon, it is a bit cumbersome.

Solution:

Log in with the redis-cli password (redis-cli -a password) and it will be OK.

Then use ps -ef | grep redis to see that the redis process has exited normally.

Modify the redis service script and add the red authorization information as shown below:

vi /etc/init.d/redisd

Insert picture description here
Change the password to the same as you set, and then restart the redis service.

Insert picture description here

Guess you like

Origin blog.csdn.net/guo_qiangqiang/article/details/113186417