PHP error file_get_contents (): php_network_getaddresses problem

Source: Internet
Author: User
Tags php error nameserver

Yesterday, the server's DNS suddenly failed to use, causing the related child station to crash, the log saw a large number of similar errors:


File_get_contents (): Php_network_getaddresses:getaddrinfo failed:name or service not known ...

file_get_contents (' Http://www.111cn.net '): Failed to open Stream:php_network_getaddresses:getaddrinfo failed:name or Service not known ...


It is obvious that DNS cannot resolve domain names and has to be replaced:

#打开linux网络配置文件
vi resolv.conf
#注释老的namesever, add the following new nameserver
nameserver 202.106.0.20
Search Localdomain
#保存内容重启网络服务
Service Network restart


To do this, a common DNS server address is collected:

#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


Domestic provinces and Cities DNS server address:

Beijing:

202.96.199.133

202.96.0.133

202.106.0.20

202.106.148.1

202.97.16.195

202.138.96.2

Shenzhen:

202.96.134.133

202.96.154.15

Guangzhou:

61.144.56.100

61.144.56.101

Guangdong:

202.96.128.86

202.96.128.143

Shanghai:

202.96.199.132

202.96.199.133

202.96.209.5

202.96.209.133

Tianjin:

202.99.96.68

202.99.104.68

Guangxi:

202.96.128.68

202.103.224.68

202.103.225.68

Henan:

202.102.227.68

202.102.245.12

202.102.224.68

Hebei:

202.99.160.68

Fujian:

202.101.98.54

202.101.98.55

Xiamen:

202.101.103.55

202.101.103.54

Hunan:

202.103.0.68

202.103.96.68

202.103.96.112

Hubei:

202.103.0.68

202.103.0.117

202.103.24.68

Jiangsu:

202.102.15.162

202.102.29.3

202.102.13.141

202.102.24.35

Zhejiang:

202.96.102.3

202.96.96.68

202.96.104.18

Shaanxi:

202.100.13.11

202.100.4.16

202.100.4.15

202.100.0.68

Shandong:

202.102.154.3

202.102.152.3

202.102.128.68

202.102.134.68

Shanxi:

202.99.192.68

202.99.198.6

Sichuan:

202.98.96.68

61.139.2.69

Chongqing:

61.128.128.68

Chengdu:

202.98.96.68

202.98.96.69

Liaoning:

202.98.0.68

202.96.75.68

202.96.75.64

202.96.69.38

202.96.86.18

202.96.86.24

Anhui:

202.102.192.68

202.102.199.68

10.89.64.5

Jilin:

202.98.5.68

202.98.14.18

202.98.14.19

Jiangxi:

202.101.224.68

202.109.129.2

202.101.240.36

Xinjiang:

61.128.97.74

61.128.97.73

Guizhou:

202.98.192.68

10.157.2.15

Yunnan:

202.98.96.68

202.98.160.68

Heilongjiang:

202.97.229.133

202.97.224.68

219.150.32.132

Hainan:

202.100.192.68

202.100.199.8

Ningxia:

202.100.0.68

202.100.96.68

Gansu:

202.100.72.13

Inner mongolia:

202.99.224.68

Qinghai:

202.100.128.68


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.