Bug 706365

Summary: Got “Int Argument required error” while register using proxy.
Product: Red Hat Enterprise Linux 5 Reporter: spandey
Component: subscription-managerAssignee: Chris Duryee <cduryee>
Status: CLOSED NOTABUG QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.7CC: jmolet, jsefler, kbanerje, spandey
Target Milestone: rcKeywords: QA-Closed
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-20 12:02:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 675214    

Description spandey 2011-05-20 09:37:32 UTC
Description of problem:


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


How reproducible:
3/3

Prerequisites:
Candlepin = on-premises
Client : Rhel5.7 client with following subscription-manager rpm 
subscription-manager-0.95.5.18-1.git.4.364aa10.el5

subscription-manager-gnome-0.95.5.18-1.git.4.364aa10.el5

subscription-manager-firstboot-0.95.5.18-1.git.4.364aa10.el5
 


Steps to repro : 
execute following command on console 

[root@localhost rhsm]# subscription-manager register --u admin --password admin --proxy 10.65.193.99


Expected Result :
Client should successfully register to candlepin 

Actual Result : 
Registration command failed with “int argument required” error.

[root@localhost rhsm]# subscription-manager register --u admin --password admin --proxy 10.65.193.99

int argument required


rhsm.log  output :

2011-05-20 15:00:41,500 [INFO]  @connection.py:295 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False

2011-05-20 15:00:41,500 [INFO]  @connection.py:300 - Connection Established: host: 10.65.193.74, port: 8443, handler: /candlepin

2011-05-20 15:00:41,542 [INFO]  @connection.py:287 - Using basic authentication as: admin

2011-05-20 15:00:41,542 [INFO]  @connection.py:300 - Connection Established: host: 10.65.193.74, port: 8443, handler: /candlepin

2011-05-20 15:00:41,645 [DEBUG]  @certlib.py:635 - Sorting product and entitlement cert status for: 2011-05-20 15:00:41.645517

2011-05-20 15:00:41,650 [DEBUG]  @certlib.py:654 - Installed product IDs: ['100000000000000', '1144']

2011-05-20 15:00:41,651 [DEBUG]  @certlib.py:645 - valid entitled products: []

2011-05-20 15:00:41,651 [DEBUG]  @certlib.py:646 - expired entitled products: []

2011-05-20 15:00:41,652 [INFO]  @connection.py:147 - loading ca pem certificates from: /etc/rhsm/ca/

2011-05-20 15:00:41,652 [INFO]  @connection.py:134 - loading ca certificate '/etc/rhsm/ca/candlepin-ca.pem'

2011-05-20 15:00:41,653 [INFO]  @connection.py:134 - loading ca certificate '/etc/rhsm/ca/redhat-uep.pem'

2011-05-20 15:00:41,653 [INFO]  @connection.py:134 - loading ca certificate '/etc/rhsm/ca/fakamai-cp1.pem'

2011-05-20 15:00:41,653 [INFO]  @connection.py:134 - loading ca certificate '/etc/rhsm/ca/candlepin-stage.pem'

2011-05-20 15:00:41,654 [INFO]  @connection.py:149 - work in insecure mode ?:False

2011-05-20 15:00:41,654 [INFO]  @connection.py:156 - using proxy 10.65.193.99:3128

2011-05-20 15:00:41,654 [INFO]  @connection.py:163 - handler: https://10.65.193.74:8443/candlepin/consumers/

2011-05-20 15:00:41,657 [ERROR]  @managercli.py:48 - Error during registration: int argument required

2011-05-20 15:00:41,657 [ERROR]  @managercli.py:49 - int argument required

Traceback (most recent call last):

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

    facts=self.facts.get_facts())

  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 323, in registerConsumer

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

  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 203, in request_post

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

  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 169, in _request

    headers=self.headers)

  File "/usr/lib64/python2.4/httplib.py", line 810, in request

    self._send_request(method, url, body, headers)

  File "/usr/lib64/python2.4/httplib.py", line 833, in _send_request

    self.endheaders()

  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 89, in endheaders

    httpslib.HTTPSConnection.endheaders(self)

  File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders

    self._send_output()

  File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output

    self.send(msg)

  File "/usr/lib64/python2.4/httplib.py", line 652, in send

    self.connect()

  File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 155, in connect

    self.sock.sendall(self._get_connect_msg())

  File "/usr/lib64/python2.4/site-packages/M2Crypto/httpslib.py", line 169, in _get_connect_msg

    msg = "CONNECT %s:%d HTTP/1.1\r\n" % (self._real_host, self._real_port)

TypeError: int argument required

Comment 1 John Sefler 2011-05-20 11:35:24 UTC
I cannot reproduce this bug with the candidate tree:
http://porkchop.redhat.com/rel-eng/RHEL-5.7-Server-Beta-1.2/

I suspect this bug is already fixed by upgrading m2crypto to this or newer:
[root@jsefler-RHEL57ServerBeta12 ~]# rpm -q m2crypto
m2crypto-0.16-8.el5

Comment 2 spandey 2011-05-20 12:02:55 UTC
yes John you are correct 

using latest build i am not able to reproduce  this issue 

so resolving this defect as not a defect.