com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method 错误处理
2016-04-07 12:41
519 查看
通常 Dubbo 报错:“com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method”有两个原因:
1,需要进行实例化的类没有进行实例化,具体没有实例化的类会在错误信息中显示,在错误信息中搜索“Serializable”
即可找到将其实现序列化可消除错误。
2,是在使用Dubbo提供服务是在主机上启动了虚拟机的网络,在Windows中具体可以,在运行中输入“CMD”在CMD窗口中输入"ifconfig"命令查看,
如果有其他除本地的网络链接,通过命令或者将其手动禁止,再启动Dubbo服务可以解决问题。
错误信息:
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method addGoodsModel in the service cn.ennew.platform.goods.facade.GoodsInfoFacade.
Tried 1 times of the providers [10.4.57.249:20601] (1/2) from the registry 127.0.0.1:2181 on the consumer 10.4.57.249 using the dubbo
version 2.5.3. Last error is: Failed to invoke remote method: addGoodsModel, provider:
dubbo://10.4.57.249:20601/cn.ennew.platform.goods.facade.GoodsInfoFacade?anyhost=true&application=webapps-wwwp&check=false&dubbo=2.5.3&interface=
cn.ennew.platform.goods.facade.GoodsInfoFacade&methods=offSell,getGoodsCommentCount,findInnovateGoodsByMainUserId,getGoodsById,getDepot,
isProductMoodelUsed,findGoodsInfoByPage,recreateGoodsModel,getCountGoodsInfo,findGoodsCommentByGoodsId,findGoodsInfoByGoods,findItemDetailByItemIds,
getGoodsInfoByGoodsId,modifyGoodsModel,getGoodsItemAttrs,findInnovateGoodsByStatus,onSell,getGoodsCountByHallId,getItemDetailByItemId,
findGoodsDetailByGoodsIds,getCountGoodsDetail,removeGoodstModelById,addGoodsModel,getCountByServicePromiseId,
addServicePromise&payload=168388608&pid=7572&retries=0&revision=1.0.1-SNAPSHOT&serialization=dubbo&side=consumer&timeout=50000×tamp=1459933256171,
cause: Failed to send message Request [id=8, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=addGoodsModel,
parameterTypes=[class cn.ennew.platform.goods.dto.GoodsInfoModelDTO], arguments=[cn.ennew.platform.goods.dto.GoodsInfoModelDTO@5e8bd9ef],
attachments={path=cn.ennew.platform.goods.facade.GoodsInfoFacade, interface=cn.ennew.platform.goods.facade.GoodsInfoFacade,
timeout=50000, version=0.0.0}]] to /10.4.57.249:20601, cause: Serialized class cn.ennew.platform.goods.dto.GoodsAptitudeInfoDTO
must implement java.io.Serializable (dubbo codec setting: isAllowNonSerializable = false)
1,需要进行实例化的类没有进行实例化,具体没有实例化的类会在错误信息中显示,在错误信息中搜索“Serializable”
即可找到将其实现序列化可消除错误。
2,是在使用Dubbo提供服务是在主机上启动了虚拟机的网络,在Windows中具体可以,在运行中输入“CMD”在CMD窗口中输入"ifconfig"命令查看,
如果有其他除本地的网络链接,通过命令或者将其手动禁止,再启动Dubbo服务可以解决问题。
错误信息:
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method addGoodsModel in the service cn.ennew.platform.goods.facade.GoodsInfoFacade.
Tried 1 times of the providers [10.4.57.249:20601] (1/2) from the registry 127.0.0.1:2181 on the consumer 10.4.57.249 using the dubbo
version 2.5.3. Last error is: Failed to invoke remote method: addGoodsModel, provider:
dubbo://10.4.57.249:20601/cn.ennew.platform.goods.facade.GoodsInfoFacade?anyhost=true&application=webapps-wwwp&check=false&dubbo=2.5.3&interface=
cn.ennew.platform.goods.facade.GoodsInfoFacade&methods=offSell,getGoodsCommentCount,findInnovateGoodsByMainUserId,getGoodsById,getDepot,
isProductMoodelUsed,findGoodsInfoByPage,recreateGoodsModel,getCountGoodsInfo,findGoodsCommentByGoodsId,findGoodsInfoByGoods,findItemDetailByItemIds,
getGoodsInfoByGoodsId,modifyGoodsModel,getGoodsItemAttrs,findInnovateGoodsByStatus,onSell,getGoodsCountByHallId,getItemDetailByItemId,
findGoodsDetailByGoodsIds,getCountGoodsDetail,removeGoodstModelById,addGoodsModel,getCountByServicePromiseId,
addServicePromise&payload=168388608&pid=7572&retries=0&revision=1.0.1-SNAPSHOT&serialization=dubbo&side=consumer&timeout=50000×tamp=1459933256171,
cause: Failed to send message Request [id=8, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=addGoodsModel,
parameterTypes=[class cn.ennew.platform.goods.dto.GoodsInfoModelDTO], arguments=[cn.ennew.platform.goods.dto.GoodsInfoModelDTO@5e8bd9ef],
attachments={path=cn.ennew.platform.goods.facade.GoodsInfoFacade, interface=cn.ennew.platform.goods.facade.GoodsInfoFacade,
timeout=50000, version=0.0.0}]] to /10.4.57.249:20601, cause: Serialized class cn.ennew.platform.goods.dto.GoodsAptitudeInfoDTO
must implement java.io.Serializable (dubbo codec setting: isAllowNonSerializable = false)
相关文章推荐
- Postfix-2.11+Dovecot-2.0.9+MySQL+Nginx+Cyrus-sasl+Extmail-1.2实现基于虚拟用户的邮件系统架构
- JetBrains Makes its Products Free for Students(JetBrains 对学生免费了)
- zz:Unable to open log device ‘/dev/log/main’: No such file or directory
- 百度地图(BaiduMap)定位工具类封装和使用
- postgres error : failed to read kind from backend
- 4.4.1 single_server_main函数:single_server执行模板“主函数”
- getaddrinfo EAI_AGAIN error
- 4.3.2.2 master_avail_event函数:调用master_spawn
- 4.3.2.1 master_avail_listen函数:挂载或卸载回调函数master_avail_event
- 4.3.2 master_avail.c:回调函数挂载策略
- 爬楼梯(LintCode Climbing Stairs)
- 4.1.4 main函数实现细节
- action和domain的不同总结
- 关于快速报错fail-fast想说的之fail-fast的实现原理(一)
- Main函数中的argc和argv应用举例
- 4.1.3 main函数主体流程
- 3.8.3 MAIL_STREAM流
- [POJ 1691]Painting A Board[DFS][排序]
- go away, white hair
- Uncaught SecurityError: Failed to execute 'replaceState' on 'History':解决方案