请问:buyTicket 测试时,重启 order 之后,调用 cinema 接口连不上,提示管道已关闭,怎么解?

来源:7-20 订单模块 - 购票业务测试以及相关内容修改

梨多情

2019-06-14

【订单模块 - 购票接口 - 测试异常】
【分析】
异常信息中的关键信息:
1、com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method getOrderNeeds in the service com.stylefeng.guns.api.cinema.CinemaServiceApi.
2、cause: message can not send, because channel is closed .
【异常信息】
com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method getOrderNeeds in the service com.stylefeng.guns.api.cinema.CinemaServiceApi.
Tried 3 times of the providers [192.168.31.136:20885] (1/1) from the registry localhost:2181 on the consumer 192.168.31.136 using the dubbo version 2.6.0.
Last error is: Failed to invoke remote method: getOrderNeeds, provider:
dubbo://192.168.31.136:20885/com.stylefeng.guns.api.cinema.CinemaServiceApi?accepts=10
&anyhost=true&application=meeting-order&check=false&dubbo=2.6.0&executes=10&generic=false
&interface=com.stylefeng.guns.api.cinema.CinemaServiceApi
&methods=getFilmInfoByFieldId,getBrands,getOrderNeeds,getAreas,getHallTypes,getCinemas,getCinemaInfoById,getFilmInfosWithFields,getHallField
&pid=10940&register.ip=192.168.31.136&remote.timestamp=1560437802824&side=consumer&timestamp=1560443435504,
cause: message can not send, because channel is closed .
url:dubbo://192.168.31.136:20885/com.stylefeng.guns.api.cinema.CinemaServiceApi?accepts=10
&anyhost=true&application=meeting-order&check=false&codec=dubbo&dubbo=2.6.0&executes=10&generic=false&heartbeat=60000
&interface=com.stylefeng.guns.api.cinema.CinemaServiceApi
&methods=getFilmInfoByFieldId,getBrands,getOrderNeeds,getAreas,getHallTypes,getCinemas,getCinemaInfoById,getFilmInfosWithFields,getHallField&pid=10940
&register.ip=192.168.31.136&remote.timestamp=1560437802824&side=consumer&timestamp=1560443435504

		at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:101) ~[dubbo-2.6.0.jar:2.6.0]
		at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:232) ~[dubbo-2.6.0.jar:2.6.0]
		at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:70) ~[dubbo-2.6.0.jar:2.6.0]
		at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:51) ~[dubbo-2.6.0.jar:2.6.0]
		at com.alibaba.dubbo.common.bytecode.proxy0.getOrderNeeds(proxy0.java) ~[dubbo-2.6.0.jar:2.6.0]
		at com.stylefeng.guns.order.modular.service.DefaultOrderServiceImpl.saveOrder(DefaultOrderServiceImpl.java:103) ~[na:na]
写回答

2回答

梨多情

提问者

2019-06-14

启用中啊 run dashboard 都有正常显示服务状态

0
0

Allen

2019-06-14

有确认过Order服务的启动状态么,  Order要启动状态才能被调用

0
9
Allen
回复
weixin_慕用7362611
原则上,Customer是通过zk里注册的地址来直连Provider的, 所以你拼写的127.0.0.1不一定是注册到zk的地址,可以在里面看一下
2020-01-24
共9条回复

Dubbo主流版本打造仿猫眼项目 理解微服务核心思想

实战Dubbo项目+面试技巧,老司机带你畅游微服务

1410 学习 · 582 问题

查看课程