Bug 1559227

Summary: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
Product: Red Hat Enterprise Linux 6 Reporter: qianzhan
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: Red Hat subscription-manager QE Team <rhsm-qe>
Severity: low Docs Contact:
Priority: low    
Version: 6.10CC: candlepin-bugs, csnyder, janarula, qianzhan, rhsm-qe, rjerrido, salmy, skallesh, toneata, weiliu
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: subscription-manager-1.20.10-6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1510696 Environment:
Last Closed: 2018-06-19 05:21:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1510696    
Bug Blocks:    

Comment 2 Wei Liu 2018-03-22 03:08:23 UTC
This issue also exists on rhel6.10:

Version-Release number of selected component (if applicable):
subscription-manager-rhsm-1.20.10-3.el6.x86_64
subscription-manager-1.20.10-3.el6.x86_64
subscription-manager-firstboot-1.20.10-3.el6.x86_64
subscription-manager-rhsm-certificates-1.20.10-3.el6.x86_64
subscription-manager-gui-1.20.10-3.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1.Install build RHEL-6.10-20180321.1

2.Register system and attach subscription
[root@dhcp-128-56 ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rnew_test
Password: 
The system has been registered with ID: fd19bd53-75e9-45fd-ab49-29ac852954d5
The registered system name is: dhcp-128-56.nay.redhat.com
[root@dhcp-128-56 ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3.Check the rhsm.log
[root@dhcp-128-56 ~]# cat /var/log/rhsm/rhsm.log | grep -i error
2018-03-22 07:03:46,415 [ERROR] subscription-manager:3040:MainThread @identity.py:145 - 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'
2018-03-22 07:03:58,117 [ERROR] subscription-manager:3040:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known
2018-03-22 07:03:58,302 [ERROR] subscription-manager:3040:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known
2018-03-22 07:04:09,774 [ERROR] subscription-manager:3040:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known
2018-03-22 07:04:09,829 [ERROR] subscription-manager:3040:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known
2018-03-22 07:04:31,594 [ERROR] subscription-manager:3124:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known
2018-03-22 07:04:31,661 [ERROR] subscription-manager:3124:MainThread @hwprobe.py:649 - Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known

Actual results:
Error message shown in rhsm.log
[Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'

 Error during resolving IPv6 address of hostname: dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known

Expected results:
No error messages in rhsm.log

Comment 3 qianzhan 2018-03-23 08:04:01 UTC
(In reply to Wei Liu from comment #2)

> Actual results:
> Error message shown in rhsm.log
> [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
> 
>  Error during resolving IPv6 address of hostname:
> dhcp-128-56.nay.redhat.com, [Errno -2] Name or service not known


See bug 1559743 for the second kind of error

Comment 10 Wei Liu 2018-04-19 01:54:38 UTC
I try again on RHEL-6.10-Beta-1.1 and the issue still exists on the latest build.The steps are as below:

Version-Release number of selected component (if applicable):
subscription-manager-rhsm-1.20.10-3.el6.x86_64
subscription-manager-1.20.10-3.el6.x86_64
subscription-manager-firstboot-1.20.10-3.el6.x86_64
subscription-manager-rhsm-certificates-1.20.10-3.el6.x86_64
subscription-manager-gui-1.20.10-3.el6.x86_64

Steps to Reproduce:
1.Install build RHEL-6.10-20180418.0

2.Register system and attach subscription
[root@localhost ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rnew_test
Password: 
The system has been registered with ID: cedad3ca-7b8a-42b2-89e5-90476d9283d3
The registered system name is: localhost.localdomain
[root@localhost ~]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3.Check the rhsm.log
[root@localhost ~]# cat /var/log/rhsm/rhsm.log | grep -i error
2018-04-19 05:27:11,808 [ERROR] firstboot:9404:MainThread @identity.py:145 - 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'
2018-04-19 05:27:11,822 [ERROR] firstboot:9404:MainThread @identity.py:145 - 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'
2018-04-19 05:41:18,354 [ERROR] rhsmd:10048:MainThread @identity.py:145 - 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'
2018-04-19 05:41:18,373 [ERROR] rhsmd:10048:MainThread @identity.py:145 - 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'
2018-04-19 05:42:19,994 [ERROR] yumBackend.py:10056:MainThread @identity.py:145 - 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'
2018-04-19 05:43:38,148 [ERROR] subscription-manager:10067:MainThread @identity.py:145 - 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'


As Step 3. The error message still exists in rhsm log,so move the bug status to NEW.

Comment 11 Chris Snyder 2018-04-19 13:39:18 UTC
The fix has been included in subscription-manager-1.20.10-6, moving back to ON_QA.

Comment 13 Wei Liu 2018-04-20 01:44:55 UTC
I will verify it when new RHEL6.10 build comes.

Comment 14 Chris Snyder 2018-04-20 10:06:11 UTC
@Wei

Thank you!

Comment 15 Shwetha Kallesh 2018-04-24 10:33:59 UTC
Reproducer:

[root@hp-dl380pgen8-02-vm-1 ~]# subscription-manager  unregister
Unregistering from: subscription.rhsm.stage.redhat.com:443/subscription
System has been unregistered.
[root@hp-dl380pgen8-02-vm-1 ~]# subscription-manager  register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: b6e7325a-12a7-476f-8694-65919034ede3
The registered system name is: hp-dl380pgen8-02-vm-1.lab.bos.redhat.com
[root@hp-dl380pgen8-02-vm-1 ~]# subscription-manager  attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed


[root@hp-dl380pgen8-02-vm-1 ~]# tail -f /var/log/rhsm/rhsm.log | grep -i error
2018-04-24 04:26:30,359 [ERROR] subscription-manager:10747:MainThread @identity.py:145 - 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'
2018-04-24 04:26:30,398 [ERROR] rhsmd:10753:MainThread @identity.py:145 - 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'
2018-04-24 04:26:30,400 [ERROR] rhsmd:10753:MainThread @identity.py:145 - 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'
2018-04-24 04:26:39,652 [ERROR] subscription-manager:10760:MainThread @identity.py:145 - 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'
2018-04-24 06:31:17,001 [ERROR] subscription-manager:11047:MainThread @identity.py:145 - 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'
2018-04-24 06:31:17,680 [ERROR] subscription-manager:11047:MainThread @identity.py:145 - 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'
2018-04-24 06:31:17,726 [ERROR] rhsmd:11053:MainThread @identity.py:145 - 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'
2018-04-24 06:31:17,728 [ERROR] rhsmd:11053:MainThread @identity.py:145 - 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'
2018-04-24 06:31:41,996 [ERROR] subscription-manager:11058:MainThread @identity.py:145 - 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'

Comment 16 Shwetha Kallesh 2018-04-24 10:35:09 UTC
Verification:

[root@hp-sl4545g7-01 ~]# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 2.2.3-1
subscription management rules: 5.26
subscription-manager: 1.20.10-6.el6


[root@hp-sl4545g7-01 ~]# subscription-manager  register --serverurl subscription.rhsm.stage.redhat.com:443/subscription
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
The system has been registered with ID: d97ac4d6-2d33-4b32-a005-d547e467eb06
The registered system name is: hp-sl4545g7-01.khw.lab.eng.bos.redhat.com
[root@hp-sl4545g7-01 ~]# subscription-manager  attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed


[root@hp-sl4545g7-01 ~]# tail -f /var/log/rhsm/rhsm.log | grep -i error
2018-04-24 06:29:44,297 [ERROR] rhsmd:26249:MainThread @cache.py:236 - Invalid credentials.

Comment 19 errata-xmlrpc 2018-06-19 05:21:43 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1916

Comment 20 Red Hat Bugzilla 2023-09-15 00:07:04 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 500 days