centos系统启动redis失败,但是又没看ssh有任何报错输出,或者日志,下面给出排查方法
配置文件加上输入日志配置
该日止包括redis的启动,运行日志,生产环境开启日志文件会越来越大,应看情况使用
# 配置resdis的日志文件路径 如启动失败后可查看启动失败的原因
logfile "/usr/local/redis/bin/redis_6001.log"
增加logfile 配置后再次启动 查看日志
20789:C 25 Nov 2022 17:23:08.673 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
20789:C 25 Nov 2022 17:23:08.673 # Redis version=7.0.5, bits=64, commit=00000000, modified=0, pid=20789, just started
20789:C 25 Nov 2022 17:23:08.673 # Configuration loaded
20789:M 25 Nov 2022 17:23:08.778 * Increased maximum number of open files to 10032 (it was originally set to 1024).
20789:M 25 Nov 2022 17:23:08