apache / apache/incubator-seata-samples
2个provider和Reference用nacos折开后运行到第1个action的prepareAdd时死机报timeout:rollback
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
我把2个provider各折成一个spring工程,用的是连接nacos,provider的xml如下:
然后我的reference在我的controller里:
我是这样调用的:
@Autowired
private MinusMoneyAction minusMoneyAction;
@Autowired
private PlusMoneyAction plusMoneyAction;
@Override
@GlobalTransactional
public boolean transfer(long from, long to, double amount) throws DemoRpcRunTimeException {
boolean answer = minusMoneyAction.prepareMinus(null, from, amount);
if (!answer) {
// 扣钱参与者,一阶段失败; 回滚本地事务和分布式事务
throw new DemoRpcRunTimeException("账号:[" + from + "] 预扣款失败");
}
// 加钱参与者,一阶段执行
answer = plusMoneyAction.prepareAdd(null, to, amount);
当运行到:boolean answer = minusMoneyAction.prepareMinus(null, from, amount);
eclipse控制台显示:
INFO io.seata.core.rpc.netty.NettyClientChannelManager - will connect to 192.168.56.101:8091
然后我看seata控制台里一直显示:这个globaltransaction超时, will be rollback
我在seata-0.9.0和seata-0.8.1, seata-0.8.0下都是这样。
从昨天下午16:00搞到现在,一分钟没睡,求帮助。
Contributor guide
Research direction
Start with the provider and reference XML shown in the issue, then trace the controller call from prepareMinus to prepareAdd. Check the Seata client connection to 192.168.56.101:8091 and the global transaction timeout or rollback logs. Done means identifying the cause of the timeout and documenting a reproducible configuration or code fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100