This article is a mirror article of machine translation, please click here to jump to the original article.

View: 42655|Reply: 7

[Source] Spring Cloud Nacos multi-NIC registration binds a specified IP address

[Copy link]
Posted on 11/17/2021 2:52:26 PM | | | |
Review:

Windows builds a standalone version of Nacos 2.0.3
https://www.itsvse.com/thread-10040-1-1.html

Spring Cloud Gateway cannot find a service solution using nacos
https://www.itsvse.com/thread-9992-1-1.html

Some colleagues work in a different place and connect to the company's network through VPN, at this time, the computer will have multiple private IP addresses, if the computer has multiple network cards (physical network card or virtual network card), there may also be multiple IP addresses, you can use the ipconfig command to view, as shown in the figure below:



Spring Cloud service found that the IP address registered to NACOS is not what I wanted, how do I bind the VPN's private network address?



I want to set the service IP address registered with NACOS to192.168.1.46editapplication.propertiesfile, set as follows:


The following is not tested!

Directly add a configuration that ignores a NIC:

Regular:

(End)




Previous:E45: 'readonly' option is set (add ! to override)
Next:Delete the found files in batches under Linux
Posted on 11/18/2021 8:51:53 AM |
Thank you for your selfless dedication
 Landlord| Posted on 2/8/2022 9:21:41 PM |
Nacos first checks whether there is an ip and networkInterface configuration.If there is, use the configured IP, otherwise check the networkInterface, and get the IP, if both are empty, use inetUtils.findFirstNonLoopbackHostInfo().getIpAddress() to get the IP:
The Spring Cloud Settings module registers to the IP and port specified by Nacos (the Docker image service registers with Nacos as the host private IP address):



 Landlord| Posted on 2/9/2022 9:39:59 AM |
The test registration specifies the IP and port to NACOS, and the configuration is as follows:


Posted on 6/30/2022 4:33:58 PM |

Thank you for your selfless dedication
Posted on 7/16/2022 8:44:35 PM |
Thanks for sharing
Posted on 8/16/2022 5:54:57 PM |
Awesome is just dealing with the bug of NACOS
Posted on 11/21/2022 11:35:40 AM |
Thank you to the owner for his selfless dedication
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com