一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

php报错file_get_contents(): php_network_getaddresses问题

时间:2022-06-24 16:18:23 编辑:袖梨 来源:一聚教程网

昨天,服务器的DNS突然不能使用,导致相关子站一直崩溃,日志中看到大量类似错误:


file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known...

file_get_contents('http://www.111com.net'): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known...


很明显是DNS无法解析域名,只得更换:

#打开linux网络配置文件
vi resolv.conf 
 
#注释老的namesever ,添加如下新的nameserver
nameserver 202.106.0.20
search localdomain
 
#保存内容重启网络服务
service network restart


为此,收集了常用的DNS服务器地址:

#114 DNS

114.114.114.114

114.114.115.115

 

#阿里 AliDNS

223.5.5.5

223.6.6.6

 

#oneDNS

112.124.47.27

114.215.126.16

 

#Google DNS

8.8.8.8

8.8.4.4

 

#OpenDNS

208.67.222.222

208.67.220.220


国内省市DNS服务器地址:

北京:

202.96.199.133

202.96.0.133

202.106.0.20

202.106.148.1

202.97.16.195

202.138.96.2

 

深圳:

202.96.134.133

202.96.154.15

 

广州:

61.144.56.100

61.144.56.101

 

广东:

202.96.128.86

202.96.128.143

 

上海:

202.96.199.132

202.96.199.133

202.96.209.5

202.96.209.133

 

天津:

202.99.96.68

202.99.104.68

 

广西:

202.96.128.68

202.103.224.68

202.103.225.68

 

河南:

202.102.227.68

202.102.245.12

202.102.224.68

 

河北:

202.99.160.68

 

福建:

202.101.98.54

202.101.98.55

 

厦门:

202.101.103.55

202.101.103.54

 

湖南:

202.103.0.68

202.103.96.68

202.103.96.112

 

湖北:

202.103.0.68

202.103.0.117

202.103.24.68

 

江苏:

202.102.15.162

202.102.29.3

202.102.13.141

202.102.24.35

 

浙江:

202.96.102.3

202.96.96.68

202.96.104.18

 

陕西:

202.100.13.11

202.100.4.16

202.100.4.15

202.100.0.68

 

山东:

202.102.154.3

202.102.152.3

202.102.128.68

202.102.134.68

 

山西:

202.99.192.68

202.99.198.6

 

四川:

202.98.96.68

61.139.2.69

 

重庆:

61.128.128.68

 

成都:

202.98.96.68

202.98.96.69

 

辽宁:

202.98.0.68

202.96.75.68

202.96.75.64

202.96.69.38

202.96.86.18

202.96.86.24

 

安徽:

202.102.192.68

202.102.199.68

10.89.64.5

 

吉林:

202.98.5.68

202.98.14.18

202.98.14.19

 

江西:

202.101.224.68

202.109.129.2

202.101.240.36

 

新疆:

61.128.97.74

61.128.97.73

 

贵州:

202.98.192.68

10.157.2.15

 

云南:

202.98.96.68

202.98.160.68

 

黑龙江:

202.97.229.133

202.97.224.68

219.150.32.132

 

海南:

202.100.192.68

202.100.199.8

 

宁夏:

202.100.0.68

202.100.96.68

 

甘肃:

202.100.72.13

 

内蒙古:

202.99.224.68

 

青海:

202.100.128.68


热门栏目