Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: Cannot obtain a lock on data directory #11038

Closed
midas717 opened this issue Aug 13, 2017 · 5 comments
Closed

error: Cannot obtain a lock on data directory #11038

midas717 opened this issue Aug 13, 2017 · 5 comments
Labels

Comments

@midas717
Copy link

midas717 commented Aug 13, 2017

This issue tracker is only for technical issues related to bitcoin-core.

General bitcoin questions and/or support requests and are best directed to the Bitcoin StackExchange.

For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/.

Describe the issue

Downloaded Bitcoin Core today. I told the program to use an extra hard drive on my computer that I rarely use but works (old laptop hard drive). It was taking forever to sync (est. time 20+ hours), so I shut it down for a bit to resume later.

When I tried to start the program again, I get the error "cannot obtain a lock on data directory L:\Bitcoin. Bitcoin Core is probably already running. Access is denied.."

So I restarted my computer and tried to start the program again and got the same error.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Click start menu -> Click Bitcoin Core shortcut

Expected behaviour

open program

Actual behaviour

error on startup loading screen

What version of bitcoin-core are you using?

0.14.2

Machine specs:

  • OS: Windows 7
  • CPU: Intel i5-4670k
  • RAM: DDR3 2x8gb
  • Disk size: 232 gb
  • Disk Type (HD/SDD): Laptop HD connected into a desktop
@achow101
Copy link
Member

Check that you don't already have Bitcoin Core already running. Look in task manager and see if you see any processes named bitcoin-qt or bitcoind.

@midas717
Copy link
Author

It wasn't running. In my post I wrote that I restarted my computer before trying again.

@janmande
Copy link

Bitcoin Core uses a file named ".lock" in the data directory to make sure only one instance is accessing it at the time. Your error message indicates that the Bitcoin Core is denied acces to this file which usually only happens if another instance is running.

If you are absolutley sure that no other Bitcoin Core process is running you could try to delete the .lock file before starting Bitcoin Core again. I assume you have backed up your wallet if it contains any coins before attempting this.

@fanquake fanquake closed this as completed Oct 7, 2017
@Mentors4EDU
Copy link

Deleting the lock file can fix it, and sometimes just running as sudo also will fix it if nothing else false. Same applies to SmartCash or other cryptos having that problem

@fortesp
Copy link

fortesp commented Mar 14, 2020

With me this happens when i try to put the ledger in a remote directory via SMB share. Even after deleting .lock file, every startup the same error displays. #Linux

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants