{"action":"created","issue":{"url":"https://api.github.com/repos/CodisLabs/jodis/issues/28","repository_url":"https://api.github.com/repos/CodisLabs/jodis","labels_url":"https://api.github.com/repos/CodisLabs/jodis/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/CodisLabs/jodis/issues/28/comments","events_url":"https://api.github.com/repos/CodisLabs/jodis/issues/28/events","html_url":"https://github.com/CodisLabs/jodis/issues/28","id":182987349,"number":28,"title":"jodis链接codis3.x出现proxy list empty","user":{"login":"liu67224657","id":483187,"avatar_url":"https://avatars.githubusercontent.com/u/483187?v=3","gravatar_id":"","url":"https://api.github.com/users/liu67224657","html_url":"https://github.com/liu67224657","followers_url":"https://api.github.com/users/liu67224657/followers","following_url":"https://api.github.com/users/liu67224657/following{/other_user}","gists_url":"https://api.github.com/users/liu67224657/gists{/gist_id}","starred_url":"https://api.github.com/users/liu67224657/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liu67224657/subscriptions","organizations_url":"https://api.github.com/users/liu67224657/orgs","repos_url":"https://api.github.com/users/liu67224657/repos","events_url":"https://api.github.com/users/liu67224657/events{/privacy}","received_events_url":"https://api.github.com/users/liu67224657/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2016-10-14T08:02:58Z","updated_at":"2016-11-03T09:26:42Z","closed_at":"2016-10-14T09:03:42Z","body":"```\nException in thread \"main\" redis.clients.jedis.exceptions.JedisException: Proxy list empty\n    at io.codis.jodis.RoundRobinJedisPool.getResource(RoundRobinJedisPool.java:207)\n    at com.enjoyf.platform.util.redis.JodisManager.set(JodisManager.java:52)\n    at com.enjoyf.platform.util.redis.JodisManager.main(JodisManager.java:62)\n    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)\n    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n    at java.lang.reflect.Method.invoke(Method.java:606)\n    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)\n```\n\nproxy.toml相关设置如下：\n\n```\njodis_name = \"\"\njodis_addr = \"web001.dev:2181,web002.dev:2181\"\njodis_timeout = \"20s\"\njodis_compatible = false\n```\n\njodis链接的代码如下:\n`pool = RoundRobinJedisPool.create().curatorClient(\"web001.dev:2181,web002.dev:2181\", 30000).zkProxyDir(\"/jodis/codis-demo\").build();`\n\nzookeeper中proxy有数据\n\n```\n[zk: localhost:2181(CONNECTED) 0] ls /codis3/codis-demo/proxy\n[proxy-9cec7123adc59b0306635d4441a99d53]\n\n```\n\nzookeeper中/jodis/codis-demo为空\n"},"comment":{"url":"https://api.github.com/repos/CodisLabs/jodis/issues/comments/258095362","html_url":"https://github.com/CodisLabs/jodis/issues/28#issuecomment-258095362","issue_url":"https://api.github.com/repos/CodisLabs/jodis/issues/28","id":258095362,"user":{"login":"spinlock","id":722853,"avatar_url":"https://avatars.githubusercontent.com/u/722853?v=3","gravatar_id":"","url":"https://api.github.com/users/spinlock","html_url":"https://github.com/spinlock","followers_url":"https://api.github.com/users/spinlock/followers","following_url":"https://api.github.com/users/spinlock/following{/other_user}","gists_url":"https://api.github.com/users/spinlock/gists{/gist_id}","starred_url":"https://api.github.com/users/spinlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinlock/subscriptions","organizations_url":"https://api.github.com/users/spinlock/orgs","repos_url":"https://api.github.com/users/spinlock/repos","events_url":"https://api.github.com/users/spinlock/events{/privacy}","received_events_url":"https://api.github.com/users/spinlock/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T09:26:42Z","updated_at":"2016-11-03T09:26:42Z","body":"OK 我知道了，你的 proxy 没有添加到集群里面去。\r\n\r\n因为 jodis 只支持 zk，所以 jodis_addr 不会被用来添加上线，需要你自己手动指定。\r\n\r\n```\r\nUsage:\r\n\tcodis-proxy [--ncpu=N [--max-ncpu=MAX]] [--config=CONF] [--log=FILE] [--log-level=LEVEL] [--host-admin=ADDR] [--host-proxy=ADDR] [--dashboard=ADDR|--zookeeper=ADDR|--etcd=ADDR|--fillslots=FILE] [--ulimit=NLIMIT]\r\n\tcodis-proxy  --default-config\r\n```\r\n\r\n你看到启动时添加 --zookeeper = xxx 或者 --dashboard = yyy 就可以了。"}}
{"actor":{"display_login":"spinlock"}}