Open Hudonyo opened 5 years ago
这是我codis-proxy启动后,注册到zk中的proxy节点信息:
[zk: localhost:2181(CONNECTED) 1] get /codis3/codis-demo/proxy/proxy-420a662ef2b07ede2e7254260a1b4389 { "id": 1, "token": "420a662ef2b07ede2e7254260a1b4389", "start_time": "2019-04-03 21:30:16.28276716 +0800 CST m=+0.014142410", "admin_addr": "127.0.0.1:11080", "proto_type": "tcp4", "proxy_addr": "iZwz977ogd6jecq7rowvtsZ:19000", "jodis_path": "/jodis/codis-demo/proxy-420a662ef2b07ede2e7254260a1b4389", "product_name": "codis-demo", "pid": 15142, "pwd": "/apps/gopath/src/github.com/CodisLabs/codis", "sys": "Linux iZwz977ogd6jecq7rowvtsZ 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux", "hostname": "iZwz977ogd6jecq7rowvtsZ", "datacenter": "" }
为什么注册到zk中的proxy_addr的ip是iZwz977ogd6jecq7rowvtsZ呢,我的proxy.toml里配置的proxy_addr实际上是0.0.0.0:19000,这是我的proxy.toml配置信息:
product_name = "codis-demo" product_auth = ""
session_auth = ""
admin_addr = "127.0.0.1:11080"
proto_type = "tcp4" proxy_addr = "0.0.0.0:19000"
jodis_name = "zookeeper" jodis_addr = "127.0.0.1:2181" jodis_auth = "" jodis_timeout = "20s" jodis_compatible = false
求解
把0.0.0.0:19000的0.0.0.0改成具体的ip试试
@a13707331174 解决了,原因就是这个0.0.0.0的问题,被转换成hostname了,改成具体的ip就没问题了,谢谢
这是我codis-proxy启动后,注册到zk中的proxy节点信息:
[zk: localhost:2181(CONNECTED) 1] get /codis3/codis-demo/proxy/proxy-420a662ef2b07ede2e7254260a1b4389 { "id": 1, "token": "420a662ef2b07ede2e7254260a1b4389", "start_time": "2019-04-03 21:30:16.28276716 +0800 CST m=+0.014142410", "admin_addr": "127.0.0.1:11080", "proto_type": "tcp4", "proxy_addr": "iZwz977ogd6jecq7rowvtsZ:19000", "jodis_path": "/jodis/codis-demo/proxy-420a662ef2b07ede2e7254260a1b4389", "product_name": "codis-demo", "pid": 15142, "pwd": "/apps/gopath/src/github.com/CodisLabs/codis", "sys": "Linux iZwz977ogd6jecq7rowvtsZ 3.10.0-957.5.1.el7.x86_64 #1 SMP Fri Feb 1 14:54:57 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux", "hostname": "iZwz977ogd6jecq7rowvtsZ", "datacenter": "" }
为什么注册到zk中的proxy_addr的ip是iZwz977ogd6jecq7rowvtsZ呢,我的proxy.toml里配置的proxy_addr实际上是0.0.0.0:19000,这是我的proxy.toml配置信息:
product_name = "codis-demo" product_auth = ""
session_auth = ""
admin_addr = "127.0.0.1:11080"
proto_type = "tcp4" proxy_addr = "0.0.0.0:19000"
jodis_name = "zookeeper" jodis_addr = "127.0.0.1:2181" jodis_auth = "" jodis_timeout = "20s" jodis_compatible = false
求解