Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout.
使用dubbo调用thrift的时候出现如下异常:
消费端和服务端都没有更具体的报错
原来怀疑是配置问题,因为在同样的工程中用dubbo协议调用服务就是正常的,而用thrift协议调用就会报错
调用配置如下
<dubbo:protocol name="dubbo" />
<dubbo:reference id="userQueryService" interface="service.UserQueryService" />
<dubbo:protocol name="thrift" />
<dubbo:reference id="thriftUserQueryService" interface="service.thrift.UserQueryService$Iface" />
但反复检查还是没发现问题。最后拿出dubbo自己的thrift例子重新建工程测试结果还是一样的报错,但是在dubbo工程中直接运行他的例子是可以调用通的。
初步怀疑是缺少依赖包导致。把怀疑的包一个一个的加上试验,最终发现加了slf4j的包后就正常了:
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
</dependency>
####但报错却是:” Caused by: com.alibaba.dubbo.remoting.TimeoutException: Waiting server-side response timeout.”这太坑了~~~