background
After installing Ubuntu subsystem in Win10 system, L(Linux)N(Nginx)M(mysql)P(PHP)R(Redis) environment was set up.
The error message
php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution
The screening process
- check whether the services of nginx, php-fpm and redis-server are started normally;
sudo /etc/init.d/nginx status
check whether win10 can ping the ubuntu subsystem; Check if Redis configuration is correct; Check that Hosts is configured correctly; is finally determined that DNS cannot be resolved normally, and DNS configuration
needs to be modified
The solution
Gateway configuration:
, 1 sudo vi/etc/resolvconf resolv. Conf., d/base code>
# 添加下面网关(223.5.5.5 和 223.6.6.6 是阿里的网关)
nameserver 223.5.5.5
nameserver 223.6.6.6
2, sudo resolvconf-u
will synchronize the configured DNS to /etc/resolv.conf
3, check vi /etc/resolv.conf
whether there is a newly configured DNS
4. Restart PHP sudo /etc/init.d/php-fpm restart
Read More:
- PHP link database error PHP_ network_ getaddresses: getaddrinfo failed: Name or service not known
- php_ network_ Getaddresses: getaddressinfo failed: name or service not known solution
- Solution summary of VMware network card without IP and failure to start network card (continuous update)
- Error in installing RVM on MacOS raw.githubusercontent.com:443 Connection failure resolution
- Ubuntu network configuration+Fixing “Failed to bring up eth0” in Ubuntu
- Solve the problem of “wireless network activation failure” in Ubuntu 18, and repeatedly pop up the password input interface
- Error: getaddrinfo enoent error resolution
- How to solve the [error 11004] getaddrinfo failed error in nltk downloader
- The most complete solution for service network restart failure under CENTOS 7
- Linux virtual machine network “job for” network.service failed because the control process exited with error code”
- ERR_CONTENT_DECODING_FAILED error occurs in PHP program, summary of solutions
- Win7 system build PHP + MySQL + Apache environment + deploy ECSHOP project
- MySQL — initialize failed to generate temporary password in error log after initialization
- php open(/var/lib/php/session/sess_4ofxxx, O_RDWR) failed: Permission denied (13)
- After upgrading php7, PHP program prompts an error: operator not supported for strings in causes and Solutions
- Debian using networking to restart the network can not start the solution of network card
- Windows Realtek USB wireless network card boot failure Rtlihvs. DLL module stop problem
- In vs2013, reshharper and team management plug-in git share a temporary solution to the “failed modify to document” error.
- PHP message: PHP Fatal error: Uncaught PDOException: SQLSTATE[08004] [1040] Too many connections
- Build your own resnet18 network and load torch vision’s own weight