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 2166623 - subscription-manager: initial-setup - no error message appears after Test Connection with wrong auth proxy settings
Summary: subscription-manager: initial-setup - no error message appears after Test Con...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.8
Assignee: Pino Toscano
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-02 11:42 UTC by Jan Stavel
Modified: 2023-05-16 11:10 UTC (History)
3 users (show)

Fixed In Version: subscription-manager-1.28.36-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 09:07:12 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proxy dialog with filled fields (65.32 KB, image/png)
2023-02-02 11:42 UTC, Jan Stavel
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github candlepin subscription-manager pull 3202 0 None Merged [1.28] 2166623: gui: use UnknownContentException instead of NetworkException 2023-02-06 12:48:21 UTC
Red Hat Issue Tracker RHELPLAN-147439 0 None None None 2023-02-02 11:45:29 UTC
Red Hat Product Errata RHBA-2023:2984 0 None None None 2023-05-16 09:07:36 UTC

Description Jan Stavel 2023-02-02 11:42:32 UTC
Created attachment 1941769 [details]
proxy dialog with filled fields

I want to register a system using initial-setup-graphical app.
I want to use auth proxy.

see details of that case: https://polarion.engineering.redhat.com/polarion/redirect/project/RHELSS/workitem?id=RHEL7-19999

in a terminal at desktop enable root access to the display:

xhost si:localuser:root

in a terminal do:
ssh root@$HOST
export DISPLAY:0
/usr/libexec/initial-setup/initial-setup-graphical

Click on 'Subscription Manager'
Click on 'Configure Proxy' button
Check a checkbox 'I would like to connect via an HTTP Proxy'
Fill a field 'Proxy Location' by an url to auth proxy 
..note: no username or password is filled
Click on a button 'Test Connection'

Wait a little.
The button returns into an unclicked state after a while and no error message does appear.

A long traceback appears on a terminal where initial-setup-graphical is run.
see below.

The graphical app gets frozen and I cannot click on any GUI element. I have to reboot the system.


DBG initial-setup: looking for the license file
DBG initial-setup: opening the license file
Exception in thread TestNetworkConnectionThread:
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 798, in _request
    conn.request(request_type, handler, body=body, headers=final_headers)
  File "/usr/lib64/python3.6/http/client.py", line 1273, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1319, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1268, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/lib64/python3.6/http/client.py", line 1044, in _send_output
    self.send(msg)
  File "/usr/lib64/python3.6/http/client.py", line 982, in send
    self.connect()
  File "/usr/lib64/python3.6/http/client.py", line 1433, in connect
    super().connect()
  File "/usr/lib64/python3.6/http/client.py", line 954, in connect
    (self.host,self.port), self.timeout, self.source_address)
  File "/usr/lib64/python3.6/socket.py", line 724, in create_connection
    raise err
  File "/usr/lib64/python3.6/socket.py", line 713, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/subscription_manager/gui/networkConfig.py", line 268, in test_connection
    cp.getStatus()
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 1774, in getStatus
    return self.conn.request_get(method)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 989, 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 1022, in _request
    info=info, headers=headers, cert_key_pairs=cert_key_pairs)
  File "/usr/lib64/python3.6/site-packages/rhsm/connection.py", line 833, in _request
    raise ProxyException(hostname=self.proxy_hostname, port=self.proxy_port, exc=err)
rhsm.connection.ProxyException: Proxy error at auto-services.usersys.redhat.com:3128: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib64/python3.6/threading.py", line 937, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.6/threading.py", line 885, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/gui/networkConfig.py", line 256, in test_connection_wrapper
    connection_status = self.test_connection(proxy_host, proxy_port, proxy_user, proxy_password, no_proxy)
  File "/usr/lib64/python3.6/site-packages/subscription_manager/gui/networkConfig.py", line 278, in test_connection
    except connection.NetworkException as e:
AttributeError: module 'rhsm.connection' has no attribute 'NetworkException'

Comment 1 Jan Stavel 2023-02-02 11:50:04 UTC
It does not matter what fields in the Proxy Dialog are filled wrong way.
The application fails with traceback anyway - and it gets frozen in every case.

Comment 2 Pino Toscano 2023-02-02 12:55:30 UTC
Ooops, this is a regression of the changes for bug 1971995: the GUI code does not exist in RHEL 9, and thus I missed to check for the NetworkException class there [1].

Easy to fix, a simple rename: https://github.com/candlepin/subscription-manager/pull/3202

[1] https://github.com/candlepin/subscription-manager/commit/d7501ef133b73cbcd35f6e45fcb07fc5dbd9caca

Comment 8 Zdenek Petracek 2023-02-27 15:28:02 UTC
Verification done on subman version:
[root@localhost Downloads]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.2.15-1
subscription management rules: 5.43
subscription-manager: 1.28.36-2.el8

Verification PASSED - error was shown as expected, adding an attachment of error into attachments.

Comment 12 errata-xmlrpc 2023-05-16 09:07: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 (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-2023:2984


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