Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
To fix bug 906642, the subscription-manager proxy options have been enabled for the repos module.
While executing some negative proxy tests against the repos module, stdout is exposing these errors that other modules appear to catch.
[Errno -2] Name or service not known
Proxy connection failed: 407
[Errno 111] Connection refused
Version-Release number of selected component (if applicable):
[root@jsefler-7 ~]# rpm -q subscription-manager python-rhsm
subscription-manager-1.8.3-1.git.141.da518e0.el7.x86_64
python-rhsm-1.8.6-1.git.1.8a7996b.el7.x86_64
Steps to Reproduce:
register and attach a subscription
Case 1:
[root@jsefler-7 ~]# subscription-manager release --list --proxy=foo
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-7 ~]# subscription-manager repos --list --proxy=foo
[Errno -2] Name or service not known <=============== UNEXPECTED RESULTS
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
Case 2:
[root@jsefler-7 ~]# subscription-manager release --list --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=bad-password
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-7 ~]# subscription-manager repos --list --proxy=auto-services.usersys.redhat.com:3128 --proxyuser=redhat --proxypassword=bad-password
Proxy connection failed: 407 <=============== UNEXPECTED RESULTS
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-7 ~]#
Case 3:
[root@jsefler-7 ~]# subscription-manager release --list --proxy=auto-services.usersys.redhat.com:31290
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-7 ~]# subscription-manager repos --list --proxy=auto-services.usersys.redhat.com:31290
[Errno 111] Connection refused <=============== UNEXPECTED RESULTS
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@jsefler-7 ~]#
Additional info:
Case 1:
2013-03-07 17:49:53,843 [DEBUG] @connection.py:400 - Using proxy: foo:3128
2013-03-07 17:49:53,844 [DEBUG] @connection.py:415 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/0ee64a22-48e6-4c0c-8d6e-40e6f5185a3e/release
2013-03-07 17:49:53,847 [ERROR] @managercli.py:143 - exception caught in subscription-manager
2013-03-07 17:49:53,849 [ERROR] @managercli.py:144 - [Errno -2] Name or service not known
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 87, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 78, in main
return managercli.ManagerCLI().main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 2167, in main
return CLI.main(self)
File "/usr/share/rhsm/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 472, in main
return_code = self._do_command()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 1796, in _do_command
repos = rl.get_repos()
File "/usr/share/rhsm/subscription_manager/repolib.py", line 48, in get_repos
action = UpdateAction(uep=self.uep)
File "/usr/share/rhsm/subscription_manager/repolib.py", line 108, in __init__
result = self.uep.getRelease(self.consumer_uuid)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 868, in getRelease
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 481, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 422, in _request
conn.request(request_type, handler, body=body, headers=headers)
File "/usr/lib64/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 174, in endheaders
httpslib.HTTPSConnection.endheaders(self)
File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib64/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 195, in connect
HTTPConnection.connect(self)
File "/usr/lib64/python2.7/httplib.py", line 757, in connect
self.timeout, self.source_address)
File "/usr/lib64/python2.7/socket.py", line 553, in create_connection
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
Case 2:
2013-03-07 17:51:57,985 [DEBUG] @connection.py:400 - Using proxy: auto-services.usersys.redhat.com:3128
2013-03-07 17:51:57,986 [DEBUG] @connection.py:415 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/0ee64a22-48e6-4c0c-8d6e-40e6f5185a3e/release
2013-03-07 17:51:58,000 [ERROR] @managercli.py:143 - exception caught in subscription-manager
2013-03-07 17:51:58,000 [ERROR] @managercli.py:144 - Proxy connection failed: 407
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 87, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 78, in main
return managercli.ManagerCLI().main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 2167, in main
return CLI.main(self)
File "/usr/share/rhsm/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 472, in main
return_code = self._do_command()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 1796, in _do_command
repos = rl.get_repos()
File "/usr/share/rhsm/subscription_manager/repolib.py", line 48, in get_repos
action = UpdateAction(uep=self.uep)
File "/usr/share/rhsm/subscription_manager/repolib.py", line 108, in __init__
result = self.uep.getRelease(self.consumer_uuid)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 868, in getRelease
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 481, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 422, in _request
conn.request(request_type, handler, body=body, headers=headers)
File "/usr/lib64/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 174, in endheaders
httpslib.HTTPSConnection.endheaders(self)
File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib64/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 206, in connect
raise socket.error, "Proxy connection failed: %d" % code
error: Proxy connection failed: 407
Case 3:
2013-03-07 17:54:09,876 [DEBUG] @connection.py:400 - Using proxy: auto-services.usersys.redhat.com:31290
2013-03-07 17:54:09,876 [DEBUG] @connection.py:415 - Making request: GET https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/consumers/0ee64a22-48e6-4c0c-8d6e-40e6f5185a3e/release
2013-03-07 17:54:09,879 [ERROR] @managercli.py:143 - exception caught in subscription-manager
2013-03-07 17:54:09,879 [ERROR] @managercli.py:144 - [Errno 111] Connection refused
Traceback (most recent call last):
File "/usr/sbin/subscription-manager", line 87, in <module>
sys.exit(abs(main() or 0))
File "/usr/sbin/subscription-manager", line 78, in main
return managercli.ManagerCLI().main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 2167, in main
return CLI.main(self)
File "/usr/share/rhsm/subscription_manager/cli.py", line 160, in main
return cmd.main()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 472, in main
return_code = self._do_command()
File "/usr/share/rhsm/subscription_manager/managercli.py", line 1796, in _do_command
repos = rl.get_repos()
File "/usr/share/rhsm/subscription_manager/repolib.py", line 48, in get_repos
action = UpdateAction(uep=self.uep)
File "/usr/share/rhsm/subscription_manager/repolib.py", line 108, in __init__
result = self.uep.getRelease(self.consumer_uuid)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 868, in getRelease
results = self.conn.request_get(method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 481, in request_get
return self._request("GET", method)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 422, in _request
conn.request(request_type, handler, body=body, headers=headers)
File "/usr/lib64/python2.7/httplib.py", line 958, in request
self._send_request(method, url, body, headers)
File "/usr/lib64/python2.7/httplib.py", line 992, in _send_request
self.endheaders(body)
File "/usr/lib64/python2.7/site-packages/rhsm/connection.py", line 174, in endheaders
httpslib.HTTPSConnection.endheaders(self)
File "/usr/lib64/python2.7/httplib.py", line 954, in endheaders
self._send_output(message_body)
File "/usr/lib64/python2.7/httplib.py", line 814, in _send_output
self.send(msg)
File "/usr/lib64/python2.7/httplib.py", line 776, in send
self.connect()
File "/usr/lib64/python2.7/site-packages/M2Crypto/httpslib.py", line 195, in connect
HTTPConnection.connect(self)
File "/usr/lib64/python2.7/httplib.py", line 757, in connect
self.timeout, self.source_address)
File "/usr/lib64/python2.7/socket.py", line 571, in create_connection
raise err
error: [Errno 111] Connection refused
Verified!!
Version:
[root@localhost ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 0.8.1-1
subscription-manager: 1.8.5-1.el7
python-rhsm: 1.8.8-1.el7
[root@localhost ~]# subscription-manager repos --list --proxy=foo
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@localhost ~]# subscription-manager repos --list --proxy=10.65.193.76:3128 --proxyuser=redhat --proxypassword=bad-password
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
[root@localhost ~]# subscription-manager repos --list --proxy=10.65.193.76:31290
Network error, unable to connect to server.
Please see /var/log/rhsm/rhsm.log for more information.
This request was resolved in Red Hat Enterprise Linux 7.0.
Contact your manager or support representative in case you have further questions about the request.