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 2020/10/15 07:54:53 UTC

[GitHub] [dubbo-go] whitekeyboard opened a new issue #790: etcd服务器集群,集群重启后,无法重连

whitekeyboard opened a new issue #790:
URL: https://github.com/apache/dubbo-go/issues/790


   etcd服务器集群时,如果集群重启后,dubbo-go服务无法连接etcd服务,初步定为为etcd的客户端的BUG,建议修改如下:
   https://github.com/apache/dubbo-go/blob/master/remoting/etcdv3/facade.go line 66, line 80如下:
   ```
   endpoint := r.GetUrl().Location
   ...
   err = ValidateClient(
   				r,
   				WithName(clientName),
   				WithEndpoints(endpoint),
   				WithTimeout(timeout),
   			)
   ```
   建议修改为:
   ```
   endpoint := strings.Split(r.GetUrl().Location, ",")
   ...
   err = ValidateClient(
   				r,
   				WithName(clientName),
   				WithEndpoints(endpoint...),
   				WithTimeout(timeout),
   			)
   
   ```


----------------------------------------------------------------
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.

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] whitekeyboard edited a comment on issue #790: etcd服务器集群,集群重启后,无法重连

Posted by GitBox <gi...@apache.org>.
whitekeyboard edited a comment on issue #790:
URL: https://github.com/apache/dubbo-go/issues/790#issuecomment-717673509


   @watermelo 我找不到之前的例子了,我又重新使用dubbo-sample的范例,修改了一下,可以实现重连。
   但是这里有个疑问:
   对比https://github.com/apache/dubbo-go/blob/master/remoting/zookeeper/client.go 的Line137,138,zookeeper此处的实现,会使用逗号分隔,是否使用此更加合理一些。使用逗号分隔的场景,etcd是否会用到?zookeeper既然有此场景,etcd是否也需要支持一下?
   请帮忙解答一下,谢谢!


----------------------------------------------------------------
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.

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] watermelo edited a comment on issue #790: etcd服务器集群,集群重启后,无法重连

Posted by GitBox <gi...@apache.org>.
watermelo edited a comment on issue #790:
URL: https://github.com/apache/dubbo-go/issues/790#issuecomment-716141025


   > etcd服务器集群时,如果集群重启后,dubbo-go服务无法连接etcd服务,初步定为为etcd的客户端的BUG,建议修改如下:
   > https://github.com/apache/dubbo-go/blob/master/remoting/etcdv3/facade.go line 66, line 80如下:
   > 
   > ```
   > endpoint := r.GetUrl().Location
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   > 
   > 建议修改为:
   > 
   > ```
   > endpoint := strings.Split(r.GetUrl().Location, ",")
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint...),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   
   你好,我这边使用的是 dubbogo 1.5.3 版本,3 台 etcd 的集群,当我重启集群后 dubbogo 可以恢复重连。可以提供版本,报错截图,或者更多的信息么?@whitekeyboards


----------------------------------------------------------------
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.

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] zouyx commented on issue #790: etcd服务器集群,集群重启后,无法重连

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


   > etcd服务器集群时,如果集群重启后,dubbo-go服务无法连接etcd服务,初步定为为etcd的客户端的BUG,建议修改如下:
   > https://github.com/apache/dubbo-go/blob/master/remoting/etcdv3/facade.go line 66, line 80如下:
   > 
   > ```
   > endpoint := r.GetUrl().Location
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   > 
   > 建议修改为:
   > 
   > ```
   > endpoint := strings.Split(r.GetUrl().Location, ",")
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint...),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   
   十分感谢,如果有可能,可以提交 PR


----------------------------------------------------------------
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.

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] watermelo commented on issue #790: etcd服务器集群,集群重启后,无法重连

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


   > etcd服务器集群时,如果集群重启后,dubbo-go服务无法连接etcd服务,初步定为为etcd的客户端的BUG,建议修改如下:
   > https://github.com/apache/dubbo-go/blob/master/remoting/etcdv3/facade.go line 66, line 80如下:
   > 
   > ```
   > endpoint := r.GetUrl().Location
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   > 
   > 建议修改为:
   > 
   > ```
   > endpoint := strings.Split(r.GetUrl().Location, ",")
   > ...
   > err = ValidateClient(
   > 				r,
   > 				WithName(clientName),
   > 				WithEndpoints(endpoint...),
   > 				WithTimeout(timeout),
   > 			)
   > ```
   
   你好,我这边使用的是 dubbogo 1.5.3 版本,3 台 etcd 的集群,当我重启集群后 dubbogo 可以恢复重连。可以提供版本,报错截图,或者更多的信息么?@whitekeyboard


----------------------------------------------------------------
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.

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] AlexStocks commented on issue #790: etcd服务器集群,集群重启后,无法重连

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


   cc @hequn


----------------------------------------------------------------
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.

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] whitekeyboard commented on issue #790: etcd服务器集群,集群重启后,无法重连

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


   @watermelo 我找不到之前的例子了,我又重新使用dubbo-sample的范例,修改了一下,可以实现重连。
   但是这里有个疑问:
   对比https://github.com/apache/dubbo-go/blob/master/remoting/zookeeper/client.go 的Line137,,138行,zookeeper此处的实现,会使用逗号分隔,是否使用此更加合理一些。使用逗号分隔的场景,etcd是否会用到?zookeeper既然有此场景,etcd是否也需要支持一下?
   请帮忙解答一下,谢谢!


----------------------------------------------------------------
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.

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