-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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 acquire lock: Lock FcntlFlock of /export/repo.lock failed: resource temporarily unavailable #6363
Comments
Hey @ninkisa. Is this problem occurring with the official docker image available at https://hub.docker.com/r/ipfs/go-ipfs/builds? Or are you making your own? And if you are can you point us to an image we can try? Thanks. |
Hi, yes I'm using the official docker image ipfs/go-ipfs. Originaly was running with v0.4.20, but decided to try with the latest release candidate v0.4.21-rc1 to see if there is difference. Running the container with and emtpy folder is working fine, but with the official repository failes with the above error. Any idea what to check or how to fix it? |
I'n attaching some output from the commands I tried |
This usually means that some other process still has the lock. Could you check
Could you post your config? ( |
Hello Sebastian, here is the output from lsof /path/to/repo/repo.lock / $ lsof /export/repo.lock I ran again 'ipfs repo fsck' and lsof after that: / $ lsof /export/repo.lock Here is the ipfs config |
According to that, IPFS is still running. |
Yes, it is running but is not responding $ipfs id 13:46:26.065 DEBUG cmd/ipfs: config path is /export main.go:139 How can I repaire it? |
Yesterday the same thing happened on another machine. First we removed the block folder to see if it will fix something, but no result. We had to delete the datastore folder and re-init the repository to make it work, but this is no solution as we have to add all files again to IPFS. |
Did you use Otherwise, is your IPFS repo on a networked drive? |
yes, we used "ipfs repo fsck", but it was after the daemon started failing with repo.lock failed: resource temporarily unavailable |
That's the error that's returned when:
We need to improve the error (#6434) but that would definitely explain why your datastore got corrupted. We should probably also make that command less dangerous (#6435). Can you reproduce this without running |
Closing as this looks like it isn't a bug (and I've filed a followup issue to make this command less dangerous in #6435). Feel free to continue debugging in the comments, we can reopen if this turns out to be an actual bug. Closing this just makes tracking open issues a bit easier. |
Version information:
ipfs version --all
go-ipfs version: 0.4.21-rc1-
Repo version: 7
System version: amd64/linux
Golang version: go1.12.5
Description:
We are using ipfs in a docker container. After restart of the container it started failing with:
ipfs id
Error: cannot acquire lock: Lock FcntlFlock of /export/repo.lock failed: resource temporarily unavailable
I tried to clean the lock files with
ipfs repo fsck
but it didn't fix itI tried also to manualy delete ~/.ipfs/datastore/LOCK and ~/.ipfs/repo.lock with the same result
The text was updated successfully, but these errors were encountered: