bitwarden / self-host

Bitwarden's self-hosted release repository
GNU General Public License v3.0
307 stars 54 forks source link

bitwarden.sh update - 2024.2.2 - Value cannot be null #217

Open git-tec opened 4 months ago

git-tec commented 4 months ago

After starting the bitwarden.sh update for 2024.2.2 it ends with

Total reclaimed space: 2.449GB Pausing 60 seconds for database to come online. Please wait... 2024.2.2: Pulling from bitwarden/setup Digest: sha256:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX Status: Image is up to date for bitwarden/setup:2024.2.2 docker.io/bitwarden/setup:2024.2.2

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'logger') at System.ThrowHelper.Throw(String paramName) at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args) at Microsoft.Extensions.Logging.LoggerExtensions.LogInformation(ILogger logger, String message, Object[] args) at Bit.Migrator.DbMigrator.MigrateMsSqlDatabaseWithRetries(Boolean enableLogging, Boolean repeatable, String folderName, CancellationToken cancellationToken) in /home/runner/work/server/server/util/Migrator/DbMigrator.cs:line 46 at Bit.Setup.Program.MigrateDatabase(Int32 attempt) in /home/runner/work/server/server/util/Setup/Program.cs:line 194 at Bit.Setup.Program.Update() in /home/runner/work/server/server/util/Setup/Program.cs:line 158 at Bit.Setup.Program.Main(String[] args) in /home/runner/work/server/server/util/Setup/Program.cs:line 56

anyone with the same error? However, Bitwarden seems to be running in version 2024.2.2

vinnyperella commented 4 months ago

I received the same error after upgrading to 2024.2.1 however the mssql container appeared to start without issue. I was also having issues with my nginx container starting that seems to be intermittent it was complaining about an entry in default.conf.

DimebagCFH commented 4 months ago

Experiencing the same issue @git-tec

jtodddd commented 4 months ago

Hi there,

This has been escalated for further investigation. If you have more information that can help us, please add it below.

Thanks!

nickjossy commented 4 months ago

Just noticed the same error. When I login to the admin portal it says I'm on an old version of both the server and the web: image If I try the update process again it says "Update not needed".

Problem is that my organisation licence has expired, but I can't apply the new licence as it says "Version 14 is not supported"

nickjossy commented 4 months ago

Ok - ignore my earlier post about the version being old. I have two instances and was looking at the wrong one. Doh!

However, after updating the in-use instance and then attempting to disable the old instance in Docker I came across what might be the source of the "Value cannot be Null" error. If you look at the docker settings for the bitwarden-admin container the globalSettingssyslogdestination field appears to be empty and it requires a value. This is preventing me making changes to the container - e.g. to make sure it stays shutdown!

image

Hope this helps!

sincerelysaucy commented 4 months ago

Check your diskspace? The upgrade command can leave a lot of debris, especially if an update failed. And "/var/lib/docker/" can wind up overwhelmed by other content in the "/var/" partition, especially "/var/log/" if you've not left enough space in the relevant partition. auditd, in particular, tends to spew logs with docker running.

vinnyperella commented 3 months ago

This error was unrelated to disk space I have plent of space available on my VPS. I've upgraded a few times since encountering this error and have not seen it since.

vinnyperella commented 3 months ago

I received the error again after updating to 2024.03.0.

Total reclaimed space: 2.713GB
Pausing 60 seconds for database to come online. Please wait...
2024.3.0: Pulling from bitwarden/setup
Digest: sha256:e562d637dbff73b19fdbbd429a2322e405f4dd530273140b9693eea9d673587e
Status: Image is up to date for bitwarden/setup:2024.3.0
docker.io/bitwarden/setup:2024.3.0
WARN[0000] /opt/bitwarden/bwdata/docker/docker-compose.yml: `version` is obsolete 

Unhandled exception. System.ArgumentNullException: Value cannot be null. (Parameter 'logger')
   at System.ThrowHelper.Throw(String paramName)
   at Microsoft.Extensions.Logging.LoggerExtensions.Log(ILogger logger, LogLevel logLevel, EventId eventId, Exception exception, String message, Object[] args)
   at Microsoft.Extensions.Logging.LoggerExtensions.LogInformation(ILogger logger, String message, Object[] args)
   at Bit.Migrator.DbMigrator.MigrateMsSqlDatabaseWithRetries(Boolean enableLogging, Boolean repeatable, String folderName, CancellationToken cancellationToken) in /home/runner/work/server/server/util/Migrator/DbMigrator.cs:line 46
   at Bit.Setup.Program.MigrateDatabase(Int32 attempt) in /home/runner/work/server/server/util/Setup/Program.cs:line 194
   at Bit.Setup.Program.Update() in /home/runner/work/server/server/util/Setup/Program.cs:line 158
   at Bit.Setup.Program.Main(String[] args) in /home/runner/work/server/server/util/Setup/Program.cs:line 56

However, just like last time the mssql container started successfully.