Bug 1909866

Summary: Error: Could not submit event: HTTPSConnectionPool(host='cert.cloud.redhat.com', port=443)
Product: Red Hat Enterprise Linux 8 Reporter: Joerg K <joerg.kastning>
Component: insights-clientAssignee: Štěpán Tomsa <stomsa>
Status: CLOSED DUPLICATE QA Contact: Pavol Kotvan <pakotvan>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.3CC: ashraf.hassan, jcrafts, jss
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.1.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-16 15:45:14 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:
Attachments:
Description Flags
insights-client support bundle none

Description Joerg K 2020-12-21 20:54:42 UTC
Created attachment 1741208 [details]
insights-client support bundle

Description of problem:
Though Insights data collection and upload of report is successful there are several error messages printed to STDOUT/STDERR. This is confusing and should not happen.

Version-Release number of selected component (if applicable):
Client: 3.1.1
Core: 3.0.200-1

How reproducible:
I found the problem in my lab environment. The issue is reproducible in an isolated environment where the insights-client is accessing Insights through a proxy.

The affected host is running as a libvirt-guest in an isolated network. Name resolution is only available for the internal zone 'private1'. To access the internet the host has to use a squid proxy running on a RHEL 8 machine. RHSM and insights-client are configured to use this proxy as described in KB 1583183 [Accessing Red Hat Insights Through a Firewall/Proxy](Accessing Red Hat Insights Through a Firewall/Proxy).

~~~
$ grep proxy /etc/rhsm/rhsm.conf
# an http proxy server to use
proxy_hostname = 192.168.100.2
# The scheme to use for the proxy when updating repo definitions, if needed
proxy_scheme = http
# port for http proxy server
proxy_port = 3128
# user name for authenticating to an http proxy, if needed
proxy_user =
# password for basic http proxy auth, if needed
proxy_password =
# host/domain suffix blacklist for proxy, if needed
no_proxy =
~~~

Steps to Reproduce:
1. Run `sudo insights-client --register` OR in case you're already registered `sudo insights-client`

Actual results:

~~~
$ sudo insights-client --register
Error: Could not submit event: HTTPSConnectionPool(host='cert.cloud.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/event (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fe5be5d7080>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Error: Could not submit event: HTTPSConnectionPool(host='cert.cloud.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/event (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fea72fdd438>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Successfully registered host rhel8-t1.private1
Automatic scheduling for Insights has been enabled.
Error: Could not submit event: HTTPSConnectionPool(host='cert.cloud.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/event (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fb98afdc4a8>: Failed to establish a new connection: [Errno -2] Name or service not known',))
Starting to collect Insights data for rhel8-t1.private1
Uploading Insights data.
Successfully uploaded report from rhel8-t1.private1 to account 6929842.
View the Red Hat Insights console at https://cloud.redhat.com/insights/
Error: Could not submit event: HTTPSConnectionPool(host='cert.cloud.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/event (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f93351074e0>: Failed to establish a new connection: [Errno -2] Name or service not known',))
~~~


Expected results:

~~~
$ sudo insights-client
Starting to collect Insights data for rhel8-t1.private1
Uploading Insights data.
Successfully uploaded report from rhel8-t1.private1 to account 6929842.
View details about this system on cloud.redhat.com:
https://cloud.redhat.com/insights/inventory/UUID
~~~

Additional info:

Checking https://cloud.redhat.com/insights/ I can see that the report has been uploaded successful. I think the error described should not happen. All communication should happen using the configured proxy.

I ran `sudo insights-client --support` to gather additional information and attached the archive to this bugzilla.

In case you need additional info or help to reproduce the issue, please feel free to reach out.

Comment 1 Joerg K 2021-01-13 09:31:59 UTC
Hi there, I would like to ask if this bug is currently under investigation or if somebody already is working on it.

Do you need additional information on this?

Regards,
Joerg

Comment 2 Joerg K 2021-01-18 19:44:27 UTC
Hi,

I've downgraded insights-client to version 3.1.0 and the issue is gone.

~~~
$ sudo insights-client --version
Client: 3.1.0
Core: 3.0.202-1

$ sudo insights-client
Starting to collect Insights data for rhel8-t1.private1
Uploading Insights data.
Successfully uploaded report from example.com to account 123456.
View details about this system on cloud.redhat.com:
https://cloud.redhat.com/insights/inventory/foo
~~~

Comment 3 Štěpán Tomsa 2021-03-17 10:04:28 UTC
This has been hotfixed by using RHSM proxy configuration for the Metrics Client. Authenticated proxy configuration may not be fully supported.

Comment 4 John 2021-05-28 01:23:10 UTC
May 28 01:02:57 meh.com insights-client[1435566]: Uploading Insights data.
May 28 01:02:59 meh.com insights-client[1435566]: Successfully uploaded report from meh to account meh.
May 28 01:03:00 meh.com insights-client[1435566]: View details about this system on cloud.redhat.com:
May 28 01:03:00 meh.com insights-client[1435566]: https://cloud.redhat.com/insights/inventory/meh
May 28 01:05:09 meh.com insights-client[1435566]: Error: Could not submit event: HTTPSConnectionPool(host='cloud.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/event (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f32bc76f5c0>: Failed to establish a new connection: [Errno 101] Network is unreachable',))
May 28 01:05:10 audccfots812.au.harveynorman.com systemd[1]: insights-client.service: Succeeded.


[root@audccfots812 05-28 11:06:37 ~]# rpm -q insights-client
insights-client-3.1.3-2.el8_4.noarch


Where is this hotfix??

Comment 5 John 2021-05-28 01:39:30 UTC
And what about rhel 7?

El7 seems to be stuck on this even older and buggier version:

# rpm -q insights-client
insights-client-3.1.1-1.el7_9.noarch

Comment 6 John 2021-05-28 01:51:15 UTC
current insights-client-3.1.1-1.el7_9.noarch is completely broken

Just pathetic.

Comment 7 jcrafts 2021-07-16 15:45:14 UTC
Apologies for the confusion and delay. This issue has been fixed in insights-client-3.1.5, available in the 7.9 batch update on 7/20, and in the 8.4 batch update on 8/3.

*** This bug has been marked as a duplicate of bug 1966761 ***