When we try to use the yum
command to update or clean the repository on Red Hat 8 servers, we notice that the command gets stuck on various subcommands, including update
and repolist
. Similarly, when attempting to register the Red Hat device using the subscription-manager
command, it hangs during the registration process.
To troubleshoot this issue, the first step is to check the RHSM logs.
# /var/log/rhsm/rhsm.log --- 2024-12-10 06:13:51,644 [ERROR] dnf:35631:MainThread @subscription-manager.py:91 - HTTP error (410 - Gone): Unit ec3b3043-4a40-4cce-9131-5249ae825bed has be en deleted 2024-12-10 06:15:26,758 [ERROR] yum:9735:MainThread @lock.py:216 - Could not lock file: /run/rhsm/cert.pid Traceback (most recent call last): File "/usr/lib64/python3.6/site-packages/subscription_manager/lock.py", line 196, in acquire f.open(blocking=False) File "/usr/lib64/python3.6/site-packages/subscription_manager/lock.py", line 58, in open fcntl.flock(fd, fcntl.LOCK_EX | fcntl.LOCK_NB) BlockingIOError: [Errno 11] Resource temporarily unavailable ---
To identify the process which causing the issue, please review the above logs and identify the process id.
# grep rhsm ps --- root 1780 0.0 0.0 115744 2632 ? - Nov10 0:00 /usr/bin/rhsmcertd root 21078 0.0 1.1 493032 89580 ? - Dec07 0:00 /usr/libexec/platform-python /usr/libexec/rhsmcertd-worker
To fix this, we need to run the following commands on the affected system.
# rm -f /var/run/rhsm/cert.pid # ps aux | grep rhsm # cat /var/run/rhsm/cert.pid # ls -lZ /etc/rhsm/ca/katello-server-ca.pem # ls -lZd /etc/rhsm/ca/
Then re-try the registration or run the yum command. Hopefully your problem will get resolve after applying the above steps.