Linux   发布时间:2022-05-08  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了couldn't resolve host api.weixin.qq.com大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

1.代理服务器突然出现 Couldn't resolve host api.weixin.qq.com 不知原因

2.重启Nginx无效-----代码肯定没有动过(之前出现过,过了一天恢复)

3.防火墙关闭状态 -- service iptables status

couldn't resolve host api.weixin.qq.com

4. ping api.weixin.qq.com

curl api.weixin.qq.com

couldn't resolve host api.weixin.qq.com

5.修改dns后 8.8.8.8 可以curl和ping通过

couldn't resolve host api.weixin.qq.com

6.还是显示Couldn't resolve host api.weixin.qq.com 无法解析主机,重启network后被覆盖

couldn't resolve host api.weixin.qq.com

couldn't resolve host api.weixin.qq.com

7.解决覆盖问题

必须要在/etc /sysconfig/network-scripts/ifcfg-eth0里面最后加上dns的设置。要不然,重启后,肯定使用eth0设置中没有设 dns的相关信息,使/etc/resolv.conf恢复到原来的状态。

(1)若有多个ifcfg-ethX,首先查看一下当前机器的IP地址,先ifconfig 查看系统走的那个配置文件,

couldn't resolve host api.weixin.qq.com

couldn't resolve host api.weixin.qq.com

(2)添加DNS地址

couldn't resolve host api.weixin.qq.com

8.resolv.conf设置 (一定要把代理主机写在上部,负责重启后会覆盖)

couldn't resolve host api.weixin.qq.com

9.设置到此已经代码curl数据不通过

10.找到hosts文件抓出微信地址写进hosts 直接生效不用重启(问题解决)

couldn't resolve host api.weixin.qq.com

大佬总结

以上是大佬教程为你收集整理的couldn't resolve host api.weixin.qq.com全部内容,希望文章能够帮你解决couldn't resolve host api.weixin.qq.com所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: