Simple content access is failing because date/time is incorrectly set
Environment
- Simple Content Access(SCA)
- Red Hat Subscription Manager(RHSM)
- Red Hat Enterprise Linux
Issue
-
Unable to enable any repositories with SCA enabled.
# subscription-manager identity system identity: 3b0834b8-b9da-40a9-baf5-ee0cfb834e07 name: host.example.com org name: xxxxxx org ID: xxxxxx# subscription-manager status +-------------------------------------------+ System Status Details +-------------------------------------------+ Overall Status: Disabled Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status. System Purpose Status: Disabled# subscription-manager repos --enable rhel-7-server-rpms This system has no repositories available through subscriptions.# subscription-manager attach --auto Ignoring request to auto-attach. It is disabled for org "xxxxxx" because of the content access mode setting. -
The system is not able to fetch the repositories and
yum repolistis throwing below messages:-# yum repolist Updating Subscription Management repositories. This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions. No repositories available
Resolution
- Ensure the correct date/time is set on the system and system clock should be synchronized. It is recommended to use a NTP solution in order to achieve a stable system clock. Please see the following for more details:
Red Hat Enterprise Linux 8
* [Chapter 15. Configuring time synchronization](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/configuring-time-synchronization_configuring-basic-system-settings#doc-wrapper)
Red hat Enterprise Linux 9
* [Chapter 13. Configuring time synchronization](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/configuring_basic_system_settings/configuring-time-synchronization_configuring-basic-system-settings#doc-wrapper)
Red hat Enterprise Linux 10
* [Configuring time synchronization](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/configuring_time_synchronization/index)
- An internal ticket is raised for
subscription-managercommand to display exact error message if date/time is not properly synchronized on the system in SCA mode.
Root Cause
- When the date/time is incorrectly set SCA will not work properly.
Diagnostic Steps
-
Check
/var/log/rhsm/rhsm.logfile:-2021-06-22 12:05:05,126 [WARNING] rhsmcertd-worker:4026:MainThread @connection.py:556 - Clock skew detected, please check your system time -
Check if the system clock is synchronized:-
# timedatectl Local time: Mon 2024-12-30 09:16:51 IST Universal time: Mon 2024-12-30 03:46:51 UTC RTC time: Mon 2024-12-30 03:46:59 Time zone: Asia/Kolkata (IST, +0530) System clock synchronized: no <<---------------------------------------- NTP service: inactive <<----------------------------------- RTC in local TZ: no
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.