{"action":"created","issue":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/438","labels_url":"https://api.github.com/repos/wandoulabs/codis/issues/438/labels{/name}","comments_url":"https://api.github.com/repos/wandoulabs/codis/issues/438/comments","events_url":"https://api.github.com/repos/wandoulabs/codis/issues/438/events","html_url":"https://github.com/wandoulabs/codis/issues/438","id":106932925,"number":438,"title":"codis扩容报错：[error] READONLY You can't write against a read only slave","user":{"login":"yanggd","id":14327112,"avatar_url":"https://avatars.githubusercontent.com/u/14327112?v=3","gravatar_id":"","url":"https://api.github.com/users/yanggd","html_url":"https://github.com/yanggd","followers_url":"https://api.github.com/users/yanggd/followers","following_url":"https://api.github.com/users/yanggd/following{/other_user}","gists_url":"https://api.github.com/users/yanggd/gists{/gist_id}","starred_url":"https://api.github.com/users/yanggd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yanggd/subscriptions","organizations_url":"https://api.github.com/users/yanggd/orgs","repos_url":"https://api.github.com/users/yanggd/repos","events_url":"https://api.github.com/users/yanggd/events{/privacy}","received_events_url":"https://api.github.com/users/yanggd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-17T08:20:28Z","updated_at":"2015-09-17T08:22:19Z","closed_at":null,"body":"最近使用codis扩容，查看日志报错：[error] READONLY You can't write against a read only slave\r\n        之前分为3组正常运行：\r\n        slot  0 340 1\r\n        slot 341 681 2\r\n        slot 682 1023 3\r\n        扩容步骤是这样的：\r\n                        /usr/local/codis/bin/codis-config -c /usr/local/codis/conf/config.ini server add 4 192.168.3.71:4500 master\r\n                        然后通过codis界面auto rebalance或slot migrate时出现以上错误，导致proxy自动关闭，无法对外服务。\r\n        问题：\r\n             参考github上你的回复“嗯，目前来看我怀疑是添加group的时候先将一个redis实例添加成了master，然后又add同一个实例成slave，redis slaveof了自己之后就不可写了。redis不会在把自己设为自己的slave时报错，而codis这边也没针对这种情况做判断。后面会改一下。”\r\n              但我新添加的redis为master，并且没有将其再add 成slave，也出现这样情况，是我操作的问题吗？\r\n    \r\n        另，必须init -f，待所有的slot迁移完，然后再分组，才能启动。\r\n            \r\n        由于目前codis需要扩容，在以上扩容操作中，发现有的机器可以正常迁移slot，有的机器报以上错误，请问针对这样情况有没有什么可靠的解决方案？\r\n\r\n        另，试过将master的slave-read-only 改为no，仍然报如上错误。"},"comment":{"url":"https://api.github.com/repos/wandoulabs/codis/issues/comments/141001215","html_url":"https://github.com/wandoulabs/codis/issues/438#issuecomment-141001215","issue_url":"https://api.github.com/repos/wandoulabs/codis/issues/438","id":141001215,"user":{"login":"yangzhe1991","id":860739,"avatar_url":"https://avatars.githubusercontent.com/u/860739?v=3","gravatar_id":"","url":"https://api.github.com/users/yangzhe1991","html_url":"https://github.com/yangzhe1991","followers_url":"https://api.github.com/users/yangzhe1991/followers","following_url":"https://api.github.com/users/yangzhe1991/following{/other_user}","gists_url":"https://api.github.com/users/yangzhe1991/gists{/gist_id}","starred_url":"https://api.github.com/users/yangzhe1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yangzhe1991/subscriptions","organizations_url":"https://api.github.com/users/yangzhe1991/orgs","repos_url":"https://api.github.com/users/yangzhe1991/repos","events_url":"https://api.github.com/users/yangzhe1991/events{/privacy}","received_events_url":"https://api.github.com/users/yangzhe1991/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T08:22:19Z","updated_at":"2015-09-17T08:22:19Z","body":"日志报错完整打印下？包括行号的"}}