Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690049 - rhsm service unable to detect the change in server value in the rhsm.conf
Summary: rhsm service unable to detect the change in server value in the rhsm.conf
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-18 16:37 UTC by Rehana
Modified: 2019-03-24 19:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:


Attachments (Terms of Use)

Description Rehana 2019-03-18 16:37:32 UTC
Description of problem:
Observed that a change in rhsm.conf file was not detected by the rhsm.serveice (even though the service was running ) 

Version-Release number of selected component (if applicable):
# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.3.15-1
subscription management rules: 5.34
subscription-manager: 1.23.8-35.el8


How reproducible:


Steps to Reproduce:
1.Install cockpit and start cockpit , rhsm services 
2.change the hostname in the rhsm.conf to stage server
3.Register and attach subscription from cli
4. launch cockpit and access "subscription" tab

Actual results:
you will notice a green installed product status ,but the overall status will still display as 'System not registered" , try to unregister from the cockpit UI a error message " HTTP error (401 - Unauthorized): Invalid credentials." is displayed

Expected results:
no error message and the service should detect the change in the host name value and should reflect the status correct on the cockpit UI

Additional info:
[root@ibm-z-130 ~]# subscription-manager register --username=stage_test_****** --password=redhat --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 176db4cc-934f-4ae7-87ac-5275a78d7646
The registered system name is: ibm-z-130.rhts.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for IBM z Systems
Status:       Subscribed

^^ registered against stage 
[root@ibm-z-130 ~]# 

[root@ibm-z-130 ~]# service rhsm status
Redirecting to /bin/systemctl status rhsm.service
● rhsm.service - RHSM dbus service
   Loaded: loaded (/usr/lib/systemd/system/rhsm.service; disabled; vendor preset: disabled)
   Active: active (running) since Mon 2019-03-18 12:07:14 EDT; 13min ago
 Main PID: 18708 (rhsm-service)
    Tasks: 2 (limit: 12620)
   Memory: 32.1M
   CGroup: /system.slice/rhsm.service
           └─18708 /usr/libexec/platform-python /usr/libexec/rhsm-service

Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:924] Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/e>
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=3c359261-56cd-4816-925d-b220b2545cbe, request="GET /subscription/consumers/17>
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: WARNING [subscription_manager.cache:242] Unable to reach server, using cached status.
Mar 18 12:19:09 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.cert_sorter:205] Product status: valid_products=72 partial_products= expired_products= unentitled_producs= futu>
Mar 18 12:19:10 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=94f2ce55-4569-48e5-ba09-1e8c63ac39bb, request="GET /subscription/consumers/17>
Mar 18 12:19:10 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 18 12:19:10 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: WARNING [subscription_manager.cache:242] Unable to reach server, using cached status.

^ service is still looking at production server


journalctl
===============

