Skip to content
New issue

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

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

Already on GitHub? # to your account

ipfs-cluster-service gives wrong error when no configuration initialized #373

Closed
2 tasks
victorb opened this issue Apr 7, 2018 · 4 comments
Closed
2 tasks
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@victorb
Copy link

victorb commented Apr 7, 2018

With no configuration setup and running ipfs-cluster-service gave me the following error:

$ ipfs-cluster-service
22:01:17.842 ERROR    service: could not obtain execution lock.  If no other process
is running, remove ~/path/to/lock, or make sure that the config folder is
writable for the user running ipfs-cluster.  Run with -d for more information
about the error lock.go:37
error acquiring execution lock: could not obtain execution lock

Following with the suggestion, I added -d to get more information and got:

$ ipfs-cluster-service -d
22:01:26.710  INFO    service: Initializing. For verbose output run with "-l debug". Please wait... main.go:442
22:01:26.710 DEBUG    service: checking lock lock.go:28
22:01:26.710 DEBUG    service: cannot acquire lock: Lock Create of /home/user/.ipfs-cluster/cluster.lock failed: open /home/user/.ipfs-cluster/cluster.lock: no such file or directory lock.go:31
22:01:26.710 ERROR    service: could not obtain execution lock.  If no other process
is running, remove ~/path/to/lock, or make sure that the config folder is
writable for the user running ipfs-cluster.  Run with -d for more information
about the error lock.go:37
error acquiring execution lock: could not obtain execution lock
22:01:26.710 DEBUG    service: locking not initialized, unlock is noop lock.go:48
  • ~/path/to/lock from the first error message is incorrect, seems to be a placeholder
  • The suggested reason for the error is incorrect, as ~/.ipfs-cluster does not exists at all, but ipfs-cluster-service doesn't check if the directory actually exists before checking if there is a cluster.lock file in there.
@victorb victorb added the kind/bug A bug in existing code (including security flaws) label Apr 7, 2018
@hsanjuan
Copy link
Collaborator

hsanjuan commented Apr 8, 2018 via email

@lanzafame
Copy link
Contributor

@victorbjelkholm @hsanjuan everyone happy for this to be closed?

@victorb
Copy link
Author

victorb commented May 8, 2018

Yup, seems to be much better now:

$ ipfs-cluster-service daemon
01:24:48.335  INFO    service: Initializing. For verbose output run with "-l debug". Please wait... app.go:485
01:24:48.335 ERROR    service: ipfs-cluster-service config hasn't been initialized.
Please run ipfs-cluster-service init lock.go:29
error acquiring execution lock: stat /home/user/.ipfs-cluster: no such file or directory

Thanks @lanzafame

@victorb victorb closed this as completed May 8, 2018
@hsanjuan hsanjuan mentioned this issue May 9, 2018
@hsanjuan
Copy link
Collaborator

hsanjuan commented May 9, 2018

Fixed in #370

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

3 participants