Nepxion/DiscoveryGuide

http://localhost:5001/discovery-guide-service-a/invoke/gateway 报错

lizhichao999 opened this issue · 2 comments

使用标准postman文件,服务启动都没有问题,nacos也注册成功,但是postman调用报错
{
"timestamp": "2019-10-23T09:17:18.735+0000",
"path": "/discovery-guide-service-a/invoke/gateway",
"status": 503,
"error": "Service Unavailable",
"message": "Unable to find instance for discovery-guide-service-a"
}

服务启动后,Nacos需要一些时间把服务列表同步给其他的服务,需要耐心等待,时间估计5秒,你自己研究调整一下即可

不确定你是否只启动了a服务的1.0版本的实例,最新的Postman脚本会默认输入mobile=133这个header,而内置了一个策略,当mobile以133开头的时候,只能路由到1.1版本的示例,而你1.1版本没启动,所以报出Unable to find instance for discovery-guide-service-a。请把mobile改成其它数字即可