When calling an external service request, PHP addresses: getaddrinfo failed: Name or Servicenot Known with an error:The reason:
PHP host cannot connect to DNS server
PHP host cannot connect to DNS server
Analysis: such as the services you access request is www.leyangjuntestxxxx.com
You can first ping or Telnet the domain name to see if it is accessible, if it is responsive
Failure to ping indicates that your service is now connected to a problematic DNS server
General solutions:
One: It is necessary to check whether the remote host of the request is in /etc/hosts of the native host
Two: the need to check the rules of the firewall, is not intercepted by the response
Three: You can manually bind host in the /etc/hosts file