Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to spin up unified deployment (container image broken?) #2948

Closed
1 task done
Tracked by #2480
skether opened this issue May 20, 2023 · 3 comments
Closed
1 task done
Tracked by #2480

Unable to spin up unified deployment (container image broken?) #2948

skether opened this issue May 20, 2023 · 3 comments
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment

Comments

@skether
Copy link

skether commented May 20, 2023

Steps To Reproduce

  1. Create an environment variables file with the following content:
BW_DOMAIN=test.bitwarden.example.com

BW_INSTALLATION_ID=<id>
BW_INSTALLATION_KEY=<key>

BW_PORT_HTTP=8080
BW_PORT_HTTPS=8443

BW_DB_PROVIDER=sqlite

BW_ENABLE_SSL=False

BW_ENABLE_ADMIN=True
BW_ENABLE_API=True
BW_ENABLE_EVENTS=False
BW_ENABLE_ICONS=True
BW_ICONS_PROXY_TO_CLOUD=False
BW_ENABLE_IDENTITY=True
BW_ENABLE_NOTIFICATIONS=True
BW_ENABLE_SCIM=False
BW_ENABLE_SSO=False

[email protected]
globalSettings__mail__smtp__host=smtp.gmail.com
globalSettings__mail__smtp__port=587
globalSettings__mail__smtp__ssl=False
globalSettings__mail__smtp__username=<username>
globalSettings__mail__smtp__password=<password>

adminSettings__admins=<email-address>
  1. Start the container in docker with the following command:
    docker run -d --env-file ./env-sqlite -p8080:8080 docker.io/bitwarden/self-host:beta
  2. Access the site locally using 127.0.0.1:8080.

Expected Result

Working Bitwarden installation. Being able to register new users and start using the site.

Actual Result

Accessing 127.0.0.1:8080 loads up the UI as expected. According to the version marker at the bottom of the page, it is 2023.4.0.
However, when trying to create a new account it fails with the following error dialog.
image
Trying to log in also fails.
image
Taking a look at the network tab in the dev tools also indicates that every request to an API endpoint fails with a 404 error.
image

Having a look at /var/log/nginx/error.log in the container it has the following output:

2023/05/20 09:02:35 [error] 90#90: *21 open() "/app/Web/identity/accounts/register" failed (2: No such file or directory), client: 172.17.0.1, server: test.bitwarden.example.com, request: "POST /identity/accounts/register HTTP/1.1", host: "127.0.0.1:8080", referrer: "http://127.0.0.1:8080/"
2023/05/20 09:03:15 [error] 90#90: *23 open() "/app/Web/api/devices/knowndevice" failed (2: No such file or directory), client: 172.17.0.1, server: test.bitwarden.example.com, request: "GET /api/devices/knowndevice HTTP/1.1", host: "127.0.0.1:8080", referrer: "http://127.0.0.1:8080/"
2023/05/20 09:03:19 [error] 90#90: *23 open() "/app/Web/identity/accounts/prelogin" failed (2: No such file or directory), client: 172.17.0.1, server: test.bitwarden.example.com, request: "POST /identity/accounts/prelogin HTTP/1.1", host: "127.0.0.1:8080", referrer: "http://127.0.0.1:8080/"
2023/05/20 09:09:14 [error] 90#90: *25 open() "/app/Web/api/config" failed (2: No such file or directory), client: 172.17.0.1, server: test.bitwarden.example.com, request: "GET /api/config HTTP/1.1", host: "127.0.0.1:8080"

This seems to suggest a possible packaging error or nginx misconfiguration?

Screenshots or Videos

No response

Additional Context

This problem seems to have existed for some time. I originally run into this when I tried to upgrade my unified setup in the middle of February, which is still running on 2022.11.2.
This problem however is also reproducible with a completely new setup without any preexisting data.
The image used was pulled during the writing of this issue and according to the pull command has the following hash:
sha256:9c6ef1fc1d4587ab35d8effa3e2d11d5d619e848cd2223508ced2a7390533a40

Githash Version

404 - Error

Environment Details

Tested on Windows 10/Docker WSL, also on Ubuntu/Kubernetes.

Database Image

sqlite

Issue-Link

#2480

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@skether skether added bug bw-unified-deploy An Issue related to Bitwarden unified deployment labels May 20, 2023
@djchateau
Copy link

Hey there,

I am unable to reproduce this issue, it has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

@justindbaur
Copy link
Member

Can you switch using true and false (all lowercase) for all your BW_ENABLE_ settings. We are comparing against "true" to turn on the services so I think it's thinking you don't want any services on.

@skether
Copy link
Author

skether commented May 31, 2023

I changed to lowercase booleans and it's now working fine with the current beta version.
It seems when I set up my original version these were not implemented yet.
Thank you @justindbaur for the help!

@skether skether closed this as completed May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bw-unified-deploy An Issue related to Bitwarden unified deployment
Projects
None yet
Development

No branches or pull requests

3 participants