fanliang11 / surging

Surging is a micro-service engine that provides a lightweight, high-performance, modular RPC request pipeline. support Event-based Asynchronous Pattern and reactive programming ,The service engine supports http, TCP, WS,Grpc, Thrift,Mqtt, UDP, and DNS protocols. It uses ZooKeeper and Consul as a registry, and integrates it. Hash, random, polling, Fair Polling as a load balancing algorithm, built-in service governance to ensure reliable RPC communication, the engine contains Diagnostic, link tracking for protocol and middleware calls, and integration SkyWalking Distributed APM
MIT License
3.24k stars 924 forks source link

服务之间调用时,会报“找不到相关服务信息” #266

Open ggh5270 opened 5 years ago

ggh5270 commented 5 years ago

有三个问题请教下: 1.服务之间调用时,会报“找不到相关服务信息”,但查看网关里的这个服务接口,是存在的,用postman直接调用这个服务,也是可以调用的,只是服务之间才会报这种错,有时将服务和网关重启后,又会正常了,请问这如何解决?

2.还有另外一种情况,部署后,有时会发现不了服务里的部分api,只能发现一部份,重启服务和网关后,又会出现了。

3.将服务部署后,能正常访问,后来将其中一个api的参数改了,如增加一个参数,再重新发布,发现服务里的api一直都是旧的,重启服务都不管用

liuhll commented 5 years ago

我也有遇到这个问题,查看consul服务注册中心,在ServiceCommands下可以查看到相关的服务信息,但是在ServiceRoutes下却查看不到相关的路由信息。

fanliang11 commented 5 years ago

1.找不到这种情况很多,有可能是网络抖动造成的,这时候你的服务不健康,如果没有其它服务切换,肯定是发现不了服务 2.重启时间不要过长,这样会造成移除不健康的服务,等2,3分钟会自动恢复的

  1. 没有碰过这种情况
ggh5270 commented 5 years ago

服务之间网络都是内网,服务之间调用报“找不到相关服务信息”这情况出现的机率都挺多的,部署的服务一多,就担心不知道哪个服务会出现这问题了

fanliang11 commented 5 years ago

部署你要不就快点,要不就等几分钟,等心跳更新恢复正常,要不你就等我的灰度发布,但是AssemblyLoadContext设计有问题,还没有可解决的方案

fanliang11 commented 5 years ago

在未重启的情况下,有些新增加的服务,在管理界面不会看到更新的问题,是因为未开启EnableChildrenMonitor,此配置用来更新所有的服务节点,建议不要开启此选项,因为serviceroutes越来越多,过多的心跳更新会造成性能上的瓶颈,关闭EnableChildrenMonitor,不会造成调用使用的问题,而发生调用后,后面也会产生心跳更新。

ggh5270 commented 5 years ago

服务部署后,偶尔会出现 Surging.Core.CPlatform.Exceptions.CommunicationException: 与服务端通讯时发生了异常。 ---> DotNetty.Transport.Channels.NotYetConnectedException: I/O error occurred. 重新调用后,又会正常了,这是netty的bug?

liuhll commented 5 years ago

我也遇到这个问题,把dotnetty组件升级为最新的就可以了 这个应该是dotnetty的bug

tang-butian commented 5 years ago

这些问题我在开发中也经常遇到过