zgs225 opened a new issue, #1927: URL: https://github.com/apache/dubbo-go/issues/1927
<!-- Please use this template while reporting a bug and provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner. Thanks! --> **What happened**: 在 [dubbo-go xds 文档中](https://dubbogo.github.io/zh-cn/docs/user/tasks/mesh/app.html) 有说明:”对于一个只有客户端的应用,可以不创建sevice,可以由开发者在模板中修改,本教程中我们默认创建。“, 但是在最新版本的 `dubbo-go` 项目中情况与该文档描述不一致。 启动一个只有 consumer 的应用,会报 "panic: Discovery local Pod's host from xds, failed please register service with endpoint to k8s" 的错误。 通过查阅源码,发现问题出现在初始化 xds registry 过程中,具体出问题的代码如下: 该处代码总是会等待通过 xDS 查询到 localIP,直到超时。 ``` go // file: remoting/xds/client.go:454 // 2. found local hostAddr // todo: When would eds level watch be canceled? cancel2 = w.xdsClient.WatchEndpoints(update.ClusterName, func(endpoint resource.EndpointsUpdate, err error) { if foundLocal { return } for _, v := range endpoint.Localities { for _, e := range v.Endpoints { logger.Infof("[XDS Wrapped Client] Sniffing Found eds endpoint = %+v", e) if xdsCommon.NewHostNameOrIPAddr(e.Address).HostnameOrIP == w.localIP { cluster := xdsCommon.NewCluster(update.ClusterName) w.hostAddr = cluster.Addr foundLocal = true close(foundLocalStopCh) } } } }) ``` **What you expected to happen**: **How to reproduce it (as minimally and precisely as possible)**: **Anything else we need to know?**: -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
