当前位置:网站首页>In the multi network card environment, the service IP registered by Nacos is incorrect, resulting in inaccessible services

In the multi network card environment, the service IP registered by Nacos is incorrect, resulting in inaccessible services

2022-06-24 22:29:00 follow_ me!

problem :
Today, I suddenly encountered a service registered to nacos Service on ip It's a virtual machine ip, Cause service routing failure , Response timeout :
 Insert picture description here
Solution :
1. The configuration file , stay yaml Add priority matching network in

spring:
  cloud:
    inetutils:
      preferred-networks: 192.168.80 
      //id It can be written in full , Such as 192.168.80.144

2. stay idea Of VM options add to :
-Dspring.cloud.inetutils.preferred-networks=192.168.80
 Insert picture description here

原网站

版权声明
本文为[follow_ me!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211236393342.html