Couldn’t acquire exclusive lock on DB at ‘/eventstore/db’

267 Views Asked by At

I’m trying to install eventstore on ubuntu 20.04 but everytime I run evenstored --what-if (as root or as simple user, or as sudo) I get the following error message : Couldn't acquire exclusive lock on DB at '/eventstore/db'..

I tried many things :

  • I tried ensuring that eventstore user and group were owner of the folder.
  • reinstalling eventstore
  • rebooting server
  • stop process with systemctl stop eventstore and starting it back again I also tried launching service first (as root / sudo or simple user) before using eventstored --what-if.

I can’t figure out why I keep getting this message as if many instance of eventstore where launched at the same time.


EDIT :

Here is my config file (/etc/eventstore/eventstore.conf)

# Paths
Db: /eventstore/db
Index: /eventstore/index
Log: /eventstore/logs

# Certificates configuration
CertificateFile: /etc/eventstore/certs/cert.crt
CertificatePrivateKeyFile: /etc/eventstore/certs/privkey.key
TrustedRootCertificatesPath: /etc/ssl/certs
CertificateReservedNodeCommonName: "*.mathob-jehanno.com"
# Network configuration
IntIp: 37.187.2.103
ExtIp: 37.187.2.103
IntHostAdvertiseAs: mathob-jehanno.com
ExtHostAdvertiseAs: mathob-jehanno.com
HttpPort: 2113
IntTcpPort: 1112
EnableExternalTcp: false
EnableAtomPubOverHTTP: false

# Projections configuration
RunProjections: None
2

There are 2 best solutions below

0
On BEST ANSWER

Ok so

First of all, comments helped a lot :

this error message is following another one which give more detail about what the problem is.

One thing to know is that eventstored --what-if is supposed to be run while service is not running so user need to stop the service before (systemctl stop eventstore).

I then changed the path to db, index and logs file to match the default value (it prevented me some permissions error).

0
On

It happened to me previously. I was running v20 without supplying the necessary settings like the certificates were missing. The server crashed because of this, but the last message you see is this Couldn't acquire exclusive lock on DB at '/eventstore/db'. You might look close and see if it's a warning, and the real reason for the crash is mentioned earlier in the stack trace of the original error.