You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/06/08 02:06:55 UTC

[GitHub] [dubbo-go] zgs225 opened a new issue, #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败

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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zhaoyunxing92 commented on issue #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败

Posted by GitBox <gi...@apache.org>.
zhaoyunxing92 commented on issue #1927:
URL: https://github.com/apache/dubbo-go/issues/1927#issuecomment-1152352519

   @LaurenceLiZhixin 


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] LaurenceLiZhixin commented on issue #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin commented on issue #1927:
URL: https://github.com/apache/dubbo-go/issues/1927#issuecomment-1152358070

   同学您好, 感谢对v3 mesh 场景的关注。可能是文档中表述的不太准确。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] zgs225 commented on issue #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败

Posted by GitBox <gi...@apache.org>.
zgs225 commented on issue #1927:
URL: https://github.com/apache/dubbo-go/issues/1927#issuecomment-1152933753

   好的,感谢解答。这种情况下,一个只有 consumer 的 Job 或者 Cronjob 也需要创建对应的 Service 才能运行。对于使用者来说有一些疑惑。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go] LaurenceLiZhixin closed issue #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败

Posted by GitBox <gi...@apache.org>.
LaurenceLiZhixin closed issue #1927: [xds registry] 在只有客户端 consumer 的情况下应用启动失败
URL: https://github.com/apache/dubbo-go/issues/1927


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org