Bug 575094 - Failed To register client to candlepin server.
Summary: Failed To register client to candlepin server.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Candlepin
Classification: Community
Component: candlepin
Version: 0.5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
: ---
Assignee: Pradeep Kilambi
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-19 13:05 UTC by spandey
Modified: 2015-05-14 15:31 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-19 15:34:29 UTC
Embargoed:


Attachments (Terms of Use)

Description spandey 2010-03-19 13:05:02 UTC
Description of problem:


Version-Release number of selected component (if applicable):

subscription-manager-0.17-1.i686.rpm

How reproducible:
100%

Prerequisites:
1) Properly Configured Candlepin Host.
2) Client Host with latest subscription manager rpm.
3) On client Host Edit /etc/rhsm/rhsm.conf for update candlepin url.

Steps to Verify : 
1) Login to client console with valid credentials.
2) Execute following command on console 

subscription-manager-cli register --username=<VALID USER> --password=<VALID PASSWORD>


Expected Result : 
1) Client should successfully register to candlepin.
2) No error MSG should display.

Actual Result :  Registration Process getting failed with following error 

Traceback (most recent call last):

  File "/usr/sbin/subscription-manager-cli", line 69, in <module>

    sys.exit(abs(main() or 0))

  File "/usr/sbin/subscription-manager-cli", line 60, in main

    return managercli.CLI().main()

  File "/usr/share/rhsm/managercli.py", line 337, in main

    cmd.main()

  File "/usr/share/rhsm/managercli.py", line 67, in main

    self._do_command()

  File "/usr/share/rhsm/managercli.py", line 125, in _do_command

    consumer = self.cp.registerConsumer(self.options.username, self.options.password, self._get_register_info())

  File "/usr/share/rhsm/connection.py", line 107, in registerConsumer

    return self.conn.request_post('/consumers/', info)

  File "/usr/share/rhsm/connection.py", line 60, in request_post

    return self._request("POST", method, params)

  File "/usr/share/rhsm/connection.py", line 46, in _request

    self.validateResponse(response)

  File "/usr/share/rhsm/connection.py", line 54, in validateResponse

    raise RestlibException(response.reason)

rhsm.connection.RestlibException: Bad Request



/var/log/messages displays following error 

Mar 19 14:03:07 localhost python: abrt: Pyhook: Detected unhandled exception in /usr/sbin/subscription-manager-cli 

Mar 19 14:03:07 localhost abrtd: Directory 'pyhook-1269021787-23870' creation detected

Mar 19 14:03:07 localhost abrtd: Lock file '/var/cache/abrt/pyhook-1269021787-23870.lock' is locked by process 23873

Mar 19 14:03:07 localhost abrtd: Crash is in database already

Mar 19 14:03:07 localhost abrtd: Already saved crash, deleting...

Comment 1 wes hayutin 2010-03-19 14:05:40 UTC
recreated w/ latest subscription-manager and candlepin
sm = commit 0c5ef57b1700db661359adcf7e3e24e618a677a1
candle = commit 76385dd58a99b2b85c5d39997b1c4cf16c2b9277

Comment 2 wes hayutin 2010-03-19 14:14:11 UTC
[root@thinkdoe src]# python managercli.py register --username admin --password redhat
Traceback (most recent call last):
  File "managercli.py", line 351, in <module>
    CLI().main()
  File "managercli.py", line 338, in main
    cmd.main()
  File "managercli.py", line 67, in main
    self._do_command()
  File "managercli.py", line 127, in _do_command
    self._write_consumer_cert(consumer)
  File "managercli.py", line 115, in _write_consumer_cert
    consumerinfo['idCert']['pem'])
  File "/root/ENTITLEMENT/subscription-manager/src/certlib.py", line 379, in __init__
    self.x509 = Certificate(certstring)
  File "/root/ENTITLEMENT/subscription-manager/src/certificate.py", line 60, in __init__
    x509 = X509.load_cert_string(content)
  File "/usr/lib/python2.6/site-packages/M2Crypto/X509.py", line 655, in load_cert_string
    return load_cert_bio(bio, format)
  File "/usr/lib/python2.6/site-packages/M2Crypto/X509.py", line 639, in load_cert_bio
    raise X509Error(Err.get_error())
M2Crypto.X509.X509Error: 3077785280:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:698:Expecting: CERTIFICATE


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