smallnest / rpcx

Best microservices framework in Go, like alibaba Dubbo, but with more features, Scale easily. Try it. Test it. If you feel it's better, use it! 𝐉𝐚𝐯𝐚有𝐝𝐮𝐛𝐛𝐨, 𝐆𝐨𝐥𝐚𝐧𝐠有𝐫𝐩𝐜𝐱! build for cloud!
https://rpcx.io
Other
8.11k stars 1.17k forks source link

服务重启后,客户端报 can not found any server #810

Closed bbqbyte closed 1 year ago

bbqbyte commented 1 year ago

版本:github.com/smallnest/rpcx v1.8.7 服务重启后,客户端 can not found any server; 客户端ETCD Discovery,allowKeyNotFound设置为true了 请教是哪里没配置好会出现这样的情况?谢谢!

我是直接调用 func NewEtcdV3DiscoveryStore(basePath string, kv store.Store, allowKeyNotFound bool) (client.ServiceDiscovery, error),传入的,还是说 要经过 func NewEtcdV3Discovery 这里面的 if ev3, ok := kv.(*etcd.EtcdV3); ok { ev3.AllowKeyNotFound = allowKeyNotFound }

smallnest commented 1 year ago

rpcx-etcd的插件版本是多少? 你可以使用这个例子重现下,看看能重现不 https://github.com/rpcxio/rpcx-examples/tree/master/registry/etcdv3_restart

bbqbyte commented 1 year ago

github.com/rpcxio/rpcx-etcd v0.2.0 etcdv3_restart 是 设置 allowKeyNotFound = false 这样吗,我是服务重启后client can not found any server,然后client重新启动下又可以连上

smallnest commented 1 year ago

rpcx-etcd 升级到0.3.2试试

bbqbyte commented 1 year ago

好的,谢谢!有问题我再请教