Bug 700591 - subscription-manager cannot connect via proxy
Summary: subscription-manager cannot connect via proxy
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Chris Duryee
QA Contact: J.C. Molet
URL:
Whiteboard:
Depends On:
Blocks: 675214
TreeView+ depends on / blocked
 
Reported: 2011-04-28 18:14 UTC by J.C. Molet
Modified: 2011-04-28 19:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-04-28 19:28:54 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description J.C. Molet 2011-04-28 18:14:40 UTC
Description of problem:
When connecting to candlepin via a proxy, subscription manager gets a network error.

Version-Release number of selected component (if applicable):
subscription-manager-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-firstboot-0.95.5.8-1.git.6.42d8706.el5
subscription-manager-gnome-0.95.5.8-1.git.6.42d8706.el5


How reproducible:
100%

Steps to Reproduce:
1. Obtain rhel 5.7 system with subscription-manager installed.
2. Try to register via a proxy:
  - subscription-manager register --username=testuser1 --password=password --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat
  - or configure this in rhsm.conf

  
Actual results:

[root@jmolet-57server ~]# subscription-manager register --username=testuser1 --password=password --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=redhat
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.
[root@jmolet-57server ~]# tail -40 /var/log/rhsm/rhsm.log
2011-04-28 14:08:17,172 [INFO]  @connection.py:159 - loading ca pem certificates from: /etc/rhsm/ca/
2011-04-28 14:08:17,172 [INFO]  @connection.py:146 - loading ca certificate '/etc/rhsm/ca/redhat-uep.pem'
2011-04-28 14:08:17,173 [INFO]  @connection.py:146 - loading ca certificate '/etc/rhsm/ca/candlepin-stage.pem'
2011-04-28 14:08:17,173 [INFO]  @connection.py:146 - loading ca certificate '/etc/rhsm/ca/fakamai-cp1.pem'
2011-04-28 14:08:17,173 [INFO]  @connection.py:161 - work in insecure mode ?:True
2011-04-28 14:08:17,173 [INFO]  @connection.py:168 - using proxy auto-services.usersys.redhat.com:3128
2011-04-28 14:08:17,174 [INFO]  @connection.py:175 - handler: https://mgmt5.rhq.lab.eng.bos.redhat.com:8443/candlepin/consumers/
2011-04-28 14:08:17,272 [ERROR]  @managercli.py:48 - Error during registration: Proxy connection failed: 404
2011-04-28 14:08:17,273 [ERROR]  @managercli.py:49 - Proxy connection failed: 404
Traceback (most recent call last):
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 425, in _do_command
    facts=self.facts.get_facts())
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 334, in registerConsumer
    return self.conn.request_post('/consumers/', params)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 215, in request_post
    return self._request("POST", method, params)
  File "/usr/lib/python2.4/site-packages/rhsm/connection.py", line 181, 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 163, in connect
    raise socket.error, "Proxy connection failed: %d" % code
error: Proxy connection failed: 404

Expected results:
This would work as well as it does in rhel 6.1

Additional info:
Note, again this also happens if you do a simple register and have the proxy configured in rhsm.conf

Comment 1 J.C. Molet 2011-04-28 19:28:54 UTC
This seems to be a candlepin misconfiguration. Proxy works on a canldepin using 0.2 branch.


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