Websocket timeout #1448

Closed
opened 2026-04-06 01:54:35 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @fendixdev on 9/12/2023

Subject of the issue

With the latest update the websockets did not work anymore. I decided to reinstall, downloading the latest image and using the proxy template from BlackDex. When I check, I get errors in the console.

Deployment environment

Your environment (Generated via diagnostics page)

  • Vaultwarden version: v1.29.2
  • Web-vault version: v2023.7.1
  • OS/Arch: linux/x86_64
  • Running within Docker: true (Base: Debian)
  • Environment settings overridden: false
  • Uses a reverse proxy: true
  • IP Header check: true (X-Real-IP)
  • Internet access: true
  • Internet access via a proxy: false
  • DNS Check: true
  • Browser/Server Time Check: true
  • Server/NTP Time Check: true
  • Domain Configuration Check: true
  • HTTPS Check: true
  • Database type: SQLite
  • Database version: 3.41.2
  • Clients used: 1
  • Reverse proxy and version: Nginx - v1.29.0+ (by @BlackDex), nginx version: nginx/1.18.0
  • Other relevant information: -

Config (Generated via diagnostics page)

Show Running Config

Environment settings which are overridden:

{
  "_duo_akey": null,
  "_enable_duo": true,
  "_enable_email_2fa": true,
  "_enable_smtp": true,
  "_enable_yubico": true,
  "_icon_service_csp": "",
  "_icon_service_url": "",
  "_ip_header_enabled": true,
  "_smtp_img_src": "cid:",
  "admin_ratelimit_max_burst": 3,
  "admin_ratelimit_seconds": 300,
  "admin_session_lifetime": 20,
  "admin_token": "***",
  "allowed_iframe_ancestors": "",
  "attachments_folder": "data/attachments",
  "auth_request_purge_schedule": "30 * * * * *",
  "authenticator_disable_time_drift": false,
  "data_folder": "data",
  "database_conn_init": "",
  "database_max_conns": 10,
  "database_timeout": 30,
  "database_url": "***************",
  "db_connection_retries": 15,
  "disable_2fa_remember": false,
  "disable_admin_token": false,
  "disable_icon_download": false,
  "domain": "*****://**************",
  "domain_origin": "*****://**************",
  "domain_path": "",
  "domain_set": true,
  "duo_host": null,
  "duo_ikey": null,
  "duo_skey": null,
  "email_attempts_limit": 3,
  "email_expiration_time": 600,
  "email_token_size": 6,
  "emergency_access_allowed": true,
  "emergency_notification_reminder_schedule": "0 3 * * * *",
  "emergency_request_timeout_schedule": "0 7 * * * *",
  "enable_db_wal": true,
  "event_cleanup_schedule": "0 10 0 * * *",
  "events_days_retain": null,
  "extended_logging": true,
  "helo_name": null,
  "hibp_api_key": null,
  "icon_blacklist_non_global_ips": true,
  "icon_blacklist_regex": null,
  "icon_cache_folder": "data/icon_cache",
  "icon_cache_negttl": 259200,
  "icon_cache_ttl": 2592000,
  "icon_download_timeout": 10,
  "icon_redirect_code": 302,
  "icon_service": "internal",
  "incomplete_2fa_schedule": "30 * * * * *",
  "incomplete_2fa_time_limit": 3,
  "invitation_expiration_hours": 120,
  "invitation_org_name": "Vaultwarden",
  "invitations_allowed": true,
  "ip_header": "X-Real-IP",
  "job_poll_interval_ms": 30000,
  "log_file": null,
  "log_level": "Info",
  "log_timestamp_format": "%Y-%m-%d %H:%M:%S.%3f",
  "login_ratelimit_max_burst": 10,
  "login_ratelimit_seconds": 60,
  "org_attachment_limit": null,
  "org_creation_users": "",
  "org_events_enabled": false,
  "org_groups_enabled": false,
  "password_hints_allowed": true,
  "password_iterations": 600000,
  "push_enabled": false,
  "push_installation_id": "***",
  "push_installation_key": "***",
  "push_relay_uri": "https://push.bitwarden.com",
  "reload_templates": false,
  "require_device_email": false,
  "rsa_key_filename": "data/rsa_key",
  "send_purge_schedule": "0 5 * * * *",
  "sendmail_command": null,
  "sends_allowed": true,
  "sends_folder": "data/sends",
  "show_password_hint": false,
  "signups_allowed": false,
  "signups_domains_whitelist": "",
  "signups_verify": false,
  "signups_verify_resend_limit": 6,
  "signups_verify_resend_time": 3600,
  "smtp_accept_invalid_certs": false,
  "smtp_accept_invalid_hostnames": false,
  "smtp_auth_mechanism": null,
  "smtp_debug": false,
  "smtp_embed_images": true,
  "smtp_explicit_tls": null,
  "smtp_from": "******************",
  "smtp_from_name": "Vaultwarden",
  "smtp_host": "**************",
  "smtp_password": "***",
  "smtp_port": 587,
  "smtp_security": "starttls",
  "smtp_ssl": null,
  "smtp_timeout": 15,
  "smtp_username": "******************",
  "templates_folder": "data/templates",
  "tmp_folder": "data/tmp",
  "trash_auto_delete_days": null,
  "trash_purge_schedule": "0 5 0 * * *",
  "use_sendmail": false,
  "use_syslog": false,
  "user_attachment_limit": null,
  "web_vault_enabled": true,
  "web_vault_folder": "web-vault/",
  "websocket_address": "0.0.0.0",
  "websocket_enabled": false,
  "websocket_port": 3012,
  "yubico_client_id": "80365",
  "yubico_secret_key": "***",
  "yubico_server": null
}

Steps to reproduce

Creating user and adding to docker group, create docker-compose.yml, create nginx vhost and obtain certificates with LetsEncrypt (certbot and dns-cloudflare challenge), nginx -t and restart, start container.

Expected behaviour

LiveSync is not working.

Actual behaviour

Websocket/LiveSync is not working. I'm receiving following errors in the browser console:

[2023-09-12T08:27:52.672Z] Error: Connection disconnected with error 'Error: Server timeout elapsed without receiving a message from the server.'.

Unhandled Promise rejection: Server timeout elapsed without receiving a message from the server. ; Zone: <root> ; Task: null ; Value: Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (HubConnection.ts:671:30) at HubConnection.ts:640:57 at i.<computed> (zone.js:3158:47) at t.invokeTask (zone.js:446:35) at e.runTask (zone.js:214:51) at e.invokeTask (zone.js:528:38) at i.useG.invoke (zone.js:517:52) at r.args.<computed> (zone.js:3138:36) Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (https://redacteddomain.de/app/vendor.80cb43550cd35d36022d.js:2:67226) at https://redacteddomain.de/app/vendor.80cb43550cd35d36022d.js:2:66870 at i.<computed> (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:248497) at t.invokeTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:215383) at e.runTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:210412) at e.invokeTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:216539) at i.useG.invoke (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:216430) at r.args.<computed> (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:248195)

Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (HubConnection.ts:671:30) at HubConnection.ts:640:57 at i.<computed> (zone.js:3158:47) at t.invokeTask (zone.js:446:35) at e.runTask (zone.js:214:51) at e.invokeTask (zone.js:528:38) at i.useG.invoke (zone.js:517:52) at r.args.<computed> (zone.js:3138:36)

Troubleshooting data

nginx vhost/reverse proxy

Show vhost
upstream vaultwarden-default {
  zone vaultwarden-default 64k;
  server 127.0.0.1:8080;
  keepalive 2;
}


map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      "";
}

server {
    listen 80;
    listen [::]:80;
    server_name redacteddomain.de;

    if ($host = redacteddomain.de) {
        return 301 https://$host$request_uri;
    }
    return 404;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name redacteddomain.de;

    ssl_certificate /etc/letsencrypt/live/redacteddomain.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/redacteddomain.de/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/redacteddomain.de/fullchain.pem;

    client_max_body_size 525M;

    location / {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;

      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;

      proxy_pass http://vaultwarden-default;
    }
}

docker compose file

Show docker-compose.yml
version: '3'

services:
  vaultwarden:
    image: vaultwarden/server:latest
    container_name: vaultwarden
    restart: always
    ports:
      - 8080:80
    environment:
      - ADMIN_TOKEN=******
      - SIGNUPS_ALLOWED=false
      - DOMAIN=https://redacteddomain.de
      - WEB_VAULT_ENABLED=true
      - ROCKET_PORT=80
      - YUBICO_CLIENT_ID=80365
      - YUBICO_SECRET_KEY=******
      - SMTP_HOST=smtp.gmail.com
      - SMTP_PORT=587
      - SMTP_USERNAME=******
      - SMTP_FROM=******
      - SMTP_PASSWORD=******
      - SMTP_SECURITY=starttls
    volumes:
      - ./vw-data:/data

Using cloudflare as a DNS service. No rules created. Strict encryption.

*Originally created by @fendixdev on 9/12/2023* <!-- # ### NOTE: Please update to the latest version of vaultwarden before reporting an issue! This saves you and us a lot of time and troubleshooting. See: * https://github.com/dani-garcia/vaultwarden/issues/1180 * https://github.com/dani-garcia/vaultwarden/wiki/Updating-the-vaultwarden-image # ### --> <!-- Please fill out the following template to make solving your problem easier and faster for us. This is only a guideline. If you think that parts are unnecessary for your issue, feel free to remove them. Remember to hide/redact personal or confidential information, such as passwords, IP addresses, and DNS names as appropriate. --> ### Subject of the issue <!-- Describe your issue here. --> With the latest update the websockets did not work anymore. I decided to reinstall, downloading the latest image and using the proxy template from BlackDex. When I check, I get errors in the console. ### Deployment environment ### Your environment (Generated via diagnostics page) * Vaultwarden version: v1.29.2 * Web-vault version: v2023.7.1 * OS/Arch: linux/x86_64 * Running within Docker: true (Base: Debian) * Environment settings overridden: false * Uses a reverse proxy: true * IP Header check: true (X-Real-IP) * Internet access: true * Internet access via a proxy: false * DNS Check: true * Browser/Server Time Check: true * Server/NTP Time Check: true * Domain Configuration Check: true * HTTPS Check: true * Database type: SQLite * Database version: 3.41.2 * Clients used: 1 * Reverse proxy and version: Nginx - v1.29.0+ (by @BlackDex), nginx version: nginx/1.18.0 * Other relevant information: - ### Config (Generated via diagnostics page) <details><summary>Show Running Config</summary> **Environment settings which are overridden:** ```json { "_duo_akey": null, "_enable_duo": true, "_enable_email_2fa": true, "_enable_smtp": true, "_enable_yubico": true, "_icon_service_csp": "", "_icon_service_url": "", "_ip_header_enabled": true, "_smtp_img_src": "cid:", "admin_ratelimit_max_burst": 3, "admin_ratelimit_seconds": 300, "admin_session_lifetime": 20, "admin_token": "***", "allowed_iframe_ancestors": "", "attachments_folder": "data/attachments", "auth_request_purge_schedule": "30 * * * * *", "authenticator_disable_time_drift": false, "data_folder": "data", "database_conn_init": "", "database_max_conns": 10, "database_timeout": 30, "database_url": "***************", "db_connection_retries": 15, "disable_2fa_remember": false, "disable_admin_token": false, "disable_icon_download": false, "domain": "*****://**************", "domain_origin": "*****://**************", "domain_path": "", "domain_set": true, "duo_host": null, "duo_ikey": null, "duo_skey": null, "email_attempts_limit": 3, "email_expiration_time": 600, "email_token_size": 6, "emergency_access_allowed": true, "emergency_notification_reminder_schedule": "0 3 * * * *", "emergency_request_timeout_schedule": "0 7 * * * *", "enable_db_wal": true, "event_cleanup_schedule": "0 10 0 * * *", "events_days_retain": null, "extended_logging": true, "helo_name": null, "hibp_api_key": null, "icon_blacklist_non_global_ips": true, "icon_blacklist_regex": null, "icon_cache_folder": "data/icon_cache", "icon_cache_negttl": 259200, "icon_cache_ttl": 2592000, "icon_download_timeout": 10, "icon_redirect_code": 302, "icon_service": "internal", "incomplete_2fa_schedule": "30 * * * * *", "incomplete_2fa_time_limit": 3, "invitation_expiration_hours": 120, "invitation_org_name": "Vaultwarden", "invitations_allowed": true, "ip_header": "X-Real-IP", "job_poll_interval_ms": 30000, "log_file": null, "log_level": "Info", "log_timestamp_format": "%Y-%m-%d %H:%M:%S.%3f", "login_ratelimit_max_burst": 10, "login_ratelimit_seconds": 60, "org_attachment_limit": null, "org_creation_users": "", "org_events_enabled": false, "org_groups_enabled": false, "password_hints_allowed": true, "password_iterations": 600000, "push_enabled": false, "push_installation_id": "***", "push_installation_key": "***", "push_relay_uri": "https://push.bitwarden.com", "reload_templates": false, "require_device_email": false, "rsa_key_filename": "data/rsa_key", "send_purge_schedule": "0 5 * * * *", "sendmail_command": null, "sends_allowed": true, "sends_folder": "data/sends", "show_password_hint": false, "signups_allowed": false, "signups_domains_whitelist": "", "signups_verify": false, "signups_verify_resend_limit": 6, "signups_verify_resend_time": 3600, "smtp_accept_invalid_certs": false, "smtp_accept_invalid_hostnames": false, "smtp_auth_mechanism": null, "smtp_debug": false, "smtp_embed_images": true, "smtp_explicit_tls": null, "smtp_from": "******************", "smtp_from_name": "Vaultwarden", "smtp_host": "**************", "smtp_password": "***", "smtp_port": 587, "smtp_security": "starttls", "smtp_ssl": null, "smtp_timeout": 15, "smtp_username": "******************", "templates_folder": "data/templates", "tmp_folder": "data/tmp", "trash_auto_delete_days": null, "trash_purge_schedule": "0 5 0 * * *", "use_sendmail": false, "use_syslog": false, "user_attachment_limit": null, "web_vault_enabled": true, "web_vault_folder": "web-vault/", "websocket_address": "0.0.0.0", "websocket_enabled": false, "websocket_port": 3012, "yubico_client_id": "80365", "yubico_secret_key": "***", "yubico_server": null } ``` </details> ### Steps to reproduce <!-- Tell us how to reproduce this issue. What parameters did you set (differently from the defaults) and how did you start vaultwarden? --> Creating user and adding to docker group, create docker-compose.yml, create nginx vhost and obtain certificates with LetsEncrypt (certbot and dns-cloudflare challenge), nginx -t and restart, start container. ### Expected behaviour LiveSync is not working. ### Actual behaviour Websocket/LiveSync is not working. I'm receiving following errors in the browser console: `[2023-09-12T08:27:52.672Z] Error: Connection disconnected with error 'Error: Server timeout elapsed without receiving a message from the server.'.` `Unhandled Promise rejection: Server timeout elapsed without receiving a message from the server. ; Zone: <root> ; Task: null ; Value: Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (HubConnection.ts:671:30) at HubConnection.ts:640:57 at i.<computed> (zone.js:3158:47) at t.invokeTask (zone.js:446:35) at e.runTask (zone.js:214:51) at e.invokeTask (zone.js:528:38) at i.useG.invoke (zone.js:517:52) at r.args.<computed> (zone.js:3138:36) Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (https://redacteddomain.de/app/vendor.80cb43550cd35d36022d.js:2:67226) at https://redacteddomain.de/app/vendor.80cb43550cd35d36022d.js:2:66870 at i.<computed> (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:248497) at t.invokeTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:215383) at e.runTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:210412) at e.invokeTask (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:216539) at i.useG.invoke (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:216430) at r.args.<computed> (https://redacteddomain.de/app/polyfills.b65045dd8b47303eeac4.js:2:248195)` `Error: Server timeout elapsed without receiving a message from the server. at W.serverTimeout (HubConnection.ts:671:30) at HubConnection.ts:640:57 at i.<computed> (zone.js:3158:47) at t.invokeTask (zone.js:446:35) at e.runTask (zone.js:214:51) at e.invokeTask (zone.js:528:38) at i.useG.invoke (zone.js:517:52) at r.args.<computed> (zone.js:3138:36)` ### Troubleshooting data ### nginx vhost/reverse proxy <details><summary>Show vhost</summary> ```bash upstream vaultwarden-default { zone vaultwarden-default 64k; server 127.0.0.1:8080; keepalive 2; } map $http_upgrade $connection_upgrade { default upgrade; '' ""; } server { listen 80; listen [::]:80; server_name redacteddomain.de; if ($host = redacteddomain.de) { return 301 https://$host$request_uri; } return 404; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name redacteddomain.de; ssl_certificate /etc/letsencrypt/live/redacteddomain.de/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/redacteddomain.de/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/redacteddomain.de/fullchain.pem; client_max_body_size 525M; location / { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://vaultwarden-default; } } ``` </details> ### docker compose file <details><summary>Show docker-compose.yml</summary> ```bash version: '3' services: vaultwarden: image: vaultwarden/server:latest container_name: vaultwarden restart: always ports: - 8080:80 environment: - ADMIN_TOKEN=****** - SIGNUPS_ALLOWED=false - DOMAIN=https://redacteddomain.de - WEB_VAULT_ENABLED=true - ROCKET_PORT=80 - YUBICO_CLIENT_ID=80365 - YUBICO_SECRET_KEY=****** - SMTP_HOST=smtp.gmail.com - SMTP_PORT=587 - SMTP_USERNAME=****** - SMTP_FROM=****** - SMTP_PASSWORD=****** - SMTP_SECURITY=starttls volumes: - ./vw-data:/data ``` </details> Using cloudflare as a DNS service. No rules created. Strict encryption.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1448