Red Hat Satellite Capsule upgrade fails with error "URL Only one declaration of a proxy is allowed"
Environment
- Red Hat Capsule 6
Issue
-
Red Hat Satellite Capsule upgrade fails with below errors.
Upgrade Step: Running installer... Proxy capsule2.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[capsule2.example.com]/ensure: change from absent to present failed: Proxy capsule2.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[capsule2.example.com]: Failed to call refresh: Proxy capsule2.example.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[capsule2.example.com]: Proxy capsule2.example.com cannot be registered (ApipieBindings::MissingArgumentsError: id): N/A Installing Done [100%] [......................................................................................] Something went wrong! Check the log for ERROR-level output The full log is at /var/log/foreman-installer/capsule.log Upgrade failed during the installation phase. Fix the error and re-run the upgrade. -
Red Hat Capsule server upgrade fails with error Proxy capsule2.example.com cannot be registered (422 Unprocessable Entity): URL Only one declaration of a proxy is allowed
Resolution
-
First, check the FQDN or name of the capsule in the following pages of the Satellite server.
-
Hosts --> All Hosts -
Infrastructure --> Capsules -
If the FQDN of the capsule was modified in the UI for any reason, revert back to the original name and re-execute the
satellite-installercommand on the capsule server.
-
-
If the issue still persists, then replace the
registered_nameparameter value incapsule-answers.yamlfile with the correctfqdn(initial hostname that was set when Red Hat Capsule was installed for first time) and try upgrade again.# grep -HRni registered_name /etc/foreman-installer/scenarios.d/capsule-answers.yaml /etc/foreman-installer/scenarios.d/capsule-answers.yaml:176: registered_name: capsule2.example.com -
Ensure that the hostname of Red Hat Capsule server wasn't changed after installation neither at OS level nor at Satellite GUI.
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
- Red Hat Capsule server hostname was changed after the installation.
Diagnostic Steps
-
Checking
/var/log/foreman/production.logfile it was observed that a different hostname is being referenced i.e capsule2.example.com which is different than capsule.example.com (initial hostname).2016-09-07 11:46:37 [app] [I] Parameters: {"smart_proxy"=>{"name"=>"capsule2.example.com", "url"=>"https://capsule.example.com:9090"}, "apiv"=>"v2"} -
Also
hammer capsule listcommand shows a different capsule name for the URL.[root@satellite ~]# hammer capsule list
| ID | NAME | URL | FEATURES |
|---|---|---|---|
| 1 | satellite.example.com | https://satellite.example.com:9090 | Pulp, Puppet, Puppet C... |
| 2 | capsule2.example.com | https://capsule.example.com:9090 | Pulp, Puppet, Puppet C... |
|---|
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.