zoukankan      html  css  js  c++  java
  • dubbo 调用服务超时

     

    先贴出错误报告:

    Failed to invoke the method *** in the service ***.
    
    Tried 1 times of the providers [192.168.1.174:20882] (1/1) from the registry 127.0.0.1:2181 on the consumer 192.168.1.174 using the dubbo version 2.5.3. 
    
    Last error is: Invoke remote method timeout. method: addShopCoupons, 
    
    provider: dubbo://192.168.1.174:20882/***?anyhost=true&application=springboot-server&check=false&dubbo=2.5.3&executes=300&group=***&interface=***&logger=slf4j&methods=***&pid=7440&retries=0&revision=1.0-SNAPSHOT&side=consumer&timeout=150000&timestamp=1522740735099&version=1.0-SNAPSHOT, 
    
    cause: Waiting server-side response timeout. 
    start time: 2018-04-03 15:33:35.043, end time: 2018-04-03 15:36:05.054, client elapsed: 6 ms, server elapsed: 150005 ms, timeout: 150000 ms, request: Request [id=1, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=***, parameterTypes=[class ***entityPO], arguments=[***ENTITYpo@2aa67b77], attachments={path=***, interface=***, version=1.0-SNAPSHOT, timeout=150000, group=***}]], channel: /192.168.1.174:61720 -> /192.168.1.174:20882

    查看zookeeper的服务日志:

    [consumer: //192.168.1.174/***?app
        lication = springboot - server & category = consumers & check = false & dubbo = 2.
        5.3 & group = *** & interface = *** &
        methods = *** & pid = 7440 & retries = 0 & revision = 1.0 - SNAPSHOT &
        side = consumer & timeout = 150000 & timestamp = 1522740735099 & version = 1.0 - S
        NAPSHOT
    ]

    因为报的错是dubbo timeout,就先检查配置文件:

      提供服务端:

      消费服务端:

     

    原因:

      调用的返回值在Provider端序列化失败(如传输对象没有实现Serializable接口),Provider端也没有异常输出,Consumer端超时出错 

    解决:

      将传递的entittyPO实现Serializable接口,再次尝试,问题解决

  • 相关阅读:
    数据库连接(1)-从JDBC到MyBatis
    基于 abp vNext 和 .NET Core 开发博客项目
    基于 abp vNext 和 .NET Core 开发博客项目
    正则表达式位置匹配
    正则表达式字符匹配
    2019年终总结
    Win10 1903 运行安卓模拟器蓝屏解决方案
    我已经看到了,撤回也没用了(PC微信防撤回补丁)
    DOCKER 学习笔记1 认识docker
    Java 中级 学习笔记 2 JVM GC 垃圾回收与算法
  • 原文地址:https://www.cnblogs.com/roxy/p/8709183.html
Copyright © 2011-2022 走看看