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 2021/03/25 14:56:53 UTC

[GitHub] [dubbo-go] zouyx commented on issue #1072: 多注册中心配置优先级,主注册中心节点全部宕机后,其余注册中心节点会等待主注册中心的链接重试

zouyx commented on issue #1072:
URL: https://github.com/apache/dubbo-go/issues/1072#issuecomment-806898960


   关于 nacos 的问题,是因为这里判断的是 Service 中的 valid
   https://github.com/apache/dubbo-go/blob/274718b650e71ee55a832203e87088f9762d4ff7/registry/nacos/listener.go#L127
   
   而对应的 Service 来自于 nacos server 返回的每一个 host
   https://github.com/nacos-group/nacos-sdk-go/blob/a63411bd5ac0f794a52d055a1539289a70220404/clients/naming_client/subscribe_callback.go#L81
   
   关键点来了,nacos server 在 host 中没有返回该字段。。。。 - -
   ```
   {
   	"name": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
   	"groupName": "DEFAULT_GROUP",
   	"clusters": "",
   	"cacheMillis": 10000,
   	"hosts": [{
   		"instanceId": "127.0.0.1#20000#DEFAULT#DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
   		"ip": "127.0.0.1",
   		"port": 20000,
   		"weight": 1.0,
   		"healthy": true,
   		"enabled": true,
   		"ephemeral": true,
   		"clusterName": "DEFAULT",
   		"serviceName": "DEFAULT_GROUP@@providers:com.ikurento.user.UserProvider:1.0.0:guangzhou-idc",
   		"metadata": {
   			"registry.role": "3",
   			"cluster": "mock",
   			"path": "/com.ikurento.user.UserProvider",
   			"protocol": "dubbo",
   			"category": "providers",
   			"interface": "com.ikurento.user.UserProvider",
   			"version": "1.0.0",
   			"group": "guangzhou-idc"
   		},
   		"instanceHeartBeatInterval": 5000,
   		"ipDeleteTimeout": 30000,
   		"instanceHeartBeatTimeOut": 15000
   	}],
   	"lastRefTime": 1616683093784,
   	"checksum": "",
   	"allIPs": false,
   	"reachProtectionThreshold": false,
   	"valid": true
   }
   ```
   
   如果非要实例。。就是这个。。。http://console.nacos.io/nacos/v1/ns/instance/list?serviceName=DEFAULT_GROUP@@demo.go&clusters=&udpPort=55043&healthyOnly=false&clientIp=192.168.199.214&namespaceId=。。。


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