报错:使用java api连接redis集群时报错 READONLY You can't write against a read only slave.


报错: READONLY You can’t write against a read only slave.

报错原因:

因为连接的是从节点,从节点只有读的权限,没有写的权限

解决方案:

进入redis.conf配置文件,修改配置文件的slave-read-only为no,那么从节点也就可以进行写的操作了,代码不会报错
————————————————
版权声明:本文为CSDN博主「古城的风cll」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_42458708/article/details/100027055


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 Caused by: redis.clients.jedis.exceptions.JedisDataException: READONLY You can't write against a read only slave. 【Redis之疑难解析】(error) READONLY You can't write against a read only slave Redis 学习笔记(十二)Redis 复制功能详解 ----- (error) READONLY You can't write against a read only slave MHA 报错:There is no alive slave. We can't do failover redis.clients.jedis.exceptions.JedisDataException :READONLY You can't write 主从复制时报:ERROR 1794 (HY000): Slave is not configured or failed to initialize properly. You must at least set --server-id to enable either a master or a slave. Additional error messages can be found in t 在vue3中使用ElementPlus 运行时报错 Can't reexport the named export 'looseEqual' from non EcmaScript module (only default export is available) tomcat链接mysql时超时报错java.io.EOFException: Can not read response from server. Expected to read 4 bytes, 使用otl,报错:mysql Commands out of sync; you can't run this command now Vue 使用自定义组件时报错:Uncaught TypeError: Cannot assign to read only property 'exports' of object '#'
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM