Failed to verify the connection: websocket error in Whiteboard settings

Hi,

I’ve configured my Whiteboard in local node ( GitHub - nextcloud/whiteboard: Create & collaborate on an infinite canvas!), and when I ran curl:

user@nextcloud-lab# curl -v https://nextcloud-lab.local:3002

  • Host nextcloud-lab.local:3002 was resolved.
  • IPv6: (none)
  • IPv4: 127.0.1.1
  • Trying 127.0.1.1:3002…
  • Connected to nextcloud-lab.local (127.0.1.1) port 3002
  • ALPN: curl offers h2,http/1.1
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
  • CAfile: /etc/ssl/certs/ca-certificates.crt
  • CApath: /etc/ssl/certs
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
  • TLSv1.3 (IN), TLS handshake, Finished (20):
  • TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / RSASSA-PSS
  • ALPN: server accepted http/1.1
  • Server certificate:
  • subject: C=XX; ST=Some-State; O=Internet Widgits Pty Ltd; CN=nextcloud-lab.local
  • start date: Oct 10 10:33:25 2024 GMT
  • expire date: Oct 10 10:33:25 2025 GMT
  • common name: nextcloud-lab.local (matched)
  • issuer: C=XX; ST=Some-State; O=Internet Widgits Pty Ltd; CN=nextcloud-lab.local
  • SSL certificate verify ok.
  • Certificate level 0: Public key type RSA (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
  • using HTTP/1.x

GET / HTTP/1.1
Host: nextcloud-lab.local:3002
User-Agent: curl/8.5.0
Accept: /

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • old SSL session ID is stale, removing
    < HTTP/1.1 200 OK
    < X-Powered-By: Express
    < Content-Type: text/html; charset=utf-8
    < Content-Length: 40
    < ETag: W/“28-kxXxXxXxXxXxXV6+YYkqlfsxXxX”
    < Date: Thu, 10 Oct 2024 14:20:58 GMT
    < Connection: keep-alive
    < Keep-Alive: timeout=5
    <
  • Connection #0 to host nextcloud-lab.local left intact
    Excalidraw collaboration server is up :slight_smile:

I don’t have any error. But in Whiteboard settings it appears:

Failed to verify the connection: websocket error.

I ran something similitar to:

JWT_SECRET_KEY=“some-secret” NEXTCLOUD_URL=“https://nextcloud-lab.local” TLS=“true” TLS_KEY=“/path/to/cert.key” TLS_CERT=“/path/to/cert.crt” npm run server:start

And my configuration is:

Whiteboard server URL: https://nextcloud-lab.local:3002
Shared secret: some-secret

Any idea about this?

Thank you in advance!

I had the same problem. I have installed the docker on my Synology and I use the integrated reverse proxy. The solution was to create in the reverse proxy settings to the whiteboard entry these two websocket options:
Upgrade $http_upgrade
Connection $connection_upgrade

After this was done the error message in Nextcloud was gone.

Hi @Ruebezahl,

Thank you for your information. Do you remember what file you modified to add these lines to configure reverse proxy in the docker?

Thank you again!

Hi, I use the GUI of Synology reverse proxy (this has nothing to do with docker in my case). I don’t know which file you have to edit.
Maybe someone else has an idea?

Can you please share your reverse proxy config on the NAS? I have the same problem and fail to solve it.

Hi, here is the screenshot of settings for websockets:


Under “Erstellen” you find “websockets” and this creates the entries.
Does it help?

Thanks for quick respons!
It was actually your configuration in General / Allgemein that I was interested in.
I run both NextCloud and the whiteboard backend on my DSM NAS. I have a DNS record for NextCloud. Should I use that with a new port in the General / Allgemein tab and of course configure NextCloud whiteboard with the same url and port?

this is my reverse proxy config for the whiteboard server (running in docker on the Diskstation), Nextcloud is running in a VM also on this NAS. The Nextcloud has it’s own subdomain and is running on port 443 behind the reverse proxy.

Thanks! I will try this.

Hi,

I have the same problem, error message a bit different:
“Failed to verify the connection: timeout”

My configuration:

wget http://local.ip.of.the.whiteboardserver:3002
→ “Excalidraw collaboration server is up :)”

wget http://local.ip.of.the.whiteboardserver:3002/whiteboard
→ as I read somewhere that this could help: 404 error

Using the FQDN URL (wget http://ownnextcloud.me/whiteboard) via nginx:
→ “Excalidraw collaboration server is up :)”

  • jwt_secret_key is defined and correct!

But the admin page of my nextcloud server is telling me the error message as above.
I have tried to fill in:

  1. http://192.168.xyz.xyz:3002/
  2. http://fqdn.of.the.nextcloudserver which is then routed over the nginx
  3. http://fqdn.of.the.nextcloudserver/whiteboard which is then routed over the nginx
  4. all with https:… via nginx

nothing is functioning.

Any ideas which could help me?

Regards

Gerhard

I have the same problem, I tried all the possible settings at all the configuration points, and the error message persists.