Live notifications not working

Hello,

I wanted to check the Live notification feature but it seems to not work on my side.

Steps to reproduce:

  1. On a brand new Ubuntu 22.04 server, make a fresh install of RhodeCode Community beta through rcstack. When prompted, enable HTTPS/SSL.
  2. As a super-admin, go to My Account then Live Notifications.
  3. Click the Test flash message button: a banner appears and the favicon shows a “1” on overlay.
  4. Close the banner, the favicon overlay disappears.
  5. Click the Test live notification button: the message Channelstream data sent. You should see a new live message now. appears, but nothing more happens.

Are we supposed to do anything for Channelstream to show Live notifications?

do you notice any errors on the browser console while pushing the live notification ?

Could be SSL misconfiguration on channelstream.

Indeed, there is an error but it fires automatically every 10 seconds, not on button click.
This is apparently not related to the firewall either.

WebSocket connection to 'wss://work.zentek.fr/_channelstream/ws?conn_id=43525d42-c6b4-4a3f-a0ae-18af4555af6b' failed:
openWebsocket   @ scripts.min.js?ver=5d8c63c6:1
startListening  @ scripts.min.js?ver=5d8c63c6:1
a               @ scripts.min.js?ver=5d8c63c6:1
value           @ scripts.min.js?ver=5d8c63c6:1
_handleConnect  @ scripts.min.js?ver=5d8c63c6:1
a               @ scripts.min.js?ver=5d8c63c6:1
value           @ scripts.min.js?ver=5d8c63c6:1
_handleResponse @ scripts.min.js?ver=5d8c63c6:1

The conn_id parameter changes for each new error.

Can you check if in services yaml file this is uncommented to support SSL over websockets ?

      # HTTP + SSL example, should be put into .custom/docker-compose-services.override.yaml
      - "traefik.http.routers.channelstream.entrypoints=http,https"

No it’s not, because the installer didn’t do it by default even in HTTPS mode.
But… actually it doesn’t change anything!

Hello,
Still having this issue unsolved. Any idea to fix it?

have you tried to restart the whole stack by doing a down & up ?

we’re sure this would be the cause of the error because wss:\\ connections were not allowed via this commented out label

I can confirm that:

  1. My file .custom/docker-compose-services.override.yaml contains the following:
services:
  channelstream:
    labels:
      - "traefik.enable=true"
      # Enable http+https endpoints to serve SSL, select just 1 to disable the other
      - "traefik.http.routers.channelstream.entrypoints=http,https"
  1. I have restarted the whole stack by doing:
sudo ./rcstack stack all down
sudo ./rcstack stack router up --detach && sudo ./rcstack stack services up --detach && sudo ./rcstack stack rhodecode up --detach

Still, when I go to My Account > Live notifications and click “Test live notification”, I see nothing while browsing with Google Chrome 120.0.6099.71.
In the meantime, I can confirm that it works correctly on code.rhodecode.com. I’m a bit confused :confused:

Do you have directions to follow to troubleshoot channelstream on my installation?

Here are my logs, just in case:

router:

rc_cluster_router-traefik-1  | 172.18.0.1 - - [12/Dec/2023:16:28:00 +0000] "POST /loki/api/v1/push HTTP/1.1" 404 19 "-" "-" 198 "-" "-" 0ms
rc_cluster_router-traefik-1  | 172.18.0.1 - - [12/Dec/2023:16:28:00 +0000] "POST /loki/api/v1/push HTTP/1.1" 404 19 "-" "-" 199 "-" "-" 0ms
rc_cluster_router-traefik-1  | 172.18.0.1 - - [12/Dec/2023:16:28:07 +0000] "POST /_admin/my_account/test_channelstream HTTP/1.1" 200 78 "-" "-" 200 "rhodecode@docker" "http://172.18.0.12:10020" 34ms
rc_cluster_router-traefik-1  | 172.18.0.1 - - [12/Dec/2023:16:28:08 +0000] "POST /loki/api/v1/push HTTP/1.1" 404 19 "-" "-" 201 "-" "-" 0ms
rc_cluster_router-traefik-1  | 172.18.0.1 - - [12/Dec/2023:16:28:08 +0000] "POST /loki/api/v1/push HTTP/1.1" 404 19 "-" "-" 202 "-" "-" 0ms

services:

rc_cluster_services-channelstream-1  | INFO:channelstream.WSGIServer:172.18.0.12 - - [2023-12-12 16:28:07] "POST /message HTTP/1.1" 200 986 0.001628
rc_cluster_services-channelstream-1  | INFO:channelstream.operations:connecting justin.massiot with uuid 08ef4f15-3bdc-4e60-80b9-778d7a5a66a5
rc_cluster_services-channelstream-1  | INFO:channelstream.wsgi_views.server:info time: 0:00:00.000006
rc_cluster_services-channelstream-1  | INFO:channelstream.WSGIServer:172.18.0.12 - - [2023-12-12 16:28:21] "POST /connect HTTP/1.1" 200 2939 0.001832
rc_cluster_services-channelstream-1  | INFO:channelstream.WSGIServer:172.18.0.3 - - [2023-12-12 16:28:25] "GET /admin/sign_in HTTP/1.1" 200 1972 0.001176
rc_cluster_services-channelstream-1  | INFO:channelstream.operations:connecting justin.massiot with uuid 30f22633-10db-4a7c-a377-d4721f1f409a
rc_cluster_services-channelstream-1  | INFO:channelstream.wsgi_views.server:info time: 0:00:00.000007
rc_cluster_services-channelstream-1  | INFO:channelstream.WSGIServer:172.18.0.12 - - [2023-12-12 16:28:46] "POST /connect HTTP/1.1" 200 2939 0.002701

The rhodecode logs are only showing a bunch of uri="GET:/status " user=":-" user_agent="RhodeCode-Healthcheck", ending in HTTP 200 responses.

Thanks for your time!

Have you been able to digg out from chrome console what is the actual error there ?

Automagically fixed as of version 5.0.0.beta27

1 Like