錯誤報告:
2020-03-27 18:37:33.745 ERROR [XG-DATA-SOURCE-SERVICE-KARL,,,] 27528 --- [ main] i.s.c.r.netty.NettyClientChannelManager : 0101 can not connect to 127.0.0.1:8091 cause:can not register RM,err:can not connect to services-server.
io.seata.common.exception.FrameworkException: can not register RM,err:can not connect to services-server.
at io.seata.core.rpc.netty.NettyClientChannelManager.doConnect(NettyClientChannelManager.java:210) ~[seata-all-1.0.0.jar:1.0.0]
at io.seata.core.rpc.netty.NettyClientChannelManager.acquireChannel(NettyClientChannelManager.java:103) ~[seata-all-1.0.0.jar:1.0.0]

實際上我的配置是沒有配置 127.0.0.1:8091 以及services-server,估計是使用了默認

追蹤NettyClientChannelManager


最終定位到類ConfigurationFactory

可以看出config.type 竟然為 "file",實際上我的為"apollo"。實際上追蹤發現新版的做了代碼的增強,全部變成了config.type ="file"。舊版2.1.0的版本是可以讀取用戶的特色配置,比如配置到apollo的配置。想起多個月前問過清銘這個問題,為了兼容客戶端沒有apollo的情況下。實際上對於使用者,特別是spring cloud + apollo這種體系來看,確實不友好,對於使用者來說很疑惑,不免懷疑是不是設計上的問題。
解決方案是把對應的配置,都配到file.config,所需要的微服務都的需要添加這個配置文件。
