Couldn't acquire exclusive lock on DB at '/eventstore/db'

Hi, 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.

I think it was discussed before. The server executable often produces a warning “Couldn’t acquire exclusive lock on DB” when it shuts down after not being able to start. The real issue is mentioned in the log before this message. Most often it’s an issue with certificates if you don’t run it in insecure mode.

Hello, thanks for your answer.

It’s seems that it’s related to the config not the certificate … yet I can’t find what is wrong :

# 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

Can you make sure that the Event Store service is stopped before you run eventstored --what-if?

Hi thanks for your tips it worked but … now i want to access atomPub, I changed my settings to enable it :

EnableExternalTcp: true
EnableAtomPubOverHTTP: true

And I restarted my service, yet when I navigate to my ip or my domain name with 2113 port, it doesn’t work with a “[ip address] didn’t send any data” error, as if the service wasn’t up.

Yet systemctl status eventstore tells me that the service is active.

Seems like it works now ! thanks for your helps guyz