【发布时间】:2021-09-25 19:46:01
【问题描述】:
几个月以来,我们一直在使用相同的脚本和配置,并且运行良好。突然,卷曲在几个小时前开始失败,出现无法解析主机的错误。我用邮递员测试了主机,它可以工作。我也将主机更改为 google.com,但得到了同样的错误。
没有在一夜之间更改任何机器或服务器配置。
任何指针..这对我们来说是一个生产停止。
这是来自 curl 的错误日志
array(26) {
["url"]=>
string(37) "https://google.com/callback/abcd"
["content_type"]=>
NULL
["http_code"]=>
int(0)
["header_size"]=>
int(0)
["request_size"]=>
int(0)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.000121)
["namelookup_time"]=>
float(0)
["connect_time"]=>
float(0)
["pretransfer_time"]=>
float(0)
["size_upload"]=>
float(0)
["size_download"]=>
float(0)
["speed_download"]=>
float(0)
["speed_upload"]=>
float(0)
["download_content_length"]=>
float(-1)
["upload_content_length"]=>
float(-1)
["starttransfer_time"]=>
float(0)
["redirect_time"]=>
float(0)
["redirect_url"]=>
string(0) ""
["primary_ip"]=>
string(0) ""
["certinfo"]=>
array(0) {
}
["primary_port"]=>
int(0)
["local_ip"]=>
string(0) ""
["local_port"]=>
int(0)
}
string(34) "Could not resolve host: google.com"
我已经尝试重新启动 apache2 以及我的 PHP-FHM。没有任何帮助。
【问题讨论】:
-
这不是 curl 问题,这是您服务器的 DNS 配置。这可能会帮助你stackoverflow.com/questions/24967855/…