*** FATAL CONFIG FILE ERROR (Redis 6.2.6) ***
Reading the configuration file, at line 0
>>> '(null)'
replicaof directive not allowed in cluster mode
在linux搭建伪分布式Redis集群,用一台虚拟机运行6个Redis实例。复制6份Redis的目录,更改配置文件Redis.conf里面的port,从6379-6385.启动reids-server时使用配置文件报错
读取第0行的配置文件>>>“(空)”在群集模式下不允许复制指令
我的redis.conf是这样的:
include /myredis/redis.conf
pidfile /var/run/redis_6380.pid
port 6380
dbfilename dump6380.rdb
cluster-enabled yes
cluster-config-file nodes-6380.conf
cluster-node-timeout 15000
问题:是因为之前配置过主从设备关系,导致在引入的redis.conf文件最底部里存在以下信息:
# ignore-warnings ARM64-COW-BUG
# Generated by CONFIG REWRITE
user default on nopass ~* &* +@all
replicaof 192.168.236.130 6379
这里只需要删除最后一行即可