Comments (7)
Our company does not let us know the IP information. so this parameter : nacos.inetutils.ip-address is not ok for us.
from nacos.
After research, it is necessary to configure nacos.inetutils.ip-address as the dns address, but the dns address must meet the following rules:
[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(.[a-zA-Z0-9][-a-zA-Z0-9]{0,62 })+.?
from nacos.
sorry, I can't get the key point in your issue, in nacos k8s demo, it use dns(domain) way to configura cluster.conf and it works well in my k8s env for thousands of nacos cluster.
Is it your domain config with wrong?
from nacos.
hi @KomachiSion
thank you for your feedback.
We haven't used k8s yet.
Our prod env and dev env are isolated. We can't login the prod env to do some operations, and our admin does not allow us to directly use IP to config cluster.conf in the prod env. We can only use hostname/dns to config it.
after my test, If use hostname/dns, nacos will check whether its own IP is in the cluster.conf list when it starts. If it does not exist, it will add the IP to the list. I looked at the source code and found that (nacos.inetutils.ip-address or nacos.server.ip) is configured as hostname/dns then no new record will be added to cluster.conf during detection.
But there is a regex rule: [a-zA-Z0-9][-a-zA-Z0-9]{0,62}(.[a-zA-Z0-9][-a-zA-Z0-9]{0,62 })+.? which is used for check the hostname/dns, it need the hostname/dns must be contains (.) in the hostname/dns, I don't think it makes sense. Our company's host name does not have (.) when it is defined.
I'm not sure if my understanding is correct. I directly modified the regular expression and configured nacos.inetutils.ip-address: hostname in the prod env. Is this correct?
from nacos.
sorry, this is correct regular expression: [a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?
from nacos.
The regex rule of DNS is standard rule from community, I think the check is useful. So in community version, the check logic should not change.
But for your company situation, if you think you must use hostname as the dns result. you can change the regex rule in your deployment env.
For use hostname, nacos.inetutils.prefer-hostname-over-ip=true
will be ok. If it can't work well, such as auto read hostname with wrong hostname, then try to use nacos.inetutils.ip-address: hostname
from nacos.
The regex rule of DNS is standard rule from community, I think the check is useful. So in community version, the check logic should not change.
But for your company situation, if you think you must use hostname as the dns result. you can change the regex rule in your deployment env.
For use hostname,
nacos.inetutils.prefer-hostname-over-ip=true
will be ok. If it can't work well, such as auto read hostname with wrong hostname, then try to usenacos.inetutils.ip-address: hostname
ok,got it,thanks a lot for your feed back,I will close this issue.
from nacos.
Related Issues (20)
- 配置和服务发现使用不同的namespace HOT 6
- first start HOT 1
- After the service provider passes the nginx proxy port, it reports 400 when accessing through the gateway. HOT 3
- ali HOT 2
- 帮忙:鉴权问题 HOT 2
- Configuration list adds configuration format HOT 3
- Add a description of the project HOT 1
- 服务列表不显示consumer HOT 1
- Namespaces are presented as lists HOT 3
- Question about metadata update HOT 2
- Support config grpc port directly without using offset.
- springcloud nacos 1.5.1版本注册时添加鉴权账号密码,报403错误,求解怎么配置
- nacos 2.2 集群扩容后无法从raft member移除
- Nacos 2.4.1 在 JDK 8 中运行正常,在 JDK 17/22 运行异常 HOT 4
- Separate spring cloud starter Alibaba Acos discovery dependencies from the springboot project
- 整个nacos控制台,账号无权限的命名空间不显示,即显示有权限的命名空间。如配置管理和服务管理里面的各列表,还有命名空间管理
- 无法启动nacos 2.4.1,可以启动2.4.0 HOT 1
- 单例模式启动, 服务启动报jarft错误“No leader for raft group naming_persistent_service”
- 单例模式启动, 服务启动报jarft错误“No leader for raft group naming_persistent_service”
- Nacos-client missing accessToken sometime.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nacos.