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 1969524 - 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 CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: subscription-manager-cockpit
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Jiri Hnidek
QA Contact: John Sefler
URL:
Whiteboard:
Depends On: 1956654
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-08 14:22 UTC by Rehana
Modified: 2022-11-22 20:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1956654
Environment:
Last Closed: 2022-11-02 13:40:54 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 2580 0 None Merged 1956654: Fix issue with proxy and cockpit plugin 2022-11-22 20:02:24 UTC

Description Rehana 2021-06-08 14:22:43 UTC
+++ This bug was initially created as a clone of Bug #1956654 +++

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 2 Archana Pandey 2022-11-02 13:33:04 UTC
testing on latest subscription-manager build of RHEL-9.2

[root@kvm-06-guest34 ~]# 
[root@kvm-06-guest34 ~]# 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.29.31-1.el9
[root@kvm-06-guest34 ~]# 
 
>> Edit rhsm.conf file with incorrect proxy details

[root@kvm-06-guest34 ~]# subscription-manager config --list | grep proxy_hostname
   proxy_hostname = randomproxy.redhat.com   
[root@kvm-06-guest34 ~]# 
[root@kvm-06-guest34 ~]# 

>> open cockpit console and uncheck the "Use proxy server" checkbox and register with other correct username password

>> check status

[root@kvm-06-guest34 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled            

[root@kvm-06-guest34 ~]# 

>> verify rhsm.conf again 

[root@kvm-06-guest34 ~]# subscription-manager config --list | grep proxy_hostname
   proxy_hostname = []
[root@kvm-06-guest34 ~]# 

Hence verified that bug is working on RHEL 9.2

VERIFIED- upon removing proxy selection from cockpit plugin candlepin server can be reached without proxy server. Also Wrong proxy configuration is removed from rhsm.conf

Comment 3 Archana Pandey 2022-11-02 14:35:36 UTC
verifying on RHEL 9.1 with subscription-manager: 1.29.30-1.el9

Beaker system information-

HOSTNAME=kvm-06-guest32.hv2.lab.eng.bos.redhat.com
                            JOBID=7197244
                         RECIPEID=12881938
                    RESULT_SERVER=
                           DISTRO=RHEL-9.1.0-20221101.3
                     ARCHITECTURE=x86_64

[root@kvm-06-guest32 ~]# 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.29.30-1.el9
[root@kvm-06-guest32 ~]# 
[root@kvm-06-guest32 ~]# 

>> Edit rhsm.conf file with incorrect proxy details

[root@kvm-06-guest32 ~]# 
[root@kvm-06-guest32 ~]# subscription-manager config --list | grep proxy_hostname
   proxy_hostname = randomproxy.redhat.com
[root@kvm-06-guest32 ~]# 


>> open cockpit console and uncheck the "Use proxy server" checkbox and register with other correct username password

>> check status

[root@kvm-06-guest32 ~]# 
[root@kvm-06-guest32 ~]# subscription-manager status
+-------------------------------------------+
   System Status Details
+-------------------------------------------+
Overall Status: Disabled
Content Access Mode is set to Simple Content Access. This host has access to content, regardless of subscription status.

System Purpose Status: Disabled            

[root@kvm-06-guest32 ~]# 
[root@kvm-06-guest32 ~]# subscription-manager config --list | grep proxy_hostname
   proxy_hostname = []
[root@kvm-06-guest32 ~]# 
[root@kvm-06-guest32 ~]# 

VERIFIED- upon removing proxy selection from cockpit plugin candlepin server can be reached without proxy server. Also Wrong proxy configuration is removed from rhsm.conf


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