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 1560727 - Uncaught proxy authentication failure (407) on RHEL7
Summary: Uncaught proxy authentication failure (407) on RHEL7
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-03-26 20:54 UTC by Chris Snyder
Modified: 2018-10-30 10:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-30 10:36:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 1824 0 None closed 1560727: Search for proxy auth message in whole error string 2020-04-27 15:46:22 UTC
Red Hat Product Errata RHBA-2018:3153 0 None None None 2018-10-30 10:37:12 UTC

Description Chris Snyder 2018-03-26 20:54:56 UTC
Description of problem:

Using the standard python httplib on RHEL 7 (as opposed to using m2crypto on RHEL 6), results in failure to appropriately detect proxy authentication failure.

Presently we are detecting proxy authentication failure by looking at the error message contained within a socket.error exception (not ideal). httplib.PROXY_AUTHENTICATION_REQUIRED is the string "407".

"""
        except socket.error as err:
            if str(err)[-3:] == str(httplib.PROXY_AUTHENTICATION_REQUIRED):
                raise ProxyException(err)
            raise
"""

The problem with this is that on RHEL 6 the socket.error message for proxy authentication failure is:

"""
Proxy connection failed: 407
"""

And On RHEL 7 the exception message is:

"""
Tunnel connection failed: 407 Proxy Authentication Required
"""

Regardless of the exact messaging that we choose to display to the end user, we should ensure that proxy authentication failures are handled the same way.


Version-Release number of selected component (if applicable):
subscription-manager-1.20.10-3.el6 (or subscription-manager-1.20.10-1.el7)

How reproducible:
100%

Steps to Reproduce:
1. Modify /etc/rhsm/rhsm.conf to use a proxy

"""
... snip ...
proxy_hostname= auto-services.usersys.redhat.com
proxy_port= 3128
proxy_user=
proxy_password=
... snip ...
"""

2. Run almost any subman cli command (for example):
   On RHEL 6:
   """
   [root@jsefler-rhel6 ~]# subscription-manager orgs --user testuser1 --password redhat                   
   Proxy error, unable to connect to proxy server.
   """
   
   On RHEL7:
   """
   [root@jsefler-rhel7 ~]# subscription-manager orgs --user testuser1 --password redhat
   Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.
   """


Actual results:
See "On RHEL7" above

Expected results:
Should match RHEL 6

Comment 4 Shwetha Kallesh 2018-07-06 09:30:35 UTC
reproducer:

[root@ibm-x3650m4-02-vm-04 ~]# subscription-manager register 
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information.

[root@ibm-x3650m4-02-vm-04 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.20.10-1.el7

Comment 5 Shwetha Kallesh 2018-07-06 09:36:09 UTC
Verification:

[root@localhost ~]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: shwetha_tier1_test
Password: 
Proxy error, unable to connect to proxy server.



[root@localhost ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.21.5-5.el7

Comment 8 errata-xmlrpc 2018-10-30 10:36:03 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.

https://access.redhat.com/errata/RHBA-2018:3153


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