Skip to content

When using go-zero v1.8.3, the RPC service can successfully register with etcd. However, when using the go-zero client (which relies on etcd/client/[email protected]) producing the error #4873

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

Open
hustyong opened this issue May 20, 2025 · 1 comment

Comments

@hustyong
Copy link

Problem Description‌
When using go-zero v1.8.3, the RPC service can successfully register with etcd. However, when using the go-zero client (which relies on etcd/client/[email protected]), the following behavior occurs:

Works normally with {"etcdserver":"3.5.21","etcdcluster":"3.5.0"}
Fails with {"etcdserver":"3.5.21","etcdcluster":"3.0.0"}, producing the error:

`/tmp/clienttestoneip
[10.193.7.92:2379] web3.gozero.rpc.coin-service
[]
2025/05/19 17:05:37 rpc dial: etcd://11.1.7.92:2379/web3.gozero.rpc.coin-service, error: context deadline exceeded, make sure rpc service "web3.gozero.rpc.coin-service" is already started

goroutine 1 [running]:
runtime/debug.Stack()
/Users/leo.j.yang/sdk/go1.24.2/src/runtime/debug/stack.go:26 +0x5e
github.com/zeromicro/go-zero/core/logx.Must({0x2075be0?, 0xc000614810?})
/Users/leo.j.yang/go/pkg/mod/github.com/zeromicro/[email protected]/core/logx/logs.go:268 +0x4e
github.com/zeromicro/go-zero/zrpc.MustNewClient({{{0xc0003259b0, 0x1, 0x1}, {0x1deeef2, 0x23}, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...)
/Users/leo.j.yang/go/pkg/mod/github.com/zeromicro/[email protected]/zrpc/client.go:45 +0x65
main.main()
/Users/leo.j.yang/work/web3code/server-coins/service/clienttest/clientmain.go:27 +0x1bf
{"@timestamp":"2025-05-19T17:05:37.130+08:00","content":"rpc dial: etcd://11.1.7.92:2379/web3.gozero.rpc.coin-service, error: context deadline exceeded, make sure rpc service "web3.gozero.rpc.coin-service" is already started\n\ngoroutine 1 [running]:\nruntime/debug.Stack()\n\t/Users/leo.j.yang/sdk/go1.24.2/src/runtime/debug/stack.go:26 +0x5e\ngithub.com/zeromicro/go-zero/core/logx.Must({0x2075be0?, 0xc000614810?})\n\t/Users/leo.j.yang/go/pkg/mod/github.com/zeromicro/[email protected]/core/logx/logs.go:268 +0x4e\ngithub.com/zeromicro/go-zero/zrpc.MustNewClient({{{0xc0003259b0, 0x1, 0x1}, {0x1deeef2, 0x23}, 0x0, {0x0, 0x0}, {0x0, 0x0}, ...}, ...}, ...)\n\t/Users/leo.j.yang/go/pkg/mod/github.com/zeromicro/[email protected]/zrpc/client.go:45 +0x65\nmain.main()\n\t/Users/leo.j.yang/work/web3code/server-coins/service/clienttest/clientmain.go:27 +0x1bf\n","level":"fatal"}`

@kevwan
Copy link
Contributor

kevwan commented May 20, 2025

Use the versions of grpc and etcd mentioned in go.mod of go-zero.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants