Open Ghost-Unison opened 4 days ago
检查client与172.17.0.3 这个ip的网络是否存在问题 Check if there is a problem with the network of the client and 172.17.0.3 this ip
The issue appears to be that business side and seata-server do not belong to the same network subset.
检查client与172.17.0.3 这个ip的网络是否存在问题 Check if there is a problem with the network of the client and 172.17.0.3 this ip
The issue appears to be that business side and seata-server do not belong to the same network subset.
谢谢回复,我的订单微服务(order-service)启动在本机(IDEA), 然而nacos和seata-server都启动在docker上(WSL2),我明白这确实是网络的问题。——我在本机无法访问172.10.0.3这个地址,所以我的微服务无法通过172.10.0.3这个地址注册到seata-server。 那么我的订单服务在nacos中获取到的这个seata-server的地址(172.10.0.3)是docker所指定的吗,我该怎么才能让我的订单服务获取到一个可访问的seata-server地址呢?
下面是我启动nacos和seata-server的docker命令。 docker run --name nacos -d -p 8848:8848 -p 9848:9848 --env MODE=standalone --env NACOS_AUTH_ENABLE=true -e ... -v ... nacos/nacos-server:latest
docker run --name seata-server -d -p 8091:8091 -p 7091:7091 -v ... apache/seata-server:2.1.0.jre17 这是否涉及到一些docker network相关的知识...
又或者说我只能把我的订单微服务order-service也发到docker上才能访问到seata-server吗,我觉得这样测试起来不太方便。
小白求助!本人正在进行Spring Cloud相关组件的学习,正在学习seata教程中使用seata控制下单事务的流程(订单-账户-库存),我的开发环境是这样的: 我在本机的docker环境(docker引擎是windows下的WSL2)上运行了nacos-server(2.4.2)和seata-sever(2.1.0)服务,并且seata服务也已经成功注册到nacos注册中心了 这是我seata-server的配置文件和在nacos配置中心中配置成功的截图
然后是我在nacos配置中心中对seata-server的配置,我主要修改了数据库相关的配置,并且把
service.default.grouplist
改成了我seata-server的地址,其他配置都是默认的,没有修改。然后我把下单、修改库存、账户操作分成了3个微服务(在本机测试,并没有发送到docker容器),现在需要启动他们并把他们注册到nacos,并把事务注册到seata-server(我不知道这样说是否恰当)。 这是我订单服务的配置文件
就在我启动完成这个订单服务之后,错误出现了,应该是说我的这个seata客户端无法注册到seata-server
但是我实在不知道我到底哪一步配置得有问题,seata-server服务、分组、地址我都检查过了,为什么客户端还一直连接不上seata-server呢? 我在seata客户端的配置文件中配置了nacos注册中心的地址后,不是应该可以直接获取到seata-server的地址并注册吗? 是不是跟我将seata-server部署在docker上有关系? 是不是nacos注册中心获取到的seata-server地址并不能直接由本机的seata客户端访问?