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 1956654 - subscription-manager-cockpit: unable to register, when invalid proxy configuration is disabled in plugin
Summary: subscription-manager-cockpit: unable to register, when invalid proxy configur...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: subscription-manager
Version: 8.3
Hardware: All
OS: All
unspecified
unspecified
Target Milestone: beta
: 8.8
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1969524
TreeView+ depends on / blocked
 
Reported: 2021-05-04 07:40 UTC by Jiri Hnidek
Modified: 2023-05-16 11:09 UTC (History)
4 users (show)

Fixed In Version: subscription-manager-1.28.34-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1969524 (view as bug list)
Environment:
Last Closed: 2023-05-16 09:07:12 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 3169 0 None Merged ENT-5510: [1.28] Fix issues with proxy and cockpit interaction 2022-11-22 20:01:14 UTC
Red Hat Product Errata RHBA-2023:2984 0 None None None 2023-05-16 09:07:36 UTC

Description Jiri Hnidek 2021-05-04 07:40:51 UTC
Description of problem:
When rhsm.conf contains wrong proxy configuration and you try to register using cockpit plugin (using proxy is completely disabled via checkbox in cockpit plugin), then registration is not possible, because rhsm.service still tries to use wrong proxy configuration from rhsm.conf

Version-Release number of selected component (if applicable):

[root@kvm-07-guest37 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 2.7.5-1
subscription management rules: 5.37
subscription-manager: 1.25.14-1.el8


How reproducible:
100%


Steps to Reproduce:

Assumption: Configuration file rhsm.conf contains some wrong proxy configuration in. Something like this:

# an http proxy server to use
proxy_hostname = some.proxy.server.com

# The scheme to use for the proxy when updating repo definitions, if needed
# e.g. http or https
proxy_scheme = http

# port for http proxy server (wrong port number)
proxy_port = 3333

# user name for authenticating to an http proxy, if needed
proxy_user = user

# password for basic http proxy auth, if needed
proxy_password = pass


1. Try to register system using cockpit plugin. Click on "Register" button
2. The registration dialog should be prefilled with proxy settings from rhsm.conf
3. User decide to not use proxy at all and uncheck checkbox "Use proxy server"
4. Provide valid candlepin credentials (username, password, organization)
5. Click on "Register" button

Actual result:
Error message: "[Error 111] Connection refused" is displayed in registration dialog.

Expected result:
System is registered, because proxy server is not necessary to use and candlepin server can be reached without proxy server. Wrong proxy configuration is removed from rhsm.conf

Comment 3 Zdenek Petracek 2022-12-02 12:31:31 UTC
-> Reproducing the bug on version:
[root@kvm-01-guest02 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.28.33-1.el8

-> Making changes to rhsm.conf:
[root@kvm-01-guest02 ~]# subscription-manager config --list | grep proxy
   proxy_hostname = some.proxy.server.com
   proxy_password = pass
   proxy_port = 3333
   proxy_scheme = [http]
   proxy_user = user

-> On the cockpit console I am registering, unchecking the "use proxy server" button and registering:
Error message "Danger alert:Unable to connect to: some.proxy.server.com:3333 [Errno -2] Name or service not known" appears --> bug reproduced


-> Pre-verifying on version:
[root@kvm-01-guest02 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.28.33+4.gca9258769-1.git.0.244bf50

rhsm.conf:
[root@kvm-01-guest02 ~]# subscription-manager config --list | grep proxy
   proxy_hostname = some.proxy.server.com
   proxy_password = pass
   proxy_port = 3333
   proxy_scheme = [http]
   proxy_user = user

-> On the cockpit page registering without proxy:
[root@kvm-01-guest02 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

^^ System registered as expected --> bug PREVERIFIED

Comment 6 Zdenek Petracek 2022-12-06 13:12:24 UTC
-> Final verification done on SM version:
[root@kvm-02-guest12 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 4.2.10-1
subscription management rules: 5.43
subscription-manager: 1.28.34-1.el8

-> Changes made to rhsm.conf:
[root@kvm-02-guest12 ~]# subscription-manager config --list | grep proxy
   no_proxy = []
   proxy_hostname = some.proxy.com
   proxy_password = pass
   proxy_port = 3333
   proxy_scheme = [http]
   proxy_user = user


-> On the cockpit console, I am registering with "Use proxy server" button unchecked and valid credentials
-> Running on Cockpit console terminal:
[root@kvm-02-guest12 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Current

System Purpose Status: Not Specified

^^ System was able to register --> final verification PASSED

Comment 9 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.