Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Berkeley DB error: The je.lck file could not be locked

We are encountering the ff error when running a java program using a berkeley DB.

"The environment cannot be locked for single writer access. ENV_LOCKED: The je.lck file could not be locked. Environment is invalid and must be closed."

Any idea what is the cause of the error and how can we fixed this.

Thanks!

like image 794
mj527 Avatar asked Dec 23 '11 05:12

mj527


1 Answers

Your Berkeley DB is set up for "single writer access". You must have another process already writing to it and effectively locking it.

You should terminate the other process or processes and proceed. No idea if BerkeleyDB can be set up for multiple writer access, sorry.

PS - je.lck is a file in the file system that implements the lock. Deleting it might also free the DB for your process to access and revoke the other process' access.

like image 172
urig Avatar answered Oct 14 '22 16:10

urig