Errors in log
[panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "database is locked")': src/db/mod.rs:275
When I changed ENABLE_DB_WAL=false, then first WARN is x14 times
[2020-10-26 19:27:40.192][bitwarden_rs::util][WARN] Can't connect to database, retrying: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
[2020-10-26 19:27:41.294][bitwarden_rs][ERROR] Error creating database pool: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
When I checked Azure File Share, there are RSA keys, icon_cache folder, and 0 bytes db.sqlite3 file.
Added next settings:
LOG_FILE=/data/bitwarden.log
LOG_LEVEL=trace
EXTENDED_LOGGING=true
but the only difference is that I have 14x WARN + 1x ERROR in this file.
Do you have an idea of how to make this work?
Relevant logs
Originally created by @cysieks on GitHub (Oct 26, 2020).
### Subject of the issue
I installed a fresh bitwarden docker image in Azure App Service. Attached Azure File Share as /data.
The problem is that it's not starting at all.
### Your environment
* Bitwarden_rs version:
Docker image bitwardenrs/server:latest
### Steps to reproduce
Started as Web App Service
### Expected behaviour
The application should start normally.
### Actual behaviour
Errors in log
[panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "database is locked")': src/db/mod.rs:275
When I changed ENABLE_DB_WAL=false, then first WARN is x14 times
[2020-10-26 19:27:40.192][bitwarden_rs::util][WARN] Can't connect to database, retrying: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
[2020-10-26 19:27:41.294][bitwarden_rs][ERROR] Error creating database pool: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
When I checked Azure File Share, there are RSA keys, icon_cache folder, and 0 bytes db.sqlite3 file.
Added next settings:
LOG_FILE=/data/bitwarden.log
LOG_LEVEL=trace
EXTENDED_LOGGING=true
but the only difference is that I have 14x WARN + 1x ERROR in this file.
Do you have an idea of how to make this work?
### Relevant logs
<!-- Share some logfiles, screenshots or output of relevant programs with us. -->
Be sure to delete the already created db.sqlite before you start again with the WAL set to false, since this is something which will be set during creation of the file.
@BlackDex commented on GitHub (Oct 26, 2020):
Hello @cysieks,
Azure is using a Samba (Smab/CIFS) shared volume which can't handle locking that well.
On Azure you are better of using either a MySQL or Postgresql based database.
You could try to disable WAL for Sqlite which maybe solves your problem. For this you need to set `ENABLE_DB_WAL=false` https://github.com/dani-garcia/bitwarden_rs/blob/ec920b5756fdae0b64edde328f634fbe2cd92ac0/.env.template#L87
Be sure to delete the already created db.sqlite before you start again with the WAL set to false, since this is something which will be set during creation of the file.
Tomorrow I'm going to test mysql version, but I was hoping to keep it much simpler.
@cysieks commented on GitHub (Oct 26, 2020):
Already checked that and no luck.
Tomorrow I'm going to test mysql version, but I was hoping to keep it much simpler.
Since you can not change the mountpoint options at azure this will not work very well, this is unfortunately not something we can fix.
@BlackDex commented on GitHub (Oct 26, 2020):
Since you can not change the mountpoint options at azure this will not work very well, this is unfortunately not something we can fix.
Strange thing is, that it worked about a year ago when Azure Blob was an option for mounting point.
Right now all files are created/amended properly (like log file), except the database file. So it looks like it's sqllite handling issue.
Thanks
@cysieks commented on GitHub (Oct 26, 2020):
What mount point options should be changed?
Strange thing is, that it worked about a year ago when Azure Blob was an option for mounting point.
Right now all files are created/amended properly (like log file), except the database file. So it looks like it's sqllite handling issue.
Thanks
Closing this issue because it's not something we can fix on our side.
Also, if you want to discuss this further i suggest to use the forum: https://bitwardenrs.discourse.group/
@BlackDex commented on GitHub (Nov 18, 2020):
Closing this issue because it's not something we can fix on our side.
Also, if you want to discuss this further i suggest to use the forum: https://bitwardenrs.discourse.group/
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @cysieks on GitHub (Oct 26, 2020).
Subject of the issue
I installed a fresh bitwarden docker image in Azure App Service. Attached Azure File Share as /data.
The problem is that it's not starting at all.
Your environment
Docker image bitwardenrs/server:latest
Steps to reproduce
Started as Web App Service
Expected behaviour
The application should start normally.
Actual behaviour
Errors in log
[panic][ERROR] thread 'main' panicked at 'Failed to turn on WAL: DatabaseError(__Unknown, "database is locked")': src/db/mod.rs:275
When I changed ENABLE_DB_WAL=false, then first WARN is x14 times
[2020-10-26 19:27:40.192][bitwarden_rs::util][WARN] Can't connect to database, retrying: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
[2020-10-26 19:27:41.294][bitwarden_rs][ERROR] Error creating database pool: DieselMigError.
[CAUSE] QueryError(
DatabaseError(
__Unknown,
"database is locked",
),
)
When I checked Azure File Share, there are RSA keys, icon_cache folder, and 0 bytes db.sqlite3 file.
Added next settings:
LOG_FILE=/data/bitwarden.log
LOG_LEVEL=trace
EXTENDED_LOGGING=true
but the only difference is that I have 14x WARN + 1x ERROR in this file.
Do you have an idea of how to make this work?
Relevant logs
@BlackDex commented on GitHub (Oct 26, 2020):
Hello @cysieks,
Azure is using a Samba (Smab/CIFS) shared volume which can't handle locking that well.
On Azure you are better of using either a MySQL or Postgresql based database.
You could try to disable WAL for Sqlite which maybe solves your problem. For this you need to set
ENABLE_DB_WAL=falsehttps://github.com/dani-garcia/bitwarden_rs/blob/ec920b5756fdae0b64edde328f634fbe2cd92ac0/.env.template#L87Be sure to delete the already created db.sqlite before you start again with the WAL set to false, since this is something which will be set during creation of the file.
@cysieks commented on GitHub (Oct 26, 2020):
Already checked that and no luck.
Tomorrow I'm going to test mysql version, but I was hoping to keep it much simpler.
@BlackDex commented on GitHub (Oct 26, 2020):
Since you can not change the mountpoint options at azure this will not work very well, this is unfortunately not something we can fix.
@cysieks commented on GitHub (Oct 26, 2020):
What mount point options should be changed?
Strange thing is, that it worked about a year ago when Azure Blob was an option for mounting point.
Right now all files are created/amended properly (like log file), except the database file. So it looks like it's sqllite handling issue.
Thanks
@BlackDex commented on GitHub (Oct 26, 2020):
You should add nobrl with cifs.
Also, Azure Blobs is a bit different and thus worked.
@BlackDex commented on GitHub (Nov 18, 2020):
Closing this issue because it's not something we can fix on our side.
Also, if you want to discuss this further i suggest to use the forum: https://bitwardenrs.discourse.group/