【启动Redis报错:FATAL CONFIG FILE ERROR】

一、Redis启动错误:Reading the configuration file, at line 194>>> 'always-show-logo yes’Bad directive or wrong number of arguments 解决记录

报错情况

[root@xxx-0001 src]# redis-server /etc/redis-cluster/redis-7001.conf
*** FATAL CONFIG FILE ERROR ***
Reading the configuration file, at line 194
>>> 'always-show-logo yes'
Bad directive or wrong number of arguments

原因分析:

报错的意思是, 本次启动指定的配置文件目录是错误的或者配置文件的参数数量不对.
原因就出在, 第一次安装redis-4.0.8时, 写入了环境变量, 执行redis-server时, 会先去查询环境变量里有没有配置这条指令,
发现有(还是旧的4.0.8的). 但是使用的配置文件是5.0.7的
总结来说,就是环境变量里的redis-server是我之前版本导入的,我Redis更换了版本,就不能用之前导入的环境变量来执行

解决方案:

这样来看,解决方法就清晰了:
方法一:重新导入新版本Redis的redis-server到环境变量
方法二:直接用新版本Redis里的redis-server执行启动命令

最后给大家看一下解决后的情况

[root@xxx-0001 src]# ./redis-server /etc/redis-cluster/redis-7001.conf
27895:C 06 Dec 2021 13:09:29.818 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27895:C 06 Dec 2021 13:09:29.818 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27895, just started
27895:C 06 Dec 2021 13:09:29.818 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7002.conf
27952:C 06 Dec 2021 13:09:37.218 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27952:C 06 Dec 2021 13:09:37.218 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27952, just started
27952:C 06 Dec 2021 13:09:37.218 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7003.conf
27996:C 06 Dec 2021 13:09:40.829 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
27996:C 06 Dec 2021 13:09:40.829 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=27996, just started
27996:C 06 Dec 2021 13:09:40.829 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7004.conf
28021:C 06 Dec 2021 13:09:43.651 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28021:C 06 Dec 2021 13:09:43.651 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28021, just started
28021:C 06 Dec 2021 13:09:43.651 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7005.conf
28065:C 06 Dec 2021 13:09:46.736 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28065:C 06 Dec 2021 13:09:46.737 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28065, just started
28065:C 06 Dec 2021 13:09:46.737 # Configuration loaded
[root@apm-0003 src]# ./redis-server /etc/redis-cluster/redis-7006.conf
28124:C 06 Dec 2021 13:09:50.963 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
28124:C 06 Dec 2021 13:09:50.963 # Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=28124, just started
28124:C 06 Dec 2021 13:09:50.963 # Configuration loaded
[root@xxx-0001 src]# ps -ef|grep redis
root      6227     1  0 12:35 ?        00:00:04 redis-server 0.0.0.0:6379
root     27896     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7001 [cluster]
root     27953     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7002 [cluster]
root     27998     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7003 [cluster]
root     28022     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7004 [cluster]
root     28066     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7005 [cluster]
root     28125     1  0 13:09 ?        00:00:00 ./redis-server 0.0.0.0:7006 [cluster]
root     28276  4581  0 13:10 pts/4    00:00:00 grep --color=auto redis
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值