3

阿里云DNS解析偶然性失败

 3 years ago
source link: https://www.wencst.com/archives/1438
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

阿里云DNS解析偶然性失败

作者: wencst 分类: linux,云计算,架构设计 发布时间: 2019-01-29 11:23 阅读: 3,358 次

做了什么操作?

在服务中搭建了kubernetes,并且搭建了kubernetes dns。

什么是“偶然性”失败?

就是使用DNS解析域名时,偶尔可以解析通,偶尔不通。

当时上网查了很多原因,但都无法解决。

但是在服务内网中搭建的服务,就可以解析通。于是就想到了是阿里云的原因。

于是将解析域名的配置文件resolv.conf替换成内网的配置文件,发现可以解析了。

提工单询问了一下阿里云工程师,发现resolv.conf中有一条配置:

options timeout:2 attempts:3 rotate single-request-reopenoptions timeout:2 attempts:3 rotate single-request-reopen

这条配置使得在解析域名时在所有的nameserver中进行随机的选择。

随机选择,会导致nameserver解析内网偶然性失败。

如果文章对您有用,扫一下支付宝的红包,不胜感激!

欢迎加入QQ群进行技术交流:656897351(各种技术、招聘、兼职、培训欢迎加入)

  • 很高兴这篇博客能够帮助朋友们解决问题,今天有朋友问到修改resolv.conf重启网络后文件又改回去了。
    感谢“日暮途远”提供了一个方案:
    修改eth0中的配置:
    peerdns=no
    默认yes,修改为no后,重启网络不会重写resolv.conf文件。

    看到文章的朋友们可以参考。

Leave a Reply Cancel reply

You must be logged in to post a comment.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK