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 1861255 - Traceback when there is a typo proxy username/password in /etc/rhsm/rhsm.conf file
Summary: Traceback when there is a typo proxy username/password in /etc/rhsm/rhsm.conf...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: 8.3
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
: 1859145 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-07-28 07:34 UTC by Shwetha Kallesh
Modified: 2022-11-25 16:49 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-04 01:39:41 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 2305 0 None Merged 1861255: Catch all exception and print traceback to rhsm.log 2022-11-25 16:47:38 UTC
Red Hat Issue Tracker ENT-2700 0 None None None 2022-11-25 16:49:37 UTC
Red Hat Product Errata RHBA-2020:4460 0 None None None 2020-11-04 01:40:01 UTC

Description Shwetha Kallesh 2020-07-28 07:34:56 UTC
Description of problem:
Traceback when there is a typo proxy username/password in /etc/rhsm/rhsm.conf file

Version-Release number of selected component (if applicable):
[root@kvm-02-guest05 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.27.10-1.git.3.25bc797.el8


How reproducible:
only with few commands

Steps to Reproduce:
[root@kvm-02-guest05 ~]# cat /etc/rhsm/rhsm.conf | grep proxy
# an http proxy server to use
proxy_hostname = auto-services.usersys.redhat.com
# The scheme to use for the proxy when updating repo definitions, if needed
proxy_scheme = http
# port for http proxy server
proxy_port = 3127
# user name for authenticating to an http proxy, if needed
proxy_user = redaht                    -------> please note the typo
# password for basic http proxy auth, if needed
proxy_password = redhat
# host/domain suffix blacklist for proxy, if needed
no_proxy =

[root@kvm-02-guest05 ~]# subscription-manager list --avail
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 707, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 1414, in connect
    super().connect()
  File "/usr/lib64/python3.6/http/client.py", line 950, in connect
    self._tunnel()
  File "/usr/lib64/python3.6/http/client.py", line 929, in _tunnel
    message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 176, in update_check
    self._sync_with_server(uep, consumer_uuid)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/facts.py", line 88, in _sync_with_server
    uep.updateConsumer(consumer_uuid, facts=self.get_facts())
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 1160, in updateConsumer
    ret = self.conn.request_put(method, params)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 892, in request_put
    return self._request("PUT", method, params, headers=headers)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 909, in _request
    info=info, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 743, in _request
    raise ProxyException(err)
rhsm.connection.ProxyException: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.10', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3251, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 546, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2894, in _do_command
    after_date=after_date,
  File "/usr/lib64/python3.6/site-packages/rhsmlib/services/entitlement.py", line 374, in get_available_pools
    items_per_page=_items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 344, in get_available_entitlements
    items_per_page=items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 563, in get_filtered_pools_list
    items_per_page=items_per_page
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managerlib.py", line 279, in list_pools
    require(FACTS).update_check(uep, consumer_uuid)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 186, in update_check
    raise Exception(_("Error updating system data on the server, see /var/log/rhsm/rhsm.log "
Exception: Error updating system data on the server, see /var/log/rhsm/rhsm.log for more details.
[root@kvm-02-guest05 ~]# subscription-manager role --list
Proxy connection failed, please check your settings.
[root@kvm-02-guest05 ~]# subscription-manager repos --list
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 707, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python3.6/http/client.py", line 1254, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1300, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1249, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1036, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 974, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 1414, in connect
    super().connect()
  File "/usr/lib64/python3.6/http/client.py", line 950, in connect
    self._tunnel()
  File "/usr/lib64/python3.6/http/client.py", line 929, in _tunnel
    message.strip()))
OSError: Tunnel connection failed: 407 Proxy Authentication Required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.27.10', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3251, in main
    ret = CLI.main(self)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main
    return cmd.main()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 546, in main
    return_code = self._do_command()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 2537, in _do_command
    supported_resources = get_supported_resources()
  File "/usr/lib64/python3.6/site-packages/subscription_manager/utils.py", line 250, in get_supported_resources
    return uep.get_supported_resources()
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 959, in get_supported_resources
    self._load_supported_resources()
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 947, in _load_supported_resources
    resources_list = self.conn.request_get("/")
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 883, in request_get
    return self._request("GET", method, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 909, in _request
    info=info, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 743, in _request
    raise ProxyException(err)
rhsm.connection.ProxyException: Tunnel connection failed: 407 Proxy Authentication Required


Actual results:


Expected results:


Additional info:

Comment 4 Shwetha Kallesh 2020-08-07 10:57:57 UTC
Verification:

[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: Unknown
subscription management rules: Unknown
subscription-manager: 1.27.13-1.el8


[root@hpe-dl380pgen8-02-vm-3 ~]# cat /etc/rhsm/rhsm.conf | grep proxy
# an http proxy server to use
proxy_hostname = auto-services.usersys.redhat.com
# The scheme to use for the proxy when updating repo definitions, if needed
proxy_scheme = http
# port for http proxy server
proxy_port = 3127
# user name for authenticating to an http proxy, if needed
proxy_user = redhat
# password for basic http proxy auth, if needed
proxy_password = redhst
# host/domain suffix blacklist for proxy, if needed
no_proxy =


[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager list --avail
Proxy error, unable to connect to proxy server.
[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager role --list
Proxy connection failed, please check your settings.
[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager list --avail --ondate 2020-09-09
Proxy error, unable to connect to proxy server.
[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager repos --list
Proxy error, unable to connect to proxy server.
[root@hpe-dl380pgen8-02-vm-3 ~]# subscription-manager refresh
Proxy error, unable to connect to proxy server.

Comment 7 errata-xmlrpc 2020-11-04 01:39:41 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 (subscription-manager bug fix and enhancement update), 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-2020:4460

Comment 8 Pino Toscano 2022-11-25 16:48:43 UTC
*** Bug 1859145 has been marked as a duplicate of this bug. ***


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