当前位置:网站首页>Error when redis is started: could not create server TCP listening socket *: 6379: bind: address already in use - solution

Error when redis is started: could not create server TCP listening socket *: 6379: bind: address already in use - solution

2022-06-26 14:29:00 Full stack programmer webmaster

Hello everyone , I meet you again , I'm your friend, Quan Jun .

The last hint :6379 The address is already in use (6379 yes redis Default port )

As shown in the figure, I input the instructions myself ./redis-server Show Redis The service has been started


1) Three parts of normal solutions

① Find by command redis process , See all the process details about it .

ps -ef | grep redis
root      3086     1  0 Apr24 ?        00:00:07 ./bin/redis-server *:6379        
root      3531  3467  0 01:00 pts/0    00:00:00 grep -i redis 

Pictured above : The process number is 3086 That is to say redis The server

② Use kill Kill the process

kill -9 3086 

③ Enter the restart command

./redis-server

2) If you can't find the same query as me redis Process number , Port number occupied , Input command does not respond ,

problem ①./redis-server Cannot be opened Redis . Display occupied ; problem ②shutdown It can't be closed ; problem ③ If the password is entered correctly, it will always show that there is a lack of authority recognition ;


How to solve ?how?

① Restart the cloud server After restart

It can be used normally


Expansion and supplement :lsof command , usage :lsof -i: Port number , such as redis Default port number 6379, Just use

 lsof -i:6379

lsof(list open files) Is a list of the current system open file tools . stay linux In the environment , Everything exists in the form of documents , Files provide more than just regular data access , You can also access network connections and hardware .


Love life, love life, love yourself

2020.02.22

Publisher : Full stack programmer stack length , Reprint please indicate the source :https://javaforall.cn/133825.html Link to the original text :https://javaforall.cn

原网站

版权声明
本文为[Full stack programmer webmaster]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/177/202206261331049297.html