Red Hat Capsule upgrade or refresh feature fails with 502 "cannotconnect" or 403 "Forbidden" error in Red Hat Satellite 6
Environment
- Red Hat Satellite 6.X
- Red Hat Satellite Capsule 6.X
Issue
- Capsule installer fails or refreshing capsule features fails with error
[Net::HTTPFatalError]: 502 "cannotconnect"or[Net::HTTPServerException]: 403 "Forbidden"on the Satellite server.
Resolution
-
Two probable resolutions of this problem will be as mentioned below.
-
Unset the value of
http_proxyin Satellite settings.# hammer settings set --name http_proxy --value '' -
Or, Exclude http proxy for the affected Capsule server from
Satellite WebUI>>Administer>>Settings>>General>>HTTP(S) proxy except hosts>>- If you use an HTTP Proxy for all Satellite HTTP or HTTPS requests, you can prevent certain hosts from communicating through the proxy. Please refer documentation for more information and this solution article to understand the correct format.
-
For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.
Root Cause
- Proxy server proxy.example.com was not allowing or interfering HTTP and HTTP(s) requests from Satellite satellite.example.com to Capsule capsule.example.com
Diagnostic Steps
-
Following errors logged in
/var/log/foreman/production.logon the Satellite server.2020-08-13T09:53:25 [I|app|d540b29a] Started PUT "/smart_proxies/4-capsule-example-com/refresh" for 10.8.144.18 at 2020-08-13 09:53:25 -0500 2020-08-13T09:53:25 [I|app|d540b29a] Processing by SmartProxiesController#refresh as HTML 2020-08-13T09:53:25 [I|app|d540b29a] Parameters: {"authenticity_token"=>"o+UmrKgofNf1uCBJG0OwJCp28ytxgKB5jVyMfmTKOhzonzjClvkkmpoAFaAXkKM40XWp9J/kYyabUs2Kxaa15A==", "id"=>"4-capsule-example-com"} 2020-08-13T09:53:25 [I|app|d540b29a] (RestClient) Proxying request to capsule.example.com via http://proxy.example.com:80 2020-08-13T09:53:59 [I|app|d540b29a] (RestClient) Proxying request to capsule.example.com via http://proxy.example.com:80 2020-08-13T09:54:35 [W|app|d540b29a] ProxyAPI operation FAILED 2020-08-13T09:54:35 [E|app|d540b29a] Failed to save: Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Net::HTTPFatalError]: 502 "cannotconnect") for Capsule https://capsule.example.com:9090/v2/features, Please check the Capsule is configured and running on the host. 2020-08-13T09:54:35 [I|app|d540b29a] Redirected to https://satellite.example.com/smart_proxies/4-capsule-example-com 2020-08-13T09:54:35 [I|app|d540b29a] Completed 302 Found in 70448ms (ActiveRecord: 4.3ms) -
Alternatively, These errors were visible in the same log file.
2021-08-29T13:33:22 [I|app|9d50d818] (RestClient) Proxying request to capsule.example.com via https://proxy.example.com:8080 2021-08-29T13:33:22 [W|app|9d50d818] ProxyAPI operation FAILED 2021-08-29T13:33:22 [I|app|9d50d818] Backtrace for 'ProxyAPI operation FAILED' error (ProxyAPI::ProxyException): ERF12-3113 [ProxyAPI::ProxyException]: Unable to detect puppet path ([Net::HTTPServerException]: 403 "Forbidden") for Capsule https://capsule.example.com:9090/pulpnode/status/puppet 2021-08-29T13:33:22 [E|app|9d50d818] Failed to save: Unable to communicate with the Capsule: ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([Net::HTTPServerException]: 403 "Forbidden") for Capsule https://capsule.example.com:9090/v2/features, Please check the Capsule is configured and running on the host.
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.