報錯:使用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