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

Update doesnt work anymore #207

Open
domi-cloud opened this issue Sep 4, 2024 · 12 comments
Open

Update doesnt work anymore #207

domi-cloud opened this issue Sep 4, 2024 · 12 comments

Comments

@domi-cloud
Copy link

Hello,
can someone help me here please?
I'm getting this error-message when I am executing the update script:

ERROR: Version mismatch: file /opt/bitwarden/bwdata/docker/docker-compose.yml specifies version 1 but extension file /opt/bitwarden/bwdata/docker/docker-compose.override.yml uses version 3.0

@codefreak558
Copy link

For that you can either just ignore is or in the docker-compose.override.yml remove the version 3.0 at the top.

Also if your bitwarden doesn't start up I found that downgrading bitwarden by setting the version to 2024.8.0 in both BitBetter's build.sh file and your bitwarden.sh file. Then pull both and start bitwarden and it should work.

It seems there might be a bug in 2024.8.1 where SSO and Admin are not able to connect to the mssql container.

And then finnaly update the Dockerfile as follows

ARG BITWARDEN_TAG=latest
FROM ${BITWARDEN_TAG}

COPY bin/Release/net8.0/publish/* /bitBetter/
COPY ./.keys/cert.cert /newLicensing.cer

RUN set -e; set -x; \
    dotnet /bitBetter/bitBetter.dll && \
    mv /app/Core.dll /app/Core.orig.dll && \
    mv /app/modified.dll /app/Core.dll && \
    rm -rf /bitBetter && rm -rf /newLicensing.cer

@domi-cloud
Copy link
Author

For that you can either just ignore is or in the docker-compose.override.yml remove the version 3.0 at the top.

Also if your bitwarden doesn't start up I found that downgrading bitwarden by setting the version to 2024.8.0 in both BitBetter's build.sh file and your bitwarden.sh file. Then pull both and start bitwarden and it should work.

It seems there might be a bug in 2024.8.1 where SSO and Admin are not able to connect to the mssql container.

And then finnaly update the Dockerfile as follows

ARG BITWARDEN_TAG=latest
FROM ${BITWARDEN_TAG}

COPY bin/Release/net8.0/publish/* /bitBetter/
COPY ./.keys/cert.cert /newLicensing.cer

RUN set -e; set -x; \
    dotnet /bitBetter/bitBetter.dll && \
    mv /app/Core.dll /app/Core.orig.dll && \
    mv /app/modified.dll /app/Core.dll && \
    rm -rf /bitBetter && rm -rf /newLicensing.cer

Hi Aidan,
so grateful for your response, but what do you mean with "pull both" after setting the version attributes manually?
And the version attributes in the bitwarden.sh file are coreversion and webversion?
Thanks for reply

@codefreak558
Copy link

After I had changed the versions to 2024.8.0 I ran the build for BitBetter and then started up bitwarden in my installation folder so that it would pull the older version.

For the bitwarden.sh file I only changed the server to 2024.8.0 and left the other two version as they were as they worked.

@domi-cloud
Copy link
Author

After I had changed the versions to 2024.8.0 I ran the build for BitBetter and then started up bitwarden in my installation folder so that it would pull the older version.

For the bitwarden.sh file I only changed the server to 2024.8.0 and left the other two version as they were as they worked.

So i will set COREVERSION to 2024.8.0 in the bitwarden.sh file, BW_VERSION to 2024.8.0 in the build.sh file, then run the build script, start bitwarden and finally update the docker file while bitwarden is running?

@codefreak558
Copy link

That should work, I would make a backup of your bitwarden installation folder just as an incase but it should work as that is what I did and that had worked for me.

@domi-cloud
Copy link
Author

That should work, I would make a backup of your bitwarden installation folder just as an incase but it should work as that is what I did and that had worked for me.

Starting bitwarden after setting the variables and executing the build script, produces the following output:

| |__ () |__ ____ _ _ __ | | ___ _ __
| ' | | \ \ /\ / / | '__/ _ |/ _ \ '
| |) | | | \ V V / (| | | | (| | / | | |
|
./||_| // ,|| ,||| ||

Open source password management solutions
Copyright 2015-2024, 8bit Solutions LLC
https://bitwarden.com/, https://github.com/bitwarden

===================================================

WARNING: This script is running as the root user!
If you are running a standard deployment this script should be running as a dedicated Bitwarden User as per the documentation.
Do you still want to continue? (y/n): y
Continuing....
bitwarden.sh version 2024.8.0
Docker version 24.0.7, build 24.0.7-0ubuntu2~20.04.1
docker-compose version 1.25.0, build unknown

Pulling api (bitbetter/api:2024.1.0)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]
ERROR: pull access denied for bitbetter/api, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

@codefreak558
Copy link

Let me upload some screenshots on how I did the build's and what not

build.sh
image
image
/opt/bitwarden/bwdata/docker/docker.compose.override.yml
image

bitwarden.sh
image
Then after changing that I ran ./bitwarden.sh start after deleting the original bitwarden images from docker via portainer so that it would pull the new images and that worked fine

Hope that helps

@GieltjE
Copy link
Contributor

GieltjE commented Nov 1, 2024

Probably fixed with pull request #213

@domi-cloud
Copy link
Author

Probably fixed with pull request #213

Hi GieltjE,
so how is the procedure now?
Thank you

@codefreak558
Copy link

@domi-cloud I have just myself done a update and it does work.

What I did was redownload the github repo just by doing a git clone and then run the ./build.sh to build the two bitbetter container images. Once that was done I ran the ./update-bitwarden.sh and just let that run like normal and then it worked.

I have yet to test creating new license keys however I can assume that they still work as my features that require the license keys did not get disabled.

@codefreak558
Copy link

Did get a email from my self hosted instance that my license had expired however as I had already made a organization it didn't affect me however when I went to try and build the licenseGen application I got the following error:
image

@codefreak558
Copy link

It looks like once you update your bitbetter image for me I had to go and regenerate the license key's for my organizations as well as users who were not in a organization.

Your best bet is to look pull request #215 as I did a small change to the dockerfile so that you can actually build the image.

GieltjE added a commit to GieltjE/BitBetter that referenced this issue Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants