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