DataSphereStudio icon indicating copy to clipboard operation
DataSphereStudio copied to clipboard

服务器有多网卡导致部署ip获取错误[Bug]

Open gaoyan1998 opened this issue 2 years ago • 1 comments

Search before asking

  • [X] I searched the issues and found no similar issues.

DSS Component

dss-commons

What happened + What you expected to happen

我linux服务器有多个ip,脚本里默认获取ip方式是用的hostname -I 这个会获取所有ip,然后就会导致整条ip错误,导致部署失败,例如这样

location /ws {
            proxy_pass http://192.168.1.1710.44.12.010.43.3.1172.18.0.43:9001;#后端Linkis的地址
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection upgrade;
            }

不仅仅是nginx,所有配置文件都会打上这个错误ip。

Relevent platform

centos7

Reproduction script

复现方式就是找一个有多个ip的服务器,hostname -I 看看是否返回多个,如果是,就会有这个问题

Anything else

No response

Are you willing to submit a PR?

  • [ ] Yes I am willing to submit a PR!

gaoyan1998 avatar Aug 16 '22 05:08 gaoyan1998

This issue has been fixed and will default to obtaining the first IP address

zqburde avatar Aug 10 '23 03:08 zqburde