Mar 18 12:08:40 ibm-z-130.rhts.eng.bos.redhat.com systemd[1]: Started dnf makecache.
Mar 18 12:08:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:08:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:09:31 ibm-z-130.rhts.eng.bos.redhat.com PackageKit[18811]: get-updates transaction /2_dacbdbdb from uid 0 finished with success after 8ms
Mar 18 12:09:31 ibm-z-130.rhts.eng.bos.redhat.com PackageKit[18811]: get-updates transaction /3_bcdedbbb from uid 0 finished with success after 8ms
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:40 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:924] Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/e>
Mar 18 12:09:41 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:41 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:41 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:41 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:09:41 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:924] Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=none
Mar 18 12:09:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:09:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:10:31 ibm-z-130.rhts.eng.bos.redhat.com sshd[20502]: Accepted password for root from 10.67.116.193 port 51106 ssh2
Mar 18 12:10:31 ibm-z-130.rhts.eng.bos.redhat.com systemd[1]: Started Session 4 of user root.
Mar 18 12:10:31 ibm-z-130.rhts.eng.bos.redhat.com systemd-logind[1296]: New session 4 of user root.
Mar 18 12:10:31 ibm-z-130.rhts.eng.bos.redhat.com sshd[20502]: pam_unix(sshd:session): session opened for user root by (uid=0)
Mar 18 12:10:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:10:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:11:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:11:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:12:39 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:39 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:51 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:51 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:51 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:924] Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert ca_dir=/e>
Mar 18 12:12:52 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:52 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:52 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:52 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:53 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:53 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 18 12:12:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:12:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:13:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:13:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:14:36 ibm-z-130.rhts.eng.bos.redhat.com PackageKit[18811]: daemon quit
Mar 18 12:14:54 ibm-z-130.rhts.eng.bos.redhat.com restraintd[1537]: *** Current Time: Mon Mar 18 12:14:54 2019 Localwatchdog at:  * Disabled! *
Mar 18 12:15:18 ibm-z-130.rhts.eng.bos.redhat.com dbus-daemon[1226]: [system] Activating service name='com.redhat.SubscriptionManager' requested by ':1.84' (uid=0 pid=20659 comm="/usr/libexec/platform-python /u>
Mar 18 12:15:18 ibm-z-130.rhts.eng.bos.redhat.com dbus-daemon[1226]: [system] Successfully activated service 'com.redhat.SubscriptionManager'
Mar 18 12:15:21 ibm-z-130.rhts.eng.bos.redhat.com subscription-manager[20659]: Registered system with identity: 05bc484c-2e62-481a-ba35-b268dd4b6b24
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=674837c1-342e-4eee-af79-620c4bdc01ae, request="GET /subscription/consumers/05>
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:239] Server unreachable, registered, but no cache exists.
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=444bc932-e907-4bc9-b9ad-ae4b60d94b74, request="GET /subscription/consumers/05>
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 18 12:15:22 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:239] Server unreachable, registered, but no cache exists.
Mar 18 12:15:23 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=d00b0da0-0d11-45a7-a7d0-7688a10785ca, request="GET /subscription/consumers/05>
Mar 18 12:15:23 ibm-z-130.rhts.eng.bos.redhat.com rhsm-service[18708]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.

Comment 1 Rehana 2019-03-22 15:40:07 UTC
The system does have inotify installed on it 

[root@ibm-x3650m4-01-vm-15 ~]# subscription-manager register --username=stage_test_rhe**** --password=*** --auto-attach
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
The system has been registered with ID: 0109b77b-edd1-4179-97ec-1eaca5663e3a
The registered system name is: ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux for x86_64
Status:       Subscribed

[root@ibm-x3650m4-01-vm-15 ~]# rpm -qa python3-inotify
python3-inotify-0.9.6-13.el8.noarch


[root@ibm-x3650m4-01-vm-15 ~]# service rhsm status
Redirecting to /bin/systemctl status rhsm.service
● rhsm.service - RHSM dbus service
   Loaded: loaded (/usr/lib/systemd/system/rhsm.service; disabled; vendor preset: disabled)
   Active: active (running) since Fri 2019-03-22 11:35:27 EDT; 2min 56s ago
 Main PID: 17403 (rhsm-service)
    Tasks: 2 (limit: 24007)
   Memory: 30.2M
   CGroup: /system.slice/rhsm.service
           └─17403 /usr/libexec/platform-python /usr/libexec/rhsm-service

Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [subscription_manager.i18n:154] Could not import locale for en-GB: [Errno 2] No translation file found for domain: 'rhsm'
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [subscription_manager.i18n:126] Could not import locale either for en-GB_EN-GB: [Errno 2] No translation file found for dom>
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [rhsm.connection:924] Connection built: host=subscription.rhsm.redhat.com port=443 handler=/subscription auth=identity_cert>
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=92b048d9-2979-453d-ba9a-63a8907a7be8, request="GET /subscription/co>
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]: WARNING [subscription_manager.cache:242] Unable to reach server, using cached status.
Mar 22 11:37:29 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [subscription_manager.cert_sorter:205] Product status: valid_products=479 partial_products= expired_products= unentitled_pr>
Mar 22 11:37:30 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]:  INFO [rhsm.connection:638] Response: status=401, requestUuid=417db291-8a31-4aa5-87db-737c45f1347d, request="GET /subscription/co>
Mar 22 11:37:30 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]: ERROR [subscription_manager.cache:236] HTTP error (401 - Unauthorized): Invalid credentials.
Mar 22 11:37:30 ibm-x3650m4-01-vm-15.lab.eng.bos.redhat.com rhsm-service[17403]: WARNING [subscription_manager.cache:242] Unable to reach server, using cached status.


Note You need to log in before you can comment on or make changes to this bug.