Bug 845827 - Error while checking server version: No such file or directory
Error while checking server version: No such file or directory
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager (Show other bugs)
5.9
Unspecified Unspecified
unspecified Severity urgent
: rc
: 5.9
Assigned To: Adrian Likins
Entitlement Bugs
: Regression
Depends On:
Blocks: 771748
  Show dependency treegraph
 
Reported: 2012-08-05 08:24 EDT by John Sefler
Modified: 2013-01-07 22:58 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-07 22:58:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2012-08-05 08:24:30 EDT
Description of problem:
Several subscription-manager CLI command are getting this error.  It occurs even when calling a command that shouldn't be trying to connect with the server.


Version-Release number of selected component (if applicable):
[root@jsefler-rhel59 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.0.12-1.git.23.c33fe55.el5
python-rhsm-1.0.4-1.git.9.d15c8d2.el5


How reproducible:


Steps to Reproduce:
[root@jsefler-rhel59 ~]# subscription-manager config --server.insecure=1
Error while checking server version: No such file or directory

  
Actual results:


Expected results:


Additional info:
2012-08-05 08:12:45,269 [INFO]  @connection.py:498 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-08-05 08:12:45,269 [INFO]  @connection.py:511 - Connection Built: host: jsefler-f14-candlepin.usersys.redhat.com, port: 8443, handler: /candlpin
2012-08-05 08:12:45,270 [DEBUG]  @profile.py:95 - Loading current RPM profile.
2012-08-05 08:12:45,530 [DEBUG]  @connection.py:323 - Loading CA PEM certificates from: /etc/rhsm/ca/
2012-08-05 08:12:45,530 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/redhat-uep.pem'
2012-08-05 08:12:45,531 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/jsefler-f14-candlepin.pem'
2012-08-05 08:12:45,531 [DEBUG]  @connection.py:305 - Loading CA certificate: '/etc/rhsm/ca/candlepin-stage.pem'
2012-08-05 08:12:45,532 [ERROR]  @utils.py:309 - No such file or directory
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/utils.py", line 301, in get_version_dict
    if cp.supports_resource("status"):
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 538, in supports_resource
    self._load_supported_resources()
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 525, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 400, in request_get
    return self._request("GET", method)
  File "/usr/lib64/python2.4/site-packages/rhsm/connection.py", line 326, in _request
    context.load_cert(self.cert_file, keyfile=self.key_file)
  File "/usr/lib64/python2.4/site-packages/M2Crypto/SSL/Context.py", line 74, in load_cert
    m2.ssl_ctx_use_cert(self.ctx, certfile)
SSLError: No such file or directory
2012-08-05 08:12:45,620 [DEBUG]  @managercli.py:397 - Versions: {'subscription manager': '1.0.12-1.git.23.c33fe55.el5', 'server-type': 'Unknown', 'python-rhsm': '1.0.4-1.git.9.d15c8d2.el5', 'candlepin': 'Unknown'}
Comment 1 RHEL Product and Program Management 2012-08-05 08:28:04 EDT
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.
Comment 3 Alex Wood 2012-08-09 10:52:28 EDT
commit 0cd4a5682bc4b573811c582039308ff0607149af
Refs: subscription-manager-1.0.12-1-11-g0cd4a56
Author:     Adrian Likins <alikins@redhat.com>
AuthorDate: Mon Aug 6 11:34:13 2012 -0400
Commit:     Adrian Likins <alikins@redhat.com>
CommitDate: Mon Aug 6 11:34:13 2012 -0400

    845827: Split server version checkout out to avoid errors

    The changes to populate server and client versions in the logs
    were causing errors in cases where network errors were being
    poorly handled. Part of the reason for this was that a call
    to the server /status was happening very early, and there
    was not error handling setup for that.

    Another cause is that /status for a deleted consumer, or
    invalid consumer will fail.

    This splits the client version info (python-rhsm and
    susbcription-manager rpm versions) and the server version
    info into two seperate calls. This way we can log the client
    version even in cases of no server info, and handle server
    errors better, or skip in it cases where it doesn't make
    sense.

    Also, use mocking more liberally in some of the test
    cases as above changing exposed some odd behaviour with
    the version related stubs.
Comment 5 Shwetha Kallesh 2012-08-10 02:45:29 EDT
Marking verified!!

RPM version:
[root@dhcp201-115 pki]# rpm -qa | grep subscription-manager
subscription-manager-1.0.13-1.git.14.28f8917.el5
subscription-manager-firstboot-1.0.13-1.git.14.28f8917.el5
subscription-manager-migration-data-1.11.2.3-1.git.0.861f9ba.el5
subscription-manager-migration-1.0.13-1.git.14.28f8917.el5
subscription-manager-gui-1.0.13-1.git.14.28f8917.el5


[root@dhcp201-115 pki]# subscription-manager register --org=admin
Username: admin
Password: 
The system has been registered with id: c88d81ec-89f0-4740-9839-a3d7c708a6cc 
[root@dhcp201-115 pki]# subscription-manager config --server.insecure=1
Comment 7 errata-xmlrpc 2013-01-07 22:58:19 EST
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.

http://rhn.redhat.com/errata/RHBA-2013-0033.html

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