[Satellite 6] Can't enable remote execution SSH plugin with this error "Could not evaluate: Proxy x.x.x.x cannot be retrieved: unknown error (response 401)"
Environment
- Red Hat Satellite 6.3.x
- Red Hat Satellite 6.2.x
Issue
-
satellite-installer --scenario capsule --enable-foreman-proxy-plugin-remote-execution-ssh
/Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[xx.xx.xx]: Could not evaluate: Proxy xx.xx.local cannot be retrieved: unknown error (response 401)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:7:inproxy'id'
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:13:in
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:17:inexists?'retrieve'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property/ensure.rb:81:in
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1070:inretrieve'retrieve_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type.rb:1098:in
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:300:in `from_resource' -
Capsule installation failed with below error:
ERF12-2530 [ProxyAPI::ProxyException]: Unable to detect features ([RestClient::ResourceNotFound]: 404 Resource Not Found)
- While installing Capsule 6.x, it failed with below error:
Could not evaluate: Proxy xx.xx.local cannot be retrieved: unknown error (response 401)
Resolution
Re-run satellite-installer with correct oauth credentials on Capsule. These credentials should match the ones used in Satellite:
grep -i oauth /etc/foreman/settings.yaml
:oauth_active: true
:oauth_map_users: false
:oauth_consumer_key: xxxxx
:oauth_consumer_secret: xxxxx
grep -i oauth /etc/pulp/server.conf
[oauth]
oauth_key: katello
oauth_secret: xxxxx
Note: Also need to correct the credentials used by capsule-certs-generate command.
# For puppet 3
cat /var/lib/puppet/foreman_cache_data/oauth_consumer_key
cat /var/lib/puppet/foreman_cache_data/oauth_consumer_secret
cat /var/lib/puppet/foreman_cache_data/katello_oauth_secret
# For puppet 4
cat /opt/puppetlabs/puppet/cache/foreman_cache_data/oauth_consumer_key
cat /opt/puppetlabs/puppet/cache/foreman_cache_data/oauth_consumer_secret
cat /opt/puppetlabs/puppet/cache/foreman_cache_data/katello_oauth_secret
Root Cause
- The oauth credentials that were used to install Capsule are incorrect.
Diagnostic Steps
Below three parameters were set incorrectly in the satellite-install command when installing the Capsule:
--foreman-proxy-oauth-consumer-key
--foreman-proxy-oauth-consumer-secret
--foreman-proxy-content-pulp-oauth-secret
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
