Getting Error in subscription-manager register

Latest response

I started learning Red Hat a couple of days back. As I'm new to this, getting a tough time to begin. I stated my situation below.

1) I installed Red Hat and I wasn't able to download any package using Yum install. The error i'm getting is "This system is not registered with an entitlement server. You can use subscription-manager to register.
There are no enabled repos".

2) When I try to subscribe, I was getting the error like "gaierror: [Errno -2] Name or service not known
[INFO] yum:32656:MainThread @connection.py:822 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
[INFO] yum:32656:MainThread @repolib.py:328 - repos updated: Repo updates

Total repo updates: 0"
Note: I used, subscripe-manager register --username name --password ****

Could anyone help me with the above error?

Responses

Thank you. It worked. DNS was not configured properly.

Nice to hear that it worked. Thanks for reporting back Pradeep.

Hi Pradeep,

Eventually you're facing a temporary issue, clean up and try again.

sudo subscription-manager remove --all
sudo subscription-manager unregister
sudo subscription-manager clean

sudo subscription-manager register
sudo subscription-manager refresh

sudo subscription-manager list --available
sudo subscription-manager attach --pool=<Pool-ID>

Regards,
Christian

  • Check your internet connection first; if you run a VM check the networking mode (NAT, Bridged Adapter, ..)
  • Check if it is a DNS issue, then proceed with these KBs links: https://access.redhat.com/solutions/117723 https://access.redhat.com/solutions/1481463
  • type "subscription-manager register --username=" replace it with your Red Hat username value may be its your registered email address.
  • You'll be prompted for "Password:", so enter the one that you use on the redhat website.