RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 822965 - subscription-manager release does not work with proxies
Summary: subscription-manager release does not work with proxies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-rhsm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Chris Duryee
QA Contact: Entitlement Bugs
URL:
Whiteboard:
Depends On:
Blocks: 738066 826592 833537
TreeView+ depends on / blocked
 
Reported: 2012-05-18 16:03 UTC by J.C. Molet
Modified: 2021-04-27 18:08 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 833537 (view as bug list)
Environment:
Last Closed: 2012-06-20 12:58:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0805 0 normal SHIPPED_LIVE python-rhsm bug fix and enhancement update 2012-06-19 20:34:30 UTC

Description J.C. Molet 2012-05-18 16:03:33 UTC
Description of problem:
I cannot use subscription-manager release when on a proxy.

Version-Release number of selected component (if applicable):
subscription-manager-0.99.18-1.git.1.52e1aeb.el6.x86_64
subscription-manager-migration-data-1.12.1.8-1.git.0.c91a246.el6.noarch
subscription-manager-gnome-0.99.18-1.git.1.52e1aeb.el6.x86_64
subscription-manager-migration-0.99.18-1.git.1.52e1aeb.el6.x86_64
subscription-manager-firstboot-0.99.18-1.git.1.52e1aeb.el6.x86_64
python-rhsm-0.99.11-1.git.0.2de18a9.el6.noarch


How reproducible:
always

Steps to Reproduce:
1. Set up a rhel 6.3 system using rhsm from the rhel 6.3 branch
2. set your rhsm.conf file thusly:

[root@jmolet-vm0 yum.repos.d]# grep . /etc/rhsm/rhsm.conf | grep -v ^#
[server]
hostname=subscription.rhn.stage.redhat.com
prefix=/subscription
port=443
insecure=0
proxy_hostname=auto-services.usersys.redhat.com
proxy_port=3129
proxy_user=
proxy_password=

(and or use your favorite proxy server and candlepin server with releases)

3. Make sure /etc/pki/product/ is populated with the proper rhel server pem (69.pem)
4. # subscription-manager register --user=stage_test_12 --password=redhat
5. # subscription-manager subscribe --auto
6. # subscription-manager release --list
  
Actual results:
[root@jmolet-vm0 product]# subscription-manager register --user=stage_test_12 --password=redhat
The system has been registered with id: 81d3ac92-e15d-4472-b436-8ede0409b027 
[root@jmolet-vm0 product]# ls -a
.  ..  69.pem
[root@jmolet-vm0 product]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@jmolet-vm0 product]# subscription-manager release --list
unknown URL type: ///content/dist/rhel/server/6//listing

Expected results:
# subscription-manager release --list gives me a list of releases.

Additional info:
- This happens when you use either a proxy that does or does not require auth.
- This only happens when you set the proxy in rhsm.conf, and does not happen when specify the proxy via command-line args

Comment 1 John Sefler 2012-05-18 16:52:45 UTC
[root@qe-blade-06 ~]# tail -f /var/log/rhsm/rhsm.log

2012-05-18 12:50:30,649 [DEBUG]  @connection.py:147 - ContectConnection
2012-05-18 12:50:30,653 [INFO]  @connection.py:484 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2012-05-18 12:50:30,653 [INFO]  @connection.py:495 - Connection Built: host: subscription.rhn.stage.redhat.com, port: 443, handler: /subscription
2012-05-18 12:50:30,789 [DEBUG]  @cert_sorter.py:107 - Sorting product and entitlement cert status for: 2012-05-18 16:50:30.789585+00:00
2012-05-18 12:50:30,791 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['69']
2012-05-18 12:50:30,830 [DEBUG]  @cert_sorter.py:176 - Checking certificate: 2164116074142248493
2012-05-18 12:50:30,835 [DEBUG]  @cert_sorter.py:287 -   system has 2 sockets, 8 covered by entitlement
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:113 - valid entitled products: ['69']
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:116 - unentitled products: []
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-05-18 12:50:30,867 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-05-18 12:50:30,868 [DEBUG]  @cert_sorter.py:107 - Sorting product and entitlement cert status for: 2012-05-18 16:50:30.868624+00:00
2012-05-18 12:50:30,870 [DEBUG]  @cert_sorter.py:160 - Installed product IDs: ['69']
2012-05-18 12:50:30,907 [DEBUG]  @cert_sorter.py:176 - Checking certificate: 2164116074142248493
2012-05-18 12:50:30,908 [DEBUG]  @cert_sorter.py:287 -   system has 2 sockets, 8 covered by entitlement
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:113 - valid entitled products: ['69']
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:114 - expired entitled products: []
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:115 - partially entitled products: []
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:116 - unentitled products: []
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:117 - future products: []
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:118 - partial stacks: []
2012-05-18 12:50:30,940 [DEBUG]  @cert_sorter.py:119 - valid stacks: []
2012-05-18 12:50:31,853 [INFO]  @release.py:138 - No matching products with RHEL product tags found
2012-05-18 12:50:31,853 [INFO]  @release.py:138 - No matching products with RHEL product tags found
2012-05-18 12:50:31,854 [INFO]  @release.py:138 - No matching products with RHEL product tags found
2012-05-18 12:50:31,854 [DEBUG]  @connection.py:195 - Loading CA certificate: '/etc/pki/entitlement/2164116074142248493.pem'
2012-05-18 12:50:31,856 [DEBUG]  @connection.py:171 - Using proxy: auto-services.usersys.redhat.com:3128
2012-05-18 12:50:31,857 [ERROR]  @managercli.py:101 - exception caught in subscription-manager
2012-05-18 12:50:31,857 [ERROR]  @managercli.py:102 - unknown URL type: ///content/dist/rhel/server/6//listing
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 79, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 70, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1772, in main
    return cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 280, in main
    return_code = self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1046, in _do_command
    releases = self.release_backend.get_releases()
  File "/usr/share/rhsm/subscription_manager/release.py", line 98, in get_releases
    data = self.content_connection.get_versions(listing_path)
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 213, in get_versions
    results = self._request("GET", handler, body="")
  File "/usr/lib/python2.6/site-packages/rhsm/connection.py", line 181, in _request
    conn.request("GET", handler, body="", headers={"Content-Length": "0"})
  File "/usr/lib64/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib64/python2.6/httplib.py", line 931, in _send_request
    self.putrequest(method, url, **skips)
  File "/usr/lib64/python2.6/site-packages/M2Crypto/httpslib.py", line 150, in putrequest
    raise ValueError, "unknown URL type: %s" % url
ValueError: unknown URL type: ///content/dist/rhel/server/6//listing

Comment 2 Chris Duryee 2012-05-18 19:02:47 UTC
23dc08e python-rhsm rhel6.3 0.99.12+

Comment 5 John Sefler 2012-05-20 03:50:24 UTC
Still having trouble after testing with changes in comment 2.

I no longer get the unknown URL type: ///content/dist/rhel/server/6//listing.
Now I get an empty list even though my installed RHEL product is Subscribed.

Moving back to ASSIGNED/FailedQA

Comment 6 Chris Duryee 2012-05-21 15:23:57 UTC
(In reply to comment #5)
> Still having trouble after testing with changes in comment 2.
> 
> I no longer get the unknown URL type: ///content/dist/rhel/server/6//listing.
> Now I get an empty list even though my installed RHEL product is Subscribed.
> 
> Moving back to ASSIGNED/FailedQA

63d0e38c RHEL6.3 0.99.12+

(also in master but waiting for a pull)

Comment 8 J.C. Molet 2012-05-22 13:50:47 UTC
subscription-manager-gnome-0.99.18-1.git.1.52e1aeb.el6.x86_64
subscription-manager-firstboot-0.99.18-1.git.1.52e1aeb.el6.x86_64
python-rhsm-0.99.11-1.git.2.63d0e38.el6.noarch
subscription-manager-migration-data-1.12.1.8-1.git.0.c91a246.el6.noarch
subscription-manager-migration-0.99.18-1.git.1.52e1aeb.el6.x86_64
subscription-manager-0.99.18-1.git.1.52e1aeb.el6.x86_64

[root@jmolet-vm0 product]# subscription-manager unregister
This system is currently not registered.
[root@jmolet-vm0 product]# subscription-manager register --username=stage_test_12 --password=redhat
The system has been registered with id: 9eb53ba1-40ad-4287-8cae-001de1d0ab05 
[root@jmolet-vm0 product]# subscription-manager subscribe --auto
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               
[root@jmolet-vm0 ~]# subscription-manager release --list
6.1
6.2
6Server

No messages in /var/log/rhsm/rhsm.log

This seems to work on the latest python-rhsm in the rhel-6.3 branch.  Waiting for this to make the rhel 6.3 compose before I mark it verified.

Comment 11 John Sefler 2012-05-23 15:09:08 UTC
Verifying Version...
[root@kvm-guest-02 ~]# rpm -q python-rhsm subscription-manager
python-rhsm-0.99.12-1.el6.noarch
subscription-manager-0.99.19-1.el6.x86_64


[root@kvm-guest-02 ~]# subscription-manager config --server.hostname subscription.rhn.stage.redhat.com
[root@kvm-guest-02 ~]# subscription-manager config --server.proxy_hostname auto-services.usersys.redhat.com --server.proxy_port 3129
[root@kvm-guest-02 ~]# 
[root@kvm-guest-02 ~]# subscription-manager register --username stage_test_12 --password redhat --autosubscribe
The system has been registered with id: e3e3064f-852e-4c60-a1d6-a3a01aa40206 
Installed Product Current Status:
Product Name:         	Red Hat Enterprise Linux Server
Status:               	Subscribed               

[root@kvm-guest-02 ~]# subscription-manager release --list
6.1
6.2
6Server
[root@kvm-guest-02 ~]# 

^^^ VERIFIED: We now get the expected release list even when configured to communicate through a proxy server.

Comment 12 John Sefler 2012-05-23 15:39:34 UTC
Additional Verification info:
This shows the traffic through the proxy server during the call to subscription-manager release --list ...

[root@auto-services ~]# tail -f /var/log/tinyproxy.log 

CONNECT   May 23 16:34:54 [6128]: Connect (file descriptor 7): kvm-guest-02.rhts.eng.bos.redhat.com [10.16.69.149]
CONNECT   May 23 16:34:54 [6128]: Request (file descriptor 7): CONNECT cdn.rcm-qa.redhat.com:443 HTTP/1.1
INFO      May 23 16:34:54 [6128]: No proxy for cdn.rcm-qa.redhat.com
CONNECT   May 23 16:34:54 [6128]: Established connection to host "cdn.rcm-qa.redhat.com" using file descriptor 25.
INFO      May 23 16:34:54 [6128]: Not sending client headers to remote machine
INFO      May 23 16:34:55 [6128]: Closed connection between local client (fd:7) and remote client (fd:25)

Comment 14 errata-xmlrpc 2012-06-20 12:58:12 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.

http://rhn.redhat.com/errata/RHBA-2012-0805.html


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