bitwarden_rs: 503 Service Unavailable

Created on 1 Aug 2019  路  16Comments  路  Source: dani-garcia/bitwarden_rs

I have bitwarden_rs installed using a reverse proxy between two Linux machines.

Randomly I am unable to access bitwarden and receive the 503 Service Unavailable error. When I connect to the local LAN, and try to connect through the 192.168.x.x address, I am also unable to connect.

If I restart bitwardan_rs docker (docker restart bitwarden_rs) then I can then access the web interface.

I'm not sure what to log within Docker or how to debug this, so advice is welcome. Sorry I've not posted any logs.

question troubleshooting

All 16 comments

When the service is broken, see docker logs for the container. This should help narrowing down the problem.

Docker logs doesn't show me anything that I think you'll consider important... all I see are icon downloads. Below you can see the last icon download and then when docker was restarted.

Can I activate further debugging in docker?

[2019-07-31 11:45:59][_][INFO] Outcome: Success
[2019-07-31 11:45:59][_][INFO] Response succeeded.
/--------------------------------------------------------------------\
| Starting Bitwarden_RS |
| Version 1.9.1-d7ee7cae |
|--------------------------------------------------------------------|
| This is an unofficial Bitwarden implementation, DO NOT use the |
| official channels to report bugs/features, regardless of client. |
| Report URL: https://github.com/dani-garcia/bitwarden_rs/issues/new |
--------------------------------------------------------------------/

[2019-08-01 04:49:01][launch][INFO] Configured for staging.
[2019-08-01 04:49:01][launch_][INFO] address: 0.0.0.0
[2019-08-01 04:49:01][launch_][INFO] port: 80
[2019-08-01 04:49:01][launch_][INFO] log: normal
[2019-08-01 04:49:01][launch_][INFO] workers: 10
[2019-08-01 04:49:01][launch_][INFO] secret key: private-cookies disabled
[2019-08-01 04:49:01][launch_][INFO] limits: forms = 32KiB, json* = 10MiB
[2019-08-01 04:49:01][launch_][INFO] keep-alive: 5s
[2019-08-01 04:49:01][launch_][INFO] tls: disabled
[2019-08-01 04:49:01][rocket::fairing::fairings][INFO] Fairings:

There was recent fix for some panic when getting icons, perhaps you've been experiencing the same problem? Can you try with the latest image and see if you still encounter the problem?

I've installed the latest image and will update here if this occurs again. Otherwise I'll report back in a few days if it is all good.

BTW, how do I check what version of bitwarden_rs I have running?

@markcs During application start up you can see the version on stdout:

Aug 01 12:39:49 galaxy podman[2453]: |                       Starting Bitwarden_RS                        |
Aug 01 12:39:49 galaxy podman[2453]: |                       Version 1.9.1-8be2ed62                       |

I haven't seen this again, so the upgrade appears to have fixed this.

We can close. Thanks for your help

Yay! Closing this now.

Sorry to comment on a closed issue, but I am still seeing this.
Proxy Error

The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /.

:~$ docker logs bitwarden_rs > bitwarden.log

thread '' panicked at 'called Result::unwrap() on an Err value: MissingPair', src/libcore/result.rs:1051:5
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace.

-> is this error causing the issue?

the log

I fixed another error that mentioned missing pair recently can you try to update your image?

If the error still happens, try to run it with RUST_BACKTRACE=1 and paste the detailed error message here.

Ok, I pulled the latest and saw the error again.

I started docker like this. Is this correct for BACKTRACE=1?

docker run -d --name bitwarden_rs --restart unless-stopped -e LOG_FILE=/data/bitwarden.log -v /home/mark/docker/bw-data-rs/:/data/ -p 8082:80 -e "RUST_BACKTRACE=1" mprasil/bitwarden:latest

@dani-garcia

I saw the issue again after restarting bitwarden with the above command. The logs contain all the icon fetching plus these warnings.

[2019-08-08 04:08:23][rocket::rocket][INFO] GET /icons/%22c/icon.png image/webp:
[2019-08-08 04:08:23][_][INFO] Matched: GET /icons//icon.png (icon)
[2019-08-08 04:08:23][bitwarden_rs::api::icons][WARN] Invalid domain: "\"c"

[2019-08-08 04:08:34][bitwarden_rs::api::icons][ERROR] Error downloading icon: Empty response. Empty response

[2019-08-08 04:08:35][html5ever::tree_builder][WARN] foster parenting not implemented
[2019-08-08 04:08:35][html5ever::tree_builder][WARN] foster parenting not implemented
[2019-08-08 04:08:35][html5ever::tree_builder][WARN] foster parenting not implemented
[2019-08-08 04:08:35][bitwarden_rs::api::icons][INFO] Download failed for http://www.homepharmacy.com.a u/favicon.ico
[2019-08-08 04:08:35][bitwarden_rs::api::icons][ERROR] Error downloading icon: Empty response. Empty re sponse

[2019-08-08 04:08:35][bitwarden_rs::api::icons][INFO] Download failed for https://host3.sabameeting.com /favicon.ico
[2019-08-08 04:08:35][bitwarden_rs::api::icons][ERROR] Error downloading icon: Empty response. Empty re sponse

@dani-garcia I've seen the issue again, but nothing really in the logs.

This is how I started bitwarden_rs:

./docker run -d --name bitwarden_rs --restart unless-stopped -e LOG_FILE=/data/bitwarden.log -v /home/mark/docker/bw-data-rs/:/data/ -p 8082:80 -e RUST_BACKTRACE=1 mprasil/bitwarden:latest

@markcs you are using old/wrong image. Use bitwardenrs/server.

@mprasil @dani-garcia

Thanks for the tip. So now I restarted bitwarden with.
docker run -d --name bitwarden_rs --restart unless-stopped -e LOG_FILE=/data/bitwarden.log -v /home/mark/docker/bw-data-rs/:/data/ -p 8082:80 -e RUST_BACKTRACE=1 bitwardenrs/server:latest

Version Version 1.9.1-8be2ed62

But I'm still seeing the same issue.

The RUST_BACKTRACE is not giving any more printouts in the logs

EDIT: started bitwarden_rs again with the logging described here: https://github.com/dani-garcia/bitwarden_rs/wiki/Logging

This has happened again to me. I have the bitwarden.log using the logging described here: https://github.com/dani-garcia/bitwarden_rs/wiki/Logging

Does this contain any sensitive information?

@mprasil @dani-garcia

If you have failed login attempts it would contain the IP and email address of the attempt. Other than that I don't think so, mostly just random identifiers.

Was this page helpful?
0 / 5 - 0 ratings