Open CSJ0827 opened 7 years ago
看异常是server向consul上报心跳失败,可以确认一下是否请求consul checkpass超时,或者consul中没有对应的server信息。
public final class AgentConsulClient implements AgentClient
public Response
程序运行中一般情况下 rawResponse.getStatusCode()==200 运行正常 ,偶尔会出现500 抛出异常上面的异常,问题很奇怪,不是一直出现,偶尔出现,频率大约10分钟一次; 在加了motan的多个服务上都出现这个问题
如果同样的请求参数,consul agent会返回不同的状态码,我觉得可能跟consul agent或者consul集群的配置有关
我的是三台服务上有两台报下面这个错误,一台什么错误也没有。很奇怪 consul.v1.OperationException: OperationException(statusCode=500, statusMessa
com.ecwid.consul.ConsulException: com.ecwid.consul.ConsulException: get service server list consul exception, rawResponse: null at com.tencent.tsf.discovery.TsfServerList.getTsfServers(TsfServerList.java:256) ~[spring-cloud-tsf-consul-discovery-1.26.0-Greenwich-RELEASE.jar:1.26.0-Greenwich-RELEASE] at com.tencent.tsf.discovery.TsfServerList.getServers(TsfServerList.java:144) ~[spring-cloud-tsf-consul-discovery-1.26.0-Greenwich-RELEASE.jar:1.26.0-Greenwich-RELEASE] at com.tencent.tsf.discovery.TsfServerList.getUpdatedListOfServers(TsfServerList.java:133) ~[spring-cloud-tsf-consul-discovery-1.26.0-Greenwich-RELEASE.jar:1.26.0-Greenwich-RELEASE] at com.netflix.loadbalancer.DynamicServerListLoadBalancer.updateListOfServers(DynamicServerListLoadBalancer.java:240) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.netflix.loadbalancer.DynamicServerListLoadBalancer$1.doUpdate(DynamicServerListLoadBalancer.java:62) ~[ribbon-loadbalancer-2.3.0.jar:2.3.0] at com.tencent.tsf.discovery.ConsulPollingServerListUpdater$1.run(ConsulPollingServerListUpdater.java:113) ~[spring-cloud-tsf-consul-discovery-1.26.0-Greenwich-RELEASE.jar:1.26.0-Greenwich-RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [na:1.8.0_221] at java.util.concurrent.FutureTask.runAndReset$$$capture(Unknown Source) [na:1.8.0_221] at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [na:1.8.0_221] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [na:1.8.0_221] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [na:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_221] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_221] at java.lang.Thread.run(Unknown Source) [na:1.8.0_221] Caused by: com.ecwid.consul.ConsulException: get service server list consul exception, rawResponse: null at com.tencent.tsf.discovery.TsfServerList.getTsfServers(TsfServerList.java:252) ~[spring-cloud-tsf-consul-discovery-1.26.0-Greenwich-RELEASE.jar:1.26.0-Greenwich-RELEASE] ... 13 common frames omitted 想问问大神们,启动项目控制台老是打印这个异常问题,但是也能正常启动项目和运行
ERROR consul heartbeat-set check pass error!serviceid:192.168.19.164:8002-com.tt.demo.app.service.IDemoService com.ecwid.consul.v1.OperationException: null at com.ecwid.consul.v1.agent.AgentConsulClient.agentCheckPass(AgentConsulClient.java:149) at com.ecwid.consul.v1.agent.AgentConsulClient.agentCheckPass(AgentConsulClient.java:138) at com.ecwid.consul.v1.ConsulClient.agentCheckPass(ConsulClient.java:162) at com.weibo.api.motan.registry.consul.client.ConsulEcwidClient.checkPass(ConsulEcwidClient.java:29) at com.weibo.api.motan.registry.consul.ConsulHeartbeatManager$HeartbeatJob.run(ConsulHeartbeatManager.java:153) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)