启动redis # Warning: Could not create server TCP listening socket 127.0.0.1:6379: bind: Address alread

当遇到Redis启动报'Warning: Could not create server TCP listening socket 127.0.0.1:6379: bind: Address already in use'错误时,可以先检查端口占用情况,释放被占用的6379端口,再尝试重启Redis服务以解决问题。
摘要由CSDN通过智能技术生成

先查看redisd的端口占用,然后在杀死这个端口

[root@imooc redis-6.2.6]# ps -ef |grep redis
root       1218      1  0 14:00 ?        00:00:01 /usr/local/redis-4.0.14/src/redis-server 127.0.0.1:6379
root       7679   7550  0 14:20 pts/0    00:00:00 grep --color=auto redis
[root@imooc redis-6.2.6]# kill -9 1218

在重新启动redis就可以了

./src/redis-server redis.conf 
[root@imooc redis-6.2.6]# ./src/redis-server redis.conf 
7768:C 20 Apr 2022 14:26:51.974 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7768:C 20 Apr 2022 14:26:51.974 # Redis version=6.2.6, bits=64, commit=00000000, modified=0, pid=7768, just started
7768:C 20 Apr 2022 14:26:51.974 # Configuration loaded
7768:M 20 Apr 2022 14:26:51.975 * Increased maximum number of open files to 10032 (it was originally set to 1024).
7768:M 20 Apr 2022 14:26:51.975 * monotonic clock: POSIX clock_gettime
                _._                               
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值