Can't registers my RHEL 8.2 VM

Latest response

I know I must be missing something dead simple, but I cannot seem to register my RHEL 8.2 installation on a virtual machine.

I run the subscription-manager command:
subscription-manager register --username --password

But I receive the following output:

Registering to: subscription.rhsm.redhat.com:443/subscription
'NoneType' object is not subscriptable

I have a RHEL 7.7 installation (also on a virtual machine) and I receive a slightly different error:

Registering to: subscription.rhsm.redhat.com:443/subscription
'NoneType' object has no attribute 'getitem'

What am I doing wrong?

Thank you for your help.

Responses

In case it helps, here is the tail end of my rhsm.log file.

2020-07-23 12:32:06,463 [DEBUG] 6:5651:MainThread @https.py:56 - Using standard libs to provide httplib and ssl
2020-07-23 12:32:06,610 [DEBUG] 6:5651:MainThread @dbus_interface.py:39 - self.has_main_loop=False
2020-07-23 12:32:06,630 [DEBUG] 6:5651:MainThread @ga_loader.py:91 - ga_loader GaImporterGtk3
2020-07-23 12:32:06,631 [DEBUG] 6:5651:MainThread @plugins.py:571 - loaded plugin modules: []
2020-07-23 12:32:06,631 [DEBUG] 6:5651:MainThread @plugins.py:572 - loaded plugins: {}
2020-07-23 12:32:06,631 [DEBUG] 6:5651:MainThread @identity.py:139 - Loading consumer info from identity certificates.
2020-07-23 12:32:06,631 [DEBUG] 6:5651:MainThread @identity.py:154 - 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'
2020-07-23 12:32:06,632 [DEBUG] 6:5651:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2020-07-23 12:32:06,633 [INFO] 6:5651:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2020-07-23 12:32:06,633 [DEBUG] 6:5651:MainThread @files.py:326 - Successfully read local syspurpose contents.
2020-07-23 12:32:06,633 [DEBUG] 6:5651:MainThread @files.py:363 - Successfully read cached syspurpose contents.
2020-07-23 12:32:06,641 [DEBUG] 6:5651:MainThread @files.py:326 - Successfully read local syspurpose contents.
2020-07-23 12:32:06,641 [DEBUG] 6:5651:MainThread @files.py:363 - Successfully read cached syspurpose contents.
2020-07-23 12:32:06,643 [DEBUG] 6:5651:MainThread @files.py:326 - Successfully read local syspurpose contents.
2020-07-23 12:32:06,643 [DEBUG] 6:5651:MainThread @files.py:363 - Successfully read cached syspurpose contents.
2020-07-23 12:32:06,643 [DEBUG] 6:5651:MainThread @files.py:326 - Successfully read local syspurpose contents.
2020-07-23 12:32:06,643 [DEBUG] 6:5651:MainThread @files.py:363 - Successfully read cached syspurpose contents.
2020-07-23 12:32:06,644 [DEBUG] 6:5651:MainThread @managercli.py:492 - X-Correlation-ID: bcfa227b705b41eab074ac80e18b282c
2020-07-23 12:32:06,644 [DEBUG] 6:5651:MainThread @managercli.py:381 - Client Versions: {'subscription-manager': '1.26.16-1.el8'}
2020-07-23 12:32:06,644 [DEBUG] 6:5651:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2020-07-23 12:32:06,644 [INFO] 6:5651:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/etc/rhsm/ca/ insecure=False
2020-07-23 12:32:06,644 [DEBUG] 6:5651:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2020-07-23 12:32:06,645 [INFO] 6:5651:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=none
2020-07-23 12:32:06,645 [DEBUG] 6:5651:MainThread @managercli.py:381 - Client Versions: {'subscription-manager': '1.26.16-1.el8'}
2020-07-23 12:32:06,716 [DEBUG] 6:5651:MainThread @managercli.py:357 - Consumer Identity name=None uuid=None
2020-07-23 12:32:06,717 [DEBUG] 6:5651:MainThread @managercli.py:357 - Consumer Identity name=None uuid=None
2020-07-23 12:32:13,036 [DEBUG] 6:5651:MainThread @connection.py:808 - Environment variable NO_PROXY= will be used
2020-07-23 12:32:13,037 [INFO] 6:5651:MainThread @connection.py:905 - Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=basic username=****
2020-07-23 12:32:13,038 [DEBUG] 6:5651:MainThread @connection.py:523 - Loaded CA certificates from /etc/rhsm/ca/: redhat-entitlement-authority.pem, redhat-uep.pem
2020-07-23 12:32:13,038 [DEBUG] 6:5651:MainThread @connection.py:571 - Making request: GET /subscription/users/****/owners
2020-07-23 12:32:15,241 [DEBUG] 6:5651:MainThread @connection.py:618 - Response: status=200, requestUuid=63220c85-ea97-4a27-986f-ad057cd662d4, request="GET /subscription/users/****/owners"
2020-07-23 12:32:15,245 [ERROR] 6:5651:MainThread @managercli.py:216 - Error during registration: 'NoneType' object is not subscriptable
2020-07-23 12:32:15,245 [ERROR] 6:5651:MainThread @managercli.py:217 - 'NoneType' object is not subscriptable
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1361, in _do_command
    owner_key = self._determine_owner_key(admin_cp)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1514, in _determine_owner_key
    return owners[0]['key']
TypeError: 'NoneType' object is not subscriptable

Just in case this helps someone else, I finally figured out the issue. I needed to use my Red Hat Login as my username when running the registration command and not the associated email address (even though that's what I use to login online).

Thanks for the report. I have opened bz1861073 to get a better error message displayed