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

The file is locked: nio:/data/sql/mc.mv.db using persistent storage #93

Open
ghost opened this issue Sep 13, 2021 · 4 comments
Open

The file is locked: nio:/data/sql/mc.mv.db using persistent storage #93

ghost opened this issue Sep 13, 2021 · 4 comments

Comments

@ghost
Copy link

ghost commented Sep 13, 2021

The management center is not able to start, when it's running with persistent storage since is not able to connect to the DB with the following error

Caused by: java.lang.IllegalStateException: The file is locked: nio:/data/sql/mc.mv.db [1.4.197/7]

since /data is mounted via persistent storage like EFS. Should the connection string avoid this? like

<property name="connection.url">jdbc:h2:./data/contactmgr;DB_CLOSE_ON_EXIT=TRUE;FILE_LOCK=NO</property>

@emre-aydin
Copy link
Contributor

Hi, it seems like Management Center was not able to unlock this file while shutting down. Normally this is not the case and there's no need to disable file_lock. What is your Management Center version and how do you shutdown the container that's running Management Center? Does it happen any time you shut down Management Center?

@ghost
Copy link
Author

ghost commented Sep 14, 2021

@emre-aydin the version I'm used is 4.2021.06, it happened on ECS, when Terraform destroyed the service to recreate it with some other things, so when the service is destroyed, probably management center is not stopped properly. What could I do in those cases?

@emre-aydin
Copy link
Contributor

For the moment, I can't think of anything other than removing the file manually. It sounds like something that could happen often in cloud deployment scenarios. I will file an internal issue for this and update this issue when there are updates. 5.0 release is very close, so it will be fixed in 5.1.

@emre-aydin
Copy link
Contributor

One solution might be to check whether you could somehow configure ECS, Terraform or the container you run MC on to gracefully shutdown.

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

1 participant