seata-simple-dubbo Waiting server-side response timeout
[INFO ] 2022-07-27 10:33:00,760 method:com.alibaba.dubbo.registry.support.AbstractRegistry.destroy(AbstractRegistry.java:460)
[DUBBO] Destroy unregister url consumer://192.168.255.10/io.seata.samples.dubbo.service.OrderService?application=dubbo-demo-app&category=consumers&check=false&dubbo=2.0.2&interface=io.seata.samples.dubbo.service.OrderService&methods=create&pid=1896&qos.accept.foreign.ip=false&qos.enable=false&qos.port=33333&side=consumer×tamp=1658888909577, dubbo version: 2.6.12, current host: 192.168.255.10
[INFO ] 2022-07-27 10:33:00,761 method:com.alibaba.dubbo.registry.support.AbstractRegistry.unsubscribe(AbstractRegistry.java:317)
[DUBBO] Unsubscribe: consumer://192.168.255.10/io.seata.samples.dubbo.service.OrderService?application=dubbo-demo-app&category=providers,configurators,routers&check=false&dubbo=2.0.2&interface=io.seata.samples.dubbo.service.OrderService&methods=create&pid=1896&qos.accept.foreign.ip=false&qos.enable=false&qos.port=33333&side=consumer×tamp=1658888909577, dubbo version: 2.6.12, current host: 192.168.255.10
Exception in thread "main" com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method deduct in the service io.seata.samples.dubbo.service.StockService. Tried 3 times of the providers [192.168.255.10:20882] (1/1) from the registry 127.0.0.1:8848 on the consumer 192.168.255.10 using the dubbo version 2.6.12. Last error is: Invoke remote method timeout. method: deduct, provider: dubbo://192.168.255.10:20882/io.seata.samples.dubbo.service.StockService?anyhost=true&application=dubbo-demo-app&bean.name=io.seata.samples.dubbo.service.StockService&category=providers&check=false&dubbo=2.0.2&generic=false&interface=io.seata.samples.dubbo.service.StockService&methods=deduct,batchDeduct&pid=1896&protocol=dubbo&qos.accept.foreign.ip=false&qos.enable=false&qos.port=33333®ister.ip=192.168.255.10&remote.timestamp=1658885606710&side=consumer&timeout=90000×tamp=1658888910337, cause: Waiting server-side response timeout. start time: 2022-07-27 10:31:30.738, end time: 2022-07-27 10:33:00.744, client elapsed: 0 ms, server elapsed: 90006 ms, timeout: 90000 ms, request: Request [id=2, version=2.0.2, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=deduct, parameterTypes=[class java.lang.String, int], arguments=[C00321, 2], attachments={path=io.seata.samples.dubbo.service.StockService, TX_XID=192.168.255.10:8091:1315339454687547408, TX_BRANCH_TYPE=AT, interface=io.seata.samples.dubbo.service.StockService, version=0.0.0, timeout=90000}, attributes={serialization_id=2}]], channel: 192.168.255.10:0 -> /192.168.255.10:20882
at com.alibaba.dubbo.rpc.cluster.support.FailoverClusterInvoker.doInvoke(FailoverClusterInvoker.java:111)
at com.alibaba.dubbo.rpc.cluster.support.AbstractClusterInvoker.invoke(AbstractClusterInvoker.java:244)
at com.alibaba.dubbo.rpc.cluster.support.wrapper.MockClusterInvoker.invoke(MockClusterInvoker.java:75)
at com.alibaba.dubbo.rpc.proxy.InvokerInvocationHandler.invoke(InvokerInvocationHandler.java:52)
at com.alibaba.dubbo.common.bytecode.proxy1.deduct(proxy1.java)
at io.seata.samples.dubbo.service.impl.BusinessServiceImpl.purchase(BusinessServiceImpl.java:46)
at io.seata.samples.dubbo.service.impl.BusinessServiceImpl$$FastClassBySpringCGLIB$$1af2d32f.invoke(
这个简单的demo,调整过超时时间,各种方案尝试多次,问题依然存在
@slievrly I also faced same server-side response timeout when I used docker run --name seata-server -p 8091:8091 -p 7091:7091 seataio/seata-server:latest for starting and deploying seta-server, after some time it gets stuck with timeout error.
Logs_seata-server: seata-server.txt
The reason is that Dubbo selected the wrong IP, which is not accessible. This usually happens due to Docker or similar issues. You can solve it by adding the environment variable DUBBO_IP_TO_REGISTRY=10.x.x.35 to the startup parameter. The IP mentioned should not be 127.0.0.1; you need to change it to your local LAN IP.