-
-
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
Add command to remove lock files #2457
Comments
|
I think that when starting IPFS, it should try to remove stale lock file, by searching if the a proccessus with the owner's PID exists, if it doesn't, then it should remove the |
Fixes ipfs#2457 License: MIT Signed-off-by: Mike Pfister <pfista@gmail.com>
Fixes ipfs#2457 License: MIT Signed-off-by: Mike Pfister <pfista@gmail.com>
* Adds repo fsck subcommand Fixes ipfs#2457 License: MIT Signed-off-by: Mike Pfister <pfista@gmail.com> * Checks for error on file deletion License: MIT Signed-off-by: Mike Pfister <pfista@gmail.com> * Checks if node is online License: MIT Signed-off-by: Mike Pfister <pfista@gmail.com> * Update error checking License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Prevents command from running while daemon is running License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Add newline to command output message License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * removing superfluous error License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Adds sharness test for repo fsck command License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Ignore warning if file doesn't exist License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Updating message output License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * adding debug statements License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * update and add fsck sharness tests License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * updating comments License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * Use printf in test Using printf prevents a newline from being printed to the api test file. When the newline was present, multiaddr threw errors trying to parse the api address to an integer since the newline character was present. License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * updating tests License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com> * removing commented code License: MIT Signed-off-by: Michael Pfister <pfista@gmail.com>
For the record, it's February 11, 2019 and I just experienced this issue. Removing BOTH of these files solved it:
|
You should never need to do this at this point. If you do, something is wrong. |
@sscheper which version of go-ipfs are you using? |
Ran into |
I really wouldn't do that. It no longer matters if the lockfile exists unless a go-ipfs daemon has the lockfile open and locked. That would mean that the daemon is running. Your second issue may be that ipfs is running but your IPFS node can't find and/or connect to it. I don't know what your exact setup is so I'm not sure why. If you'd like more help on this, please ask on https://discuss.ipfs.io. |
While running kubo IPFS on containers and network storage. I see that when a container is killed or fails, the lock files remains and prevent a new daemon from starting. |
yes ,i meet a same problem,should kill lock first? |
How to remove the lock file when using Docker? I try to override the entrypoint in the dockerfile to perform the My repo.lock file is still owned by root which shouldn't be the case. Also, can't we trap the SIGTERM signal and cleanup the lock file before shutting down? |
I've built my own I'd love some feedback. Dockerfile:
entrypoint.sh:
001-config.sh:
The locks files are removed in the It appears that my cluster has recovered and the The entrypoint also attempt to shut down ipfs gracefully if it receives a SIGTERM. This is useful if you're running your task on AWS Fargate SPOT where your tasks can be shutdown by AWS with a 2 min warning. |
We should have a command -
ipfs repo repair
oripfs repo fsck
- which removes lockfiles. See bug issue here.The text was updated successfully, but these errors were encountered: