错误产生环境
在centOS7下启动redis时产生
错误描述
[root@VM-12-13-centos bin]# ./redis-server
18737:C 04 Mar 17:14:21.961 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
18737:C 04 Mar 17:14:21.962 # Redis version=4.0.10, bits=64, commit=00000000, modified=0, pid=18737, just started
18737:C 04 Mar 17:14:21.962 # Warning: no config file specified, using the default config. In order to specify a config file use ./redis-server /path/to/redis.conf
18737:M 04 Mar 17:14:21.962 # Creating Server TCP listening socket *:6379: bind: Address already in use
错误原因
6379端口被占用了
解决办法
1.查看redis状态
ps -ef | grep -i redis
2.结束该进程
kill -9 16875
3.查看
ps -ef | grep -i redis