alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.99k stars 8.35k forks source link

Bind ipv4 address failure #3872

Open pei-han opened 4 weeks ago

pei-han commented 4 weeks ago

i read spring cloud alibaba document seriously,it says using spring.cloud.nacos.discovery.network-interface and ip-type property can bind ipv4 address,but by experiment that is false.

can you guys help me?Any suggestions i appreciate.

Which Component spring cloud alibaba discovery version 2021.0.5.0 nacos version 2.3.0-beta

Describe the bug Binding ipv4 address does not work in virtual host with mutiple ethernet cards. 在多网卡的虚拟主机上,绑定ipv4地址失败,绑定了ipv6地址。

Simplest demo The URL of the simplest demo to reproduce the problem.

To Reproduce Steps to reproduce the behavior: bootstrap.yml configuration file screenshot below. image this service detail in nacos looks like below. image

ip address list below image

Expected behavior i expect the ipv4 address 172.18.18.92 in ip column of table. 预期在服务表格的ip一列应该是ipv4地址。 Screenshots If applicable, add screenshots to help explain your problem.

Additional context jdk1.8.45,os version centos 6.5 spring-boot version 2.7.13 spring-cloud version 2021.0.8