whyyouhitme_ 2018-11-11 10:08 采纳率: 57.1%
浏览 871
已采纳

淘淘商城刚搭了一个架子,写一个接口用来测试,实现类输出当前时间

插件启动服务端消费端正常,浏览器报错如下:
HTTP Status 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method queryNow in the service com.taotao.service.TestService. Tried 3 times of the providers 192.168.0.101:20880 from the registry 192.168.25.128:2181 on the consumer 192.168.0.101 using the dubbo version 2.5.3. Last error is: Invoke remote method timeout. method: queryNow, provider: dubbo://192.168.0.101:20880/com.taotao.service.TestService?anyhost=true&application=taotao-manager-web&check=false&dubbo=2.5.3&interface=com.taotao.service.TestService&methods=queryNow&pid=2352&revision=0.0.1-SNAPSHOT&side=consumer&timestamp=1541930359643, cause: Waiting server-side response timeout. start time: 2018-11-11 17:59:32.747, end time: 2018-11-11 17:59:33.749, client elapsed: 1 ms, server elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=queryNow, parameterTypes=[], arguments=[], attachments={path=com.taotao.service.TestService, interface=com.taotao.service.TestService, version=0.0.0}]], channel: /192.168.0.101:58405 -> /192.168.0.101:20880

接口如下:
public interface TestMapper{
pubilc String queryNow();
}
实现如下:

select NOW()

表现层如下

@Controller
public class TestController {
@Autowired
private TestService testservice;
/**
* 测试dubbo配置是否正常
* @return
*/
@RequestMapping("/test/queryNow")
@ResponseBody
public String queryNow(){
return testservice.queryNow();
}
}
dubbo配置都是复制学习资料,查了很多遍肯定没问题。timeout已经设置过,无论设多长时间就报多长时间的错。没用

  • 写回答

3条回答 默认 最新

  • Mr.Guoguo 2018-11-11 11:14
    关注

    dubbo 配置里面这个接口的引用超时时间设置长一点试一下

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序