使用设备登录时出现错误 #1629

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

Originally created by @lampb0y on 4/29/2023

Subject of the issue

Deployment environment

  • vaultwarden version:
  • Install method:
    Docker

  • Clients used:
    iOS

  • Reverse proxy and version:
    nginx version: nginx/1.14.2

  • MySQL/MariaDB or PostgreSQL version:

  • Other relevant details:

Steps to reproduce

Expected behaviour

Actual behaviour

Troubleshooting data

[2023-04-29 16:40:04.165][request][INFO] POST /api/auth-requests
[2023-04-29 16:40:04.165][rocket::server::][ERROR] No matching routes for POST /api/auth-requests application/json.
[2023-04-29 16:40:04.165][rocket::server::
][WARN] Responding with registered (api_not_found) /api 404 catcher.
[2023-04-29 16:40:04.165][response][INFO] 404 Not Found

Nginx Config

upstream vaultwarden-default {
  zone vaultwarden-default 64k;
  server 172.17.0.2:80;
  keepalive 2;
}
upstream vaultwarden-ws {
  zone vaultwarden-ws 64k;
  server 172.17.0.2:3012;
  keepalive 2;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name example.com;

    ssl_certificate /etc/nginx/conf.d/example.crt;
    ssl_certificate_key /etc/nginx/conf.d/example.key;

    client_max_body_size 128M;

    location / {
      proxy_http_version 1.1;
      proxy_set_header "Connection" "";

      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;
    }

    location /notifications/hub/negotiate {
      proxy_http_version 1.1;
      proxy_set_header "Connection" "";

      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;
    }

    location /notifications/hub {
      proxy_http_version 1.1;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection "upgrade";

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

      proxy_pass http://vaultwarden-ws;
    }

}
*Originally created by @lampb0y on 4/29/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. --> ### Deployment environment <!-- ========================================================================================= Preferably, use the `Generate Support String` button on the admin page's Diagnostics tab. That will auto-generate most of the info requested in this section. ========================================================================================= --> <!-- The version number, obtained from the logs (at startup) or the admin diagnostics page --> <!-- This is NOT the version number shown on the web vault, which is versioned separately from vaultwarden --> <!-- Remember to check if your issue exists on the latest version first! --> * vaultwarden version: <!-- How the server was installed: Docker image, OS package, built from source, etc. --> * Install method: Docker * Clients used: <!-- web vault, desktop, Android, iOS, etc. (if applicable) --> iOS * Reverse proxy and version: <!-- if applicable --> nginx version: nginx/1.14.2 * MySQL/MariaDB or PostgreSQL version: <!-- if applicable --> * Other relevant 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? --> ### Expected behaviour <!-- Tell us what you expected to happen --> ### Actual behaviour <!-- Tell us what actually happened --> ### Troubleshooting data <!-- Share any log files, screenshots, or other relevant troubleshooting data --> [2023-04-29 16:40:04.165][request][INFO] POST /api/auth-requests [2023-04-29 16:40:04.165][rocket::server::_][ERROR] No matching routes for POST /api/auth-requests application/json. [2023-04-29 16:40:04.165][rocket::server::_][WARN] Responding with registered (api_not_found) /api 404 catcher. [2023-04-29 16:40:04.165][response][INFO] 404 Not Found ``` Nginx Config upstream vaultwarden-default { zone vaultwarden-default 64k; server 172.17.0.2:80; keepalive 2; } upstream vaultwarden-ws { zone vaultwarden-ws 64k; server 172.17.0.2:3012; keepalive 2; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name example.com; ssl_certificate /etc/nginx/conf.d/example.crt; ssl_certificate_key /etc/nginx/conf.d/example.key; client_max_body_size 128M; location / { proxy_http_version 1.1; proxy_set_header "Connection" ""; 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; } location /notifications/hub/negotiate { proxy_http_version 1.1; proxy_set_header "Connection" ""; 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; } location /notifications/hub { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Forwarded $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_pass http://vaultwarden-ws; } } ```
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/vaultwarden#1629