daedalus: Cannot start 4.5.0 - DbLocked

EDIT: Here is the workaround for people finding this on Google:

As a workaround, you can do the following (every time you start Daedalus):

Open the file %appdata%\Daedalus Mainnet\config.json in an editor. (Maybe create a backup first.) Find the line that contains mainnet-PREVIOUS-CARDANO-PID and delete it. If this was the last line in the file before the final }, delete the comma at the end of the previous line as well. Then start Daedalus and it will work one time.


I got an update from 4.4.1 to 4.5.0 today.

After the update, I can no longer start Daedalus. It goes in a cycle of “Connecting to network”, “Stopping cardano node”, “Cardano node crashed”.

node.log shows that it keeps crashing with the DbLocked error:

DbLocked "C:\\Users\\david\\AppData\\Roaming\\Daedalus Mainnet\\chain\\lock"

cardano-node: The db is used by another process. File "C:\Users\david\AppData\Roaming\Daedalus Mainnet\chain\lock" is locked

At this point, there are always two instances of cardano-node.exe running - one using 4 GB of RAM, and one that runs, crashed, gets restarted, etc.

I already tried several times to close Daedalus, make sure no cardano-node.exe process runs, deleted the lockfile is existing, etc. - but again, when I start Daedalus, it starts again two instances, with the second one obviously failing.

image

What can I do to fix this?

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 2
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hi @CherryDT thank you so much for the PR.

It is a long story, originally another problem related to how do we start cardano-node implemented here caused this race condition. Your code definitely solves one side of the puzzle, that is why we will provide a complete fix very soon!

Thank you for your time and your suggestions!

On that note, I looked at the log files now because if you hadn’t said now that you received it, I would have removed anything problematic and then posted here, but I discovered that there is problematic information in wallet-migration-report.json. It showed names of wallets. In this case only one old one which has my public nickname as name, but still. (I have another Daedalus installation elsewhere where this would have been a problem.)