Bug 1765083 - Websocket connection warnings appear in the browser console
Summary: Websocket connection warnings appear in the browser console
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.3.0
Assignee: Rastislav Wagner
QA Contact: Yadan Pei
Depends On:
TreeView+ depends on / blocked
Reported: 2019-10-24 10:15 UTC by Udi Kalifon
Modified: 2020-01-23 11:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Dashboard's Details card was unnecessarily watching Infrastructure resource Consequence: Errors regarding early websocket connection termination could occur Fix: Details card does not watch Infrastructure resource anymore, it fetches the resource only once Result: No more websocket termination error in browser console
Clone Of:
Last Closed: 2020-01-23 11:09:08 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 3169 0 'None' closed Bug 1765083: Fetch Infrastructure resource and k8s version once, do not watch 2021-01-28 11:17:08 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:09:35 UTC

Description Udi Kalifon 2019-10-24 10:15:17 UTC
Description of problem:
You can see a lot of websocket connection warnings in the browser console (F12):

WebSocket connection to 'wss://console-openshift-console.apps.rhhi-virt-cluster.qe.lab.redhat.com/api/kubernetes/apis/config.openshift.io/v1/infrastructures?watch=true&fieldSelector=metadata.name%3Dcluster' failed: WebSocket is closed before the connection is established.

Attempted to create multiple websockets for storage.k8s.io~v1~StorageClass.

Attempted to create multiple websockets for core~v1~Event.

and more ...

The errors seem harmless, and the number of errors you get is different every time.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Open the browser console (F12)
2. Go to the dashboards page

Actual results:
errors and warnings

Comment 1 Samuel Padgett 2019-10-24 12:56:05 UTC
Rastislav, can you investigate since these are coming from the dashboard page?

I'm not sure we need to watch infrastructures at all. The platform shouldn't change. I'm not sure we need to watch the version URL also. In fact, that could cause weird behavior where the version in the UI flaps during an upgrade since different masters might be at different versions.

Comment 2 Samuel Padgett 2019-10-24 12:57:11 UTC
Note that "Attempted to create multiple websockets" means things are working correctly, and we're sharing websockets when multiple components watch the same resource. That is informational rather than an error.

Comment 4 Yadan Pei 2019-11-07 05:11:51 UTC
1. Admin user visit Home -> Dashboards
2. Check console(F12) output

console don't watch 'infrastructures' and no errors about fetching 'infratructure'

I didn't find a way to verify that we're not watching k8s version since it seems a native kubernetes cluster is needed.

Moving to VERIFIED and we can open new bug if the issues still exists on native kubernetes cluster

Verified on 4.3.0-0.nightly-2019-11-06-215135

Comment 6 errata-xmlrpc 2020-01-23 11:09:08 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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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