一、问题描述
我的项目是 Spring Cloud 微服务架构,建立了一个模块专门用来集成 Seata,并在需要使用分布式事务的其他模块中导入了该模块。而启动其他模块时,不停报错:
ERROR 20636 — [imeoutChecker_1] i.s.c.r.netty.NettyClientChannelManager:no available server to connect.
二、解决方法
查看官方文档:https://github.com/seata/seata-samples/blob/master/doc/quick-integration-with-spring-cloud.md
看到在对 file.conf 的解释说明中提到:
根据提示,在需要使用分布式事务的其他模块的 application.yml 中都进行配置:
再运行项目,可以看到控制台输出:
集成 Seata 成功。