-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
待修复 #41
Comments
方便看一下你在 server 侧的代码么? |
这个代码会出现错误,但是设置前缀后正常了。
使用 /usr/local/etcd/etcdctl get "" --prefix --keys-only 看过注册的服务,确实是新注册的服务没有kitex/registry-etcd前缀 |
@pp292 请遵守社区守则,友善反馈问题,我们不欠你啥,“巨坑”是啥意思?开源项目使用过程中遇到问题提出问题解决问题即可。 |
@pp292 这里确实遗漏了注入 prefix 到 etcdRegistry 中 |
你的回复比较客观,不像有些同学。 |
@pp292 v0.2.5 已修复这个问题,请试用一下。如果 ok 的话,这个 issue 可以 close 了。 |
版本
go 1.22.2
github.com/kitex-contrib/registry-etcd v0.2.4
服务注册 etcd.NewEtcdRegistryWithRetry 链接etcd一定要设置 etcd.WithEtcdServicePrefix(""),否则默认的Prefix: "kitex/registry-etcd"形同虚设。
默认不设置 etcd.WithEtcdServicePrefix 情况下,服务注册并没有设置 kitex/registry-etcd 前缀,而client去请求找etcd服务的时候,又会根据 kitex/registry-etcd 前缀去找。
导致一直出错,提示 service discovery error: no instance remains for XXXX
The text was updated successfully, but these errors were encountered: