Networkexit code > 0
curl: (6) Could not resolve host
$curl: (6) Could not resolve host: non-existent-domain.com
Analysis
The DNS resolution failed; the client could not translate the hostname into an IP address.
Common Triggers
- ●Typo in the hostname.
- ●DNS server issues or internet connectivity is down.
- ●Missing entry in /etc/hosts for local development.
Debug Checks
- $Check internet connection:
ping 8.8.8.8. - $Test DNS resolution:
nslookup <hostname>ordig <hostname>.
Resolution
1
Correct the hostname typo.
2
Check your
/etc/resolv.conf settings.3
Add the hostname to
/etc/hosts if it's a local service.Metadata
- Tool
- Network
- Severity
- High
- Tags
- #network#dns#curl