Skip to content
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

请教etcd连接错误的问题 #3448

Closed
gzlboy opened this issue Jul 28, 2023 · 6 comments
Closed

请教etcd连接错误的问题 #3448

gzlboy opened this issue Jul 28, 2023 · 6 comments

Comments

@gzlboy
Copy link

gzlboy commented Jul 28, 2023

etcd是跑在k8s中通过nodeport暴露出来的,测试发现go-zero rpc项目跑起来后,有注册到etcd中(可以看到key),
微信图片_20230728094135
但没过一会,控制台就会报错:

{"level":"warn","ts":"2023-07-28T10:35:11.907167+0800","logger":"etcd-client","caller":"[email protected]/retry_interceptor.go:62","msg":"retrying of unary invoker failed","target":"etcd-endpoints://0xc000632000/192.168.1.125:30279",
"attempt":0,"error":"rpc error: code = DeadlineExceeded desc = latest balancer error: last connection error: connection error: desc = "transport: Error while dialing: dial tcp: lookup apisix-release-etcd-0.apisix-release-etc
d-headless.default.svc.cluster.local: no such host""}

{"level":"info","ts":"2023-07-28T10:36:16.909427+0800","logger":"etcd-client","caller":"[email protected]/client.go:210","msg":"Auto sync endpoints failed.","error":"context deadline exceeded"}

注: apisix-release-etcd-0.apisix-release-etcd-headless.default.svc.cluster.local是之前安装apisix一起安装etcd时注册的svc,我也奇怪为何go-zero会对这个内网service发起请求?

报错之后没多久,在etcd中的key就不见了,也就是go-zero rpc项目下线了,请问可能是什么原因呀?

附配置:
微信图片_20230728104158
注:
30279是etcd在k8s中暴露出来的nodeport

使用的go-zero版本是v1.5.4

@gzlboy gzlboy closed this as completed Jul 31, 2023
@Notmeor
Copy link

Notmeor commented Feb 3, 2024

遇到同样问题, 请问如何解决的?

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Encountered the same problem, how to solve it?

@suguer
Copy link

suguer commented Feb 7, 2024

所以这个问题有解决么,我也遇到过

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


So is there any solution to this problem? I have encountered it too.

@cauchy-74
Copy link

怎么解决呢?一直遇到这个问题

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


How to solve it? Always encountered this problem

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

5 participants