-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关于Sentinel客户端寻找本地IP的问题 #395
Comments
可以通过-Dcsp.sentinel.heartbeat.client.ip=xxx配置 |
See also #246 for more information. |
spring.cloud.inetutils.preferred-networks=172. 没有这样的参数支持多网卡吗 |
You may open a new issue to discuss it. Contributions are welcomed! |
那如果部署到容器上 |
这个一般如果是容器的话,各编排系统都有对应的环境变量存放容器的ip地址的 |
你是指在代码里通过系统命令来获取?我也是公司内网使用,现在使用挺麻烦的,能否考虑一下支持一下呢 |
你们有编排吧?比如mesos/k8s/或其它,用编排启动一个简单容器,你登上去看一下export -a的输出就知道哪个环境变量存放了容器ip了(不过像我们这种用calico网络直接自动获取就行了) |
…ty_issue [ISSUE alibaba#395]Resolve compatibility issues and keep consistent with the old API
Sentinel-core jar包下的 com.alibaba.csp.sentinel.util.HostNameUtil 这个类,默认取的是本机的公网ip,在公司内部使用的话,IP是局域网中的地址,是否可将这个类当做配置文件参数暴露出来,简而言之,取本地服务的IP的代码太暴力。适配性不强~
The text was updated successfully, but these errors were encountered: