nacos icon indicating copy to clipboard operation
nacos copied to clipboard

docker容器内无法连接nacos容器please check server 172.172.172.100 ,port 9848 is available

Open qq670176019 opened this issue 2 years ago • 6 comments

1、dockerfile配置如下: image 2、application.properties配置如下: image 3、nacos启动日志如下: image 4、nacos容器内netstat如下: image 5、nacos容器映射端口如下: image 6、其他容器内需要向nacos注册的服务报错如下: Fail to connect server, after trying 76 times, last try server is {serverIp = '172.172.172.100', server main port = 8848}, error = unknown

请问有没有遇到过类似问题的小伙伴,你们是怎么解决的呢?我尝试过好多次都没效果

qq670176019 avatar Feb 27 '22 06:02 qq670176019

看起来像网络问题 验证下端到端的联通性?

vividfish avatar Feb 28 '22 07:02 vividfish

在宿主机外telnet 7748 8848 9848 9849都能通

qq670176019 avatar Feb 28 '22 07:02 qq670176019

你Nacos 什么版本的?前两天遇到过这种情况

当时服务端的版本为 2.0.0 客户端版本为 2.0.0 后来升级 Nacos 客户端版本至 2.0.4 解决了

lleiwang avatar Mar 02 '22 01:03 lleiwang

你Nacos 什么版本的?前两天遇到过这种情况

当时服务端的版本为 2.0.0 客户端版本为 2.0.0 后来升级 Nacos 客户端版本至 2.0.4 解决了

我用2.0.4时候有问题,就将到2.0.3了不知道为啥。我是用的ruoyi-cloud,然后自己改了很多东西,后来重新下了一个改了下配置能跑起来了

qq670176019 avatar Mar 02 '22 01:03 qq670176019

Thanks for your feedback and contribution. But the issue/pull request has not had recent activity more than 180 days. This issue/pull request will be closed if no further activity occurs 7 days later. We may solve this issue in new version. So can you upgrade to newest version and retry? If there are still issues or want to contribute again. Please create new issue or pull request again.

stale[bot] avatar Sep 21 '22 00:09 stale[bot]

这是来自QQ邮箱的假期自动回复邮件。   您好,您的邮件我已经收到,尽快给您回复。

qq670176019 avatar Sep 21 '22 00:09 qq670176019

解决Nacos 9848 GRPC 端口通信超时问题 Server check fail, please check server 127.0.0.1, port 9848 is available;解决方案:在 /etc/hosts 中添加 本机 ip + hostname,解决java运行慢的问题,nacos注册就正常了。

hostname

## 返回主机名称
my-linux-04.novalocal

## 然后编辑本机hosts
vi /etc/hosts

## 文件末端添加 本机ip + 刚刚查询到的hostname,比如本机ip是192.168.68.168
192.168.68.168 my-linux-04.novalocal

## 保存编辑并刷新网络
[root@superroot mydock03]# /etc/init.d/network restart
Restarting network (via systemctl):                     

xiawei520 avatar Jan 24 '24 10:01 xiawei520

这是来自QQ邮箱的假期自动回复邮件。   您好,您的邮件我已经收到,尽快给您回复。

qq670176019 avatar Jan 24 '24 10:01 qq670176019