ostenant / spring-cloud-starter-thrift

spring-cloud-starter-thrift提供SpringCloud对可伸缩的跨语言服务调用框架Apache Thrift的封装和集成。
159 stars 83 forks source link

thrift 客户端当连接不上thrift server是报错被吃掉 #8

Open zzy165200 opened 5 years ago

zzy165200 commented 5 years ago

当clent和server网络不通的时候报错是 Thrift client call failed, thrift client signature is *** 这个很难排查,最终发现是因为网络不通导致,但是这个报错很难定位到网络上; ThriftClientAdvice.java if (e instanceof ThriftClientOpenException) { // 创建连接失败 Throwable realCause = e.getCause().getCause(); // unreachable, reset router //这里会吃掉Connect to 192.168.0.98:1111 failed 异常 if (realCause instanceof SocketException && realCause.getMessage().contains("Network is unreachable")) { throw e; } } else { throw e; }