Search code examples
ubuntu-20.04eventstoredb

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


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

Solution

  • 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).