IzayuiAki commented on issue #6915:
URL:
https://github.com/apache/incubator-seata/issues/6915#issuecomment-2443536468
@funky-eyes 您好,我在学习过程中也遇到类似问题,还请麻烦帮忙解答一下,万分感谢!
seata-server配置:
```
seata:
config:
# support: nacos, consul, apollo, zk, etcd3
type: file
registry:
# support: nacos, eureka, redis, zk, consul, etcd3, sofa
type: nacos
nacos:
server-addr: 192.168.5.7:8848
username: nacos
password: 123456
namespace: 65bd3cce-994e-4870-b297-f7767f2ca82e
group: my-group1
application: seata-server
cluster: HB
```
seata-client配置:
```
seata:
tx-service-group: demo-tx
service:
vgroup-mapping:
demo-tx: HB
registry:
type: nacos
nacos:
application: seata-server
server-addr: 192.168.5.7:8848
username: nacos
password: 123456
group-id: my-group1
namespace: 65bd3cce-994e-4870-b297-f7767f2ca82e
```
使用版本:SpringCloudAlibaba 2023.0.1.0 + Seata 2.0.0
在启动过程中,服务端正常启动并成功注册到nacos,但seata客户端启动时输出错误日志
```
i.s.c.r.netty.NettyClientChannelManager : no available service found in
cluster 'HB', please make sure registry config correct and keep your seata
server running
```
日志输出处源码:
```
if (CollectionUtils.isEmpty(availList)) {
RegistryService registryService = RegistryFactory.getInstance();
String clusterName =
registryService.getServiceGroup(transactionServiceGroup);
if (StringUtils.isBlank(clusterName)) {
LOGGER.error("can not get cluster name in registry config '{}{}',
please make sure registry config correct",
ConfigurationKeys.SERVICE_GROUP_MAPPING_PREFIX,
transactionServiceGroup);
return;
}
if (!(registryService instanceof FileRegistryServiceImpl)) {
LOGGER.error("no available service found in cluster '{}', please
make sure registry config correct and keep your seata server running",
clusterName);
}
return;
}
```
通过断点查看`if (!(registryService instanceof
FileRegistryServiceImpl)){...}`处,发现`registryService`对象的实际类型为`io.seata.discovery.registry.nacos.NacosRegistryServiceImpl`,由此而输出该日志,并且在seata-server端的控制台日志中也没有发现RM注册成功相关日志。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]