Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1973285

Summary: insights-client --test-connection fails when using general "HTTP(S) proxy" setting of satellite.
Product: Red Hat Satellite Reporter: Jameer Pathan <jpathan>
Component: RH Cloud - InventoryAssignee: Shimon Shtein <sshtein>
Status: CLOSED ERRATA QA Contact: Jameer Pathan <jpathan>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: aruzicka, bbuckingham, osousa, pcreech, rexwhite, smallamp, sshtein
Target Milestone: 6.10.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.0.26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1984550 (view as bug list) Environment:
Last Closed: 2021-11-16 14:11:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jameer Pathan 2021-06-17 14:41:18 UTC
Description of problem:
insights-client --test-connection fails when using general "HTTP(S) proxy" setting of satellite.

Version-Release number of selected component (if applicable):
- Satellite 6.9.3 snap 3
- tfm-rubygem-foreman_rh_cloud-3.0.22-1.el7sat.noarch

How reproducible:
Always

Steps to Reproduce:
- Go to Settings > General and add http proxy in "HTTP(S) proxy" setting.
- Edit /etc/resolv.conf and comment out all entries so that satellite can not directly communicate outside.
- Register a host with satellite
- Registering host with insights
- Run "insights-client --test-connection"

Actual results:
[root@kvm-04-guest21 ~]# insights-client --test-connection --net-debug
GET https://dhcp-3-27.example.com:443/redhat_access/r/insights/v1/branch_info
GET branch_info status: 200
Running Connection Tests...
=== Begin Upload URL Connection Test ===
Testing: https://dhcp-3-27.example.com:443/redhat_access/r/insights/uploads/
HTTP Status Code: 200
HTTP Status Text: OK
HTTP Response Text: 
Successfully connected to: https://dhcp-3-27.example.com:443/redhat_access/r/insights/uploads/
=== End Upload URL Connection Test: SUCCESS ===

=== Begin API URL Connection Test ===
Testing: https://dhcp-3-27.example.com:443/redhat_access/r/insights/
HTTP Status Code: 500
HTTP Status Text: Internal Server Error
HTTP Response Text: {}
Connection failed
=== End API URL Connection Test: FAILURE ===

Connectivity tests completed with some errors
See /var/log/insights-client/insights-client.log for more details.


Expected results:
- "insights-client --test-connection" request is routed through http proxy defined in general "HTTP(S) proxy" setting of Satellite.

Additional info:
- insights-client register/unregister/status works fine.

Comment 4 Jameer Pathan 2021-08-12 13:24:12 UTC
Update around this bz:

In Satellite 6.10.0 snap 13 we have observed that this issue causes insights-client registration to fail.

Test steps:
- Try to register a satellite content host with insights using command generated from global registration page.

Observations:
- insights-client registration fails.

# Installing Insights client
#
Updating Subscription Management repositories.
This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions.
Red Hat Ansible Engine 2.9 for RHEL 8 x86_64 (RPMs)                                                                           7.8 MB/s | 1.8 MB     00:00    
Package insights-client-3.0.13-1.el8_1.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
GET https://dhcp-2-121.example.com:443/redhat_access/r/insights/v1/branch_info
GET branch_info status: 200
Running Connection Tests...
=== Begin Upload URL Connection Test ===
Testing: https://dhcp-2-121.example.com:443/redhat_access/r/insights/uploads/
HTTP Status Code: 200
HTTP Status Text: OK
HTTP Response Text: 
Successfully connected to: https://dhcp-2-121.example.com:443/redhat_access/r/insights/uploads/
=== End Upload URL Connection Test: SUCCESS ===

=== Begin API URL Connection Test ===
Testing: https://dhcp-2-121.example.com:443/redhat_access/r/insights/
HTTP Status Code: 404
HTTP Status Text: Not Found
HTTP Response Text: {"status":404,"error":"Not Found"}
Connection failed
=== End API URL Connection Test: FAILURE ===

Connectivity tests completed with some errors
See /var/log/insights-client/insights-client.log for more details.
Host [dhcp-2-88.example.com] initial configuration failed

Comment 5 Jameer Pathan 2021-08-31 09:10:53 UTC
Verified:

Verified with:
- Satellite 6.10.0 snap 15
- tfm-rubygem-foreman_rh_cloud-4.0.26-1.el7sat.noarch

Test steps:
- Try registering content host with insights(with and without Default HTTP Proxy configured on satellite).

Observation:
- insights-client registration process finished successfully.
- "insights-client --test-connection" worked as expected.
- No traceback/error in satellite production.log

Comment 8 errata-xmlrpc 2021-11-16 14:11:58 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 (Moderate: Satellite 6.10 Release), 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/RHSA-2021:4702