Bug 2094243
| Summary: | insights-client: Traceback printed in stderr during registration after I set wrong hostname for insights-service | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Jan Stavel <jstavel> |
| Component: | insights-client | Assignee: | Alba Hita <ahitacat> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Pavol Kotvan <pakotvan> |
| Severity: | low | Docs Contact: | |
| Priority: | low | ||
| Version: | 9.1 | CC: | ahitacat, cmarinea, fjansen, gchamoul, link, prgutier, redakkan, stomsa |
| Target Milestone: | rc | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | SCRUB_20220609 | ||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-12-07 07:28:36 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: | |||
I've attached a complete ansible playbook to reproduce the case. Hello,
I have verified that the fix solved the problem - ie. no traceback appears when registering.
It prints a well formatted message instead.
TASK [register to insights service] ***************************************************************************************************************************************************************************
fatal: [cloud-qe-09.idmqe.lab.eng.bos.redhat.com]: FAILED! => changed=true
cmd:
- insights-client
- --register
delta: '0:00:26.882901'
end: '2023-11-09 07:59:53.903428'
msg: non-zero return code
rc: 1
start: '2023-11-09 07:59:27.020527'
stderr: ''
stderr_lines: <omitted>
stdout: |-
Unable to fetch egg url https://cert.cloud.stage.redhat.com/api/module-update-router/v1/channel?module=insights-core: HTTPSConnectionPool(host='cert.cloud.stage.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/channel?module=insights-core (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))). Defaulting to /release
HTTPSConnectionPool(host='cert.cloud.stage.redhat.com', port=443): Max retries exceeded with url: /api/v1/static/release/insights-core.egg (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
The Insights API could not be reached.
Automatic scheduling for Insights has been enabled.
Starting to collect Insights data for cloud-qe-09.idmqe.lab.eng.bos.redhat.com
Uploading Insights data.
Upload attempt 1 of 1 failed! Reason: HTTPSConnectionPool(host='cert.cloud.stage.redhat.com', port=443): Max retries exceeded with url: /api/ingress/v1/upload (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)')))
All attempts to upload have failed!
Please see /var/log/insights-client/insights-client.log for additional information
Upload failed.
stdout_lines: <omitted>
...ignoring
version of rhel:
DISTRO=RHEL-9.3.0-20231109.0
ARCHITECTURE=x86_64
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release. Therefore, it is being closed. If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened. |
I see a traceback after I make insights-service down - (by settig wrong hostname for insights service in /etc/hosts) I have tried to simulate a case when the service is down during registering to the service. - name: Set /etc/hosts with wrong hostname of Insights Service copy: content: | 10.2.77.208 cert.cloud.stage.redhat.com 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 dest: /etc/hosts mode: '644' - name: Register the system command: "subscription-manager register --username {{ rhsm.username }} --password {{ rhsm.password }}" register: out changed_when: out.rc != 0 environment: - SUBMAN_DEBUG_PRINT_REQUEST: "1" - name: register to insights service # noqa ignore-errors command: "insights-client --register" register: out changed_when: out.rc != 0 ignore_errors: yes I see stderr from the command above: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen httplib_response = self._make_request( File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request self._validate_conn(conn) File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn conn.connect() File "/usr/lib/python3.9/site-packages/urllib3/connection.py", line 411, in connect self.sock = ssl_wrap_socket( File "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket ssl_sock = _ssl_wrap_socket_impl( File "/usr/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl return ssl_context.wrap_socket(sock, server_hostname=server_hostname) File "/usr/lib64/python3.9/ssl.py", line 500, in wrap_socket return self.sslsocket_class._create( File "/usr/lib64/python3.9/ssl.py", line 1040, in _create self.do_handshake() File "/usr/lib64/python3.9/ssl.py", line 1309, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/lib/python3.9/site-packages/requests/adapters.py", line 439, in send resp = conn.urlopen( File "/usr/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen retries = retries.increment( File "/usr/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment raise MaxRetryError(_pool, url, error or ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cert.cloud.stage.redhat.com', port=443): Max retries exceeded with url: /api/module-update-router/v1/channel?module=insights-core (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) The same error appears even in cockpit after I register a system using subscriptions cockpit plugin.