Hammer command fails with "Error Failed to open TCP connection to getaddrinfo: Name or service not known"
Environment
- Red Hat Satellite
Issue
hammer pingfails with following error.
# hammer ping
Error: Failed to open TCP connection to : (getaddrinfo: Name or service not known)
- Satellite needs to configured to use the proxy.
Resolution
- This solution is only applicable if you would like to configure Satellite to use proxy.
- Configure Satellite to use proxy mentioned in the article
- After that, restart the services.
# satellite-maintain service restart
# hammer ping
- If it still fails, take a back up of Satellite server and run :
# satellite-installer --scenario satellite
# satellite-maintain service restart
# hammer ping
For more KB articles/solutions related to Red Hat Satellite 6.x hammer Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x hammer-related Issues
Root Cause
- There is a proxy entry under
/etc/rhsm/rhsm.confbut the Satellite is not configured to use proxy.
# an http proxy server to use
# proxy_hostname = IP
proxy_hostname = proxy.example.com
# port for http proxy server
proxy_port = 8080
- There is a proxy entry under profile environment
# env | grep -i proxy
https_proxy=proxy.example.com:<port>
http_proxy=proxy.example.com:<port>
SBR
Product(s)
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.