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

Thank you Michael, that worked for me too. Red Hat Login username can be found here: https://www.redhat.com/wapps/ugc/protected/password.html. Seems like this bug is still open after over a year. Can someone please do something about it, it can result in a lot of time wasted, and seems like a lot of folk have the same bad experience?

I'm consistently getting:

'NoneType' object is not subscriptable

when attempting :

[root@localhost ~]# subscription-manager register

with RHEL8.3 (had same problem with 8.2).

Pretty sure the request is getting through to the RedHat server because ping output looks good:

[root@localhost ~]# ping subscription.rhsm.redhat.com PING subscription.rhsm.redhat.com (209.132.183.108) 56(84) bytes of data. 64 bytes from subscription.rhsm.redhat.com (209.132.183.108): icmp_seq=1 ttl=236 time=66.4 ms 64 bytes from subscription.rhsm.redhat.com (209.132.183.108): icmp_seq=2 ttl=236 time=64.3 ms 64 bytes from subscription.rhsm.redhat.com (209.132.183.108): icmp_seq=3 ttl=236 time=64.3 ms

... and if Password is intentionally misspelled

HTTP error (401 - Unauthorized): Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html

comes back.

syspurpose is set:

[root@localhost ~]# syspurpose show { "role": "Self Support", "service_level_agreement": "Unknown", "usage": "Development" }

and "Red Hat Developer Subscription for Individuals" shows up under Inventory for my Red Hat account.

What to do next? I've spent many hours trying to get what should be simple to work.

'NoneType' object is not subscriptable

is a Python error and should never be returned to a user.

hello i am facing this issues.. tried with user name password but didnt worked .. please help

Hi Mohamed Rizvi,

Please see this Red Hat solution, and just curious. does your system have a working network connection? If not, registration won't go well. Also, please let us know what errors you receive when trying to register, because we really have no idea what errors you receive, and knowing that could help us to try to help you.

Also, see https://access.redhat.com/solutions/911683.

Regards,
RJ