502 Bad Gateway error after new install of Vaultwarden

My YunoHost server

Hardware: VPS bought online
YunoHost version: 11.0.9.3
I have access to my server : Through SSH | through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no special context
If yes, please explain:

Description of my issue

I have done a fresh install of the YunoHost Vaultwarden app on my VPS using the WebAdmin interface, which appears to have completed successfully. I have configured it for access via a path on my main domain (ie https://my.domain/vaultwarden) but when I goto my.domain/vaultwarden I get a 502 Bad Gateway error.

I’ve looked in /var/log/yunohost and subdirectories for logs that might point to the cause of the problem but haven’t found anything that looks relevant. I found the install log for Vaultwarden which doesn’t contain any error messages.

In the nginx error log for my main domain I see the following:

2022/08/14 21:40:28 [error] 176711#176711: *2064 upstream prematurely closed connection while reading response header from upstream, client: 124.188.230.84, server: my.domain, request: "POST /yunohost/api/apps HTTP/2.0", upstream: "http://127.0.0.1:6787/apps", host: "my.domain", referrer: "https://my.domain/yunohost/admin/"
2022/08/14 21:59:45 [error] 263193#263193: *2105 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain", referrer: "https://my.domain/yunohost/sso/portal.html"
2022/08/14 22:00:17 [error] 263193#263193: *2105 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain", referrer: "https://my.domain/yunohost/admin/"
2022/08/14 22:00:51 [error] 263193#263193: *2105 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain", referrer: "https://my.domain/yunohost/admin/"
2022/08/14 22:35:01 [error] 263193#263193: *2149 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain", referrer: "https://my.domain/yunohost/sso/portal.html"
2022/08/14 23:11:57 [error] 263193#263193: *2167 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/admin HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/admin", host: "my.domain"
2022/08/14 23:12:07 [error] 263193#263193: *2167 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain"
2022/08/14 23:12:28 [error] 263193#263193: *2167 connect() failed (111: Connection refused) while connecting to upstream, client: 124.188.230.84, server: my.domain, request: "GET /vaultwarden/ HTTP/2.0", upstream: "http://127.0.0.1:8095/vaultwarden/", host: "my.domain", referrer: "https://my.domain/yunohost/sso/"

To me this suggests a port connection issue? Do I need to open this port in the firewall? I feel that’s something that would either be done by the install process or documented somewhere if it was required.

I’d be grateful for any suggestions about what I can do to get this working.

Please share the logs of the Vaultwarden service.

Thanks for your reply.

There is no Vaultwarden service on my admin / Services page.

I guess that’s the cause of my problem, but why has the service not been installed?

Then please share the installation log. :slight_smile:

Here is the log paste:
https://paste.yunohost.org/raw/idazanozos

Many thanks

It looks like the log suddenly stops. My guess is that the server ran out of memory during the installation and killed the install process. Remove the app, stop some app services, and try the installation again.

1 Like

Thank you for your reply.

I am able to temporarily increase my VPS RAM. Do you know how much memory the installation process requires for this app?

Many thanks,

I personally have 2GB of RAM and 2GB of swap on my VPS where I managed to install Vaultwarden. :wink:

1 Like

Thanks again for the info.

Today I increased the RAM on my VPS from 2GB to 4GB (no swap option on my configuration) and the VaultWarden installation completed successfully.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.