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.

Hello Team,

I've been followed same procedure but still not able to register the same. Got the same error and logs are below.

21-06-04 18:01:36,213 [DEBUG] subscription-manager-gui:3378:MainThread @identity.py:131 - Loading consumer info from identity certificates. 2021-06-04 18:01:36,214 [DEBUG] subscription-manager-gui:3378:MainThread @identity.py:146 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem' 2021-06-04 18:01:36,215 [DEBUG] subscription-manager-gui:3378:MainThread @connection.py:315 - ContentConnection 2021-06-04 18:01:36,231 [DEBUG] subscription-manager-gui:3378:MainThread @certdirectory.py:216 - Installed product IDs: ['69'] 2021-06-04 18:01:36,231 [DEBUG] subscription-manager-gui:3378:MainThread @cert_sorter.py:126 - Unregistered, skipping server compliance check. 2021-06-04 18:01:36,231 [DEBUG] subscription-manager-gui:3378:MainThread @identity.py:131 - Loading consumer info from identity certificates. 2021-06-04 18:01:36,231 [DEBUG] subscription-manager-gui:3378:MainThread @identity.py:146 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem' 2021-06-04 18:01:36,232 [DEBUG] subscription-manager-gui:3378:MainThread @plugins.py:569 - loaded plugin modules: [] 2021-06-04 18:01:36,232 [DEBUG] subscription-manager-gui:3378:MainThread @plugins.py:570 - loaded plugins: {} 2021-06-04 18:01:36,251 [DEBUG] subscription-manager-gui:3378:MainThread @hwprobe.py:580 - cpu info: {'cpu.cpu(s)': 4, 'cpu.core(s)_per_socket': 2, 'cpu.thread(s)_per_core': 1, 'cpu.topology_source': 'kernel /sys cpu sibling lists', 'cpu.cpu_socket(s)': 2} 2021-06-04 18:01:36,265 [DEBUG] subscription-manager-gui:3378:MainThread @hwprobe.py:806 - Running 'virt-what' 2021-06-04 18:01:36,345 [DEBUG] subscription-manager-gui:3378:MainThread @hwprobe.py:810 - virt-what stdout: vmware

2021-06-04 18:01:36,345 [DEBUG] subscription-manager-gui:3378:MainThread @hwprobe.py:811 - virt-what stderr: 2021-06-04 18:01:36,488 [INFO] subscription-manager-gui:3378:MainThread @hwprobe.py:916 - collected virt facts: virt.is_guest=True, virt.host_type=vmware, virt.uuid=484F4D56-5129-C411-6DFA-583EE9B3529E 2021-06-04 18:01:36,489 [DEBUG] subscription-manager-gui:3378:MainThread @managergui.py:169 - Client Versions: {'python-rhsm': '1.17.6-1.el7', 'subscription-manager': '1.17.10-1.el7'} 2021-06-04 18:01:36,489 [INFO] subscription-manager-gui:3378:MainThread @connection.py:830 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ verify=False 2021-06-04 18:01:36,731 [DEBUG] subscription-manager-gui:3378:MainThread @connection.py:525 - Loaded CA certificates from /etc/rhsm/ca/: redhat-uep.pem 2021-06-04 18:01:36,731 [DEBUG] subscription-manager-gui:3378:MainThread @connection.py:573 - Making request: GET /subscription/ 2021-06-04 18:01:36,732 [ERROR] subscription-manager-gui:3378:MainThread @utils.py:273 - Error while checking server version: [Errno -2] Name or service not known 2021-06-04 18:01:36,733 [ERROR] subscription-manager-gui:3378:MainThread @utils.py:275 - [Errno -2] Name or service not known Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/subscription_manager/utils.py", line 253, in get_server_versions "/var/log/rhsm/rhsm.log" 594L, 61327C

This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.