记录一次DNS解析误删导致的网页无法访问问题

起因:客户的某管理员误删了整个DNS解析表,虽然后面恢复了,但是我们云端服务器还是无法访问客户的接口地址https://www.dannytest.com:91/xxx/...

分析:

1.本地个人PC能通过浏览器调用该接口,能正常拿到返回值。

2.其他云端服务器也能正常调用该接口拿到正常返回值。

3.我们云端服务器访问不了该接口,报503,使用云端服务调用该接口调用失败,无法访问。

 

解决步骤:

1.第一感觉就是客户那边防火墙把我们云端服务器IP拉黑了,让客户检查,客户反馈没有拉黑。

2.查看云端服务日志,发现报错如下:

复制代码
<h1>ERROR</h1>
<h2>The requested URL could not be retrieved</h2>
</div>
<hr>

<div id="content">
<p>The following error was encountered while trying to retrieve the URL: <a href="www.dannytest.com:91">www.dannytest.com:91</a></p>

<blockquote id="error">
<p><b>Unable to determine IP address from host name <q>www.dannytest.com</q></b></p>
</blockquote>

<p>The DNS server returned:</p>
<blockquote id="data">
<pre>Name Error: The domain name does not exist.</pre>
</blockquote>

<p>This means that the cache was not able to resolve the hostname presented in the URL. Check if the address is correct.</p>

<p>Your cache administrator is <a href="mailto:root?subject=CacheErrorInfo%20-%20ERR_DNS_FAIL&amp;body=CacheHost%3A%20beijing-areah-test1%0D%0AErrPage%3A%20ERR_DNS_FAIL%0D%0AErr%3A%20%5Bnone%5D%0D%0ADNS%20ErrMsg%3A%20Name%20Error%3A%20The%20domain%20name%20does%20not%20exist.%0D%0ATimeStamp%3A%20Tue,%2018%20Apr%202023%2009%3A37%3A52%20GMT%0D%0A%0D%0AClientIP%3A%20192.168.1.1%0D%0A%0D%0AHTTP%20Request%3A%0D%0ACONNECT%20%2F%20HTTP%2F1.1%0AUser-Agent%3A%20Apache-HttpClient%2F4.5%20(Java%2F1.8.0_261)%0D%0AHost%3A%20www.dannytest.com%3A91%0D%0A%0D%0A%0D%0A">root</a>.</p>
<br>
</div>

<hr>
<div id="footer">
<p>Generated Tue, 18 Apr 2023 09:37:52 GMT by beijing-areah-test1 (squid/3.5.20)</p>
<!-- ERR_DNS_FAIL -->
</div>
</body></html>

        at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:219) ~[fastjson-1.2.14.jar:na]
        at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.java:68) ~[fastjson-1.2.14.jar:na]
        at com.alibaba.fastjson.parser.deserializer.MapDeserializer.deserialze(MapDeserializer.java:49) ~[fastjson-1.2.14.jar:na]
        at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:614) ~[fastjson-1.2.14.jar:na]
......
复制代码

 

从日志可看出DNS解析失败,猜测原因是客户那边的DNS解析删除,导致我们云端的代理缓存squid解析失败。

解决办法:1.在squid中添加DNS解析,如下:

vim squid.conf
dns_nameservers 100.100.2.136 100.100.2.138

然后重启下squid服务即可

systemctl restart squid

 

posted @   叮伱格斐呃  阅读(440)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
Live2D
欢迎阅读『记录一次DNS解析误删导致的网页无法访问问题』
点击右上角即可分享
微信分享提示