RHEL: YUM Update Fails with Error "System is not registered with entitlement server, use subscription-manager to register"
Summary: Red Hat Network (RHN): As the YUM update fails and the message appears, "Error: The system is not registered with an entitlement server, you can use subscription-manager to register," the actions in this article help with troubleshooting while the OS warranty subscription is still active. ...
Instructions
To enable Red Hat Repo and connect the system to the RHN using Subscription Manager with an active subscription, follow the steps below:
- Use the below commands to register:
# subscription-manager register # subscription-manager attach --auto
- After registering is successful, check the status (is the system registered with a valid subscription):
# subscription-manager status
- To see attached subscriptions:
# subscription-manager list –consumed
In order to evaluate the full information, we may also have to look at the rhsm.log which is located in the /var/log/rhsm folder. If you observe the occurrence listed below, the firewall or proxy is not allowing the required hostname and ports access, which results in system subscription and yum failure with the stated error message.
Error: Failed to establish a tunnel: 403 Forbidden
See Red Hat article Yum fails with "Tunnel connection failed: 403 Forbidden" error
Many times, the system cannot be accessed or linked to the RHN due to proxy settings or the firewall restriction.
The output of the commands listed below may also be collected for more thorough troubleshooting:
# curl -v --proxy proxyiporurl:port https://subscription.rhsm.redhat.com/subscription --cacert /etc/rhsm/ca/redhat-uep.pem # curl -v -k https://subscription.rhsm.redhat.com/subscription/ --cacert /etc/rhsm/ca/redhat-uep.pem # curl -v https://subscription.rhn.redhat.com --insecure # openssl s_client -connect cdn.redhat.com:443 -CAfile /etc/rhsm/ca/redhat-uep.pem # openssl s_client -connect subscription.rhn.redhat.com:443 -CAfile /etc/rhsm/ca/redhat-uep.pem # curl -v https://subscription.rhn.redhat.com/subscription/ --cacert /etc/rhsm/ca/redhat-uep.pem
The output of the command should be as follows:
# curl -v --proxy proxyiporurl:port https://subscription.rhsm.redhat.com/subscription --cacert /etc/rhsm/ca/redhat-uep.pem
This above example suggests that McAfee is restricting access to the website because of security issues related to the system policy. You must work with the company's firewall and security team to allow access to the Red Hat website. The issue should be resolved after implementing the changes in the firewall.
Also, review the below screenshot for another case which confirmed that the proxy replaced the https certs.