Subscription-manager command fails with "[Errno 2] No such file or directory: '/var/lib/rhsm/cache/syspurpose.json'"

Solution Verified - Updated -

Issue

  • Why does subscription-manager command fails with "[Errno 2] No such file or directory: '/var/lib/rhsm/cache/syspurpose.json'"?
  • All Subscription-managers command returns "[Errno 2] No such file or directory: '/var/lib/rhsm/cache/syspurpose.json'"
# subscription-manager register --username xxxxxxxxxx
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/syspurpose/files.py", line 362, in get_cached_contents
self.cache_contents = json.load(io.open(self.cache_path, 'r', encoding='utf-8'))
FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/rhsm/cache/syspurpose.json'

Environment

Red Hat Enterprise Linux (RHEL) 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content