Docker
Docker中Redis错误:READONLY You can‘t write against a read only replica.
Docker中Redis错误:READONLY You can‘t write against a read only replica.
昨天重启了docker之后,发现redis插入数据报如下错误
READONLY You can‘t write against a read only replica.
网上查找了相关资料之后,由于我是用docker-compose方式进行部署的,所以只需要在编排文件加入
--slave-read-only no
docker-compose文件内容如下
version: "3" services: redis: image: redis:latest restart: always container_name: redis_compose ports: - 6379:6379 command: --slave-read-only no
然后输入以下命令重启就可以了
docker-compose up -d
0条评论