GithubHelp home page GithubHelp logo

Comments (7)

chixiaopao avatar chixiaopao commented on August 17, 2024

Our company does not let us know the IP information. so this parameter : nacos.inetutils.ip-address is not ok for us.

from nacos.

chixiaopao avatar chixiaopao commented on August 17, 2024

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.

KomachiSion avatar KomachiSion commented on August 17, 2024

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.

chixiaopao avatar chixiaopao commented on August 17, 2024

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.

chixiaopao avatar chixiaopao commented on August 17, 2024

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.

KomachiSion avatar KomachiSion commented on August 17, 2024

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.

chixiaopao avatar chixiaopao commented on August 17, 2024

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

ok,got it,thanks a lot for your feed back,I will close this issue.

from nacos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.