curl https 请求连接超时

问题描述 投票:0回答:1

在linux centos 7上使用curl进行https请求

第一次 ping 成功。我可以 ping 好

我确实在其他 linux vps 上收到了请求,它是成功的

这是/etc/resolv.conf

# Generated by NetworkManager
search soniideas.com
nameserver 8.8.8.8

在我尝试使用curl 执行https 请求时,出现此错误

[root@mta94 ~]# curl  -v https://xxx.xxx.xxx.xxx:10443
* About to connect() to 2.50.25.178 port 10443 (#0)
*   Trying xxx.xxx.xxx.xxx...

* Connection timed out
* Failed connect to xxx.xxx.xxx.xxx:10443; Connection timed out
* Closing connection 0
curl: (7) Failed connect to xxx.xxx.xxx.xxx:10443; Connection timed out
linux https centos
1个回答
0
投票

ping 命令有效并不意味着curl 命令也有效。 curl 命令不起作用的原因可能是 centos 7 未配置为允许端口 10443 上的传入连接。请检查您的防火墙和

iptables
命令。

© www.soinside.com 2019 - 2024. All rights reserved.