Error when using curl command to visit website:
[root@bqh-119 ~]# curl -I www.test.com
curl: (7) couldn't connect to host
[root@bqh-119 ~]# curl -V #Query version and supported protocols
curl 7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.14.0.0 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
Protocols: tftp ftp telnet dict ldap ldaps http file https ftps scp sftp
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz
First, if you can’t Ping the website, go to/etc/hotspot and add the address:
Then check whether the firewall is turned on or whether access rules are added
Curl is normal after closing the firewall. In many cases, it is caused by firewall rules interception, and of course, it is also caused by other configuration reasons
Similar Posts:
- [Solved] CURL Install Error: GnuTLS: The TLS connection was non-properly terminated. Unable to establish SSL connection.
- Zabbix-server Error: No route to host [How to Solve]
- FTP connect Error: No route to host [How to Solve]
- [Solved] github fatal: unable to access ‘xxxx’: Could not resolve host:xxx
- telnet: connect to address xxx.xxx.xxx.xxx: No route to host
- Node uses SSH2 SFTP Client to upload and download FTP files
- php_network_getaddresses: getaddrinfo failed
- curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
- the media could not be loaded, either because the server or network failed o