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

cannot acquire lock: Lock FcntlFlock of {location}/.ipfs/repo.lock failed: operation not supported #1507

Closed
EricLScace opened this issue May 16, 2020 · 7 comments
Labels
area/experiments Issues related to opt-in features and experiments disabled by default area/macos MacOS need/author-input Needs input from the original author

Comments

@EricLScace
Copy link

EricLScace commented May 16, 2020

  • Mac OS X Catalina v10.15.4
  • Version of IPFS Desktop 0.11.2

Describe the bug
Fails at startup. Fails again when restart attempted.

To Reproduce
0. Install clean version. Works fine with IPFS volume mounted on local storage.

  1. Move volume to a NAS, using the utility within IPFS Desktop. In my case, it's a Drobo 5N2 share. A .ipfs folder is viewable in the share after the IPFS volume move was performed.

  2. IPFS restarts but immediately errors out. Error.log attached.
    error.log

Note: At this point the volume cannot be moved back to its original location.

Expected behavior
Expected

Screenshots
image

Additional context
config.json contains:

{
	"ipfsConfig": {
		"type": "go",
		"path": "/Volumes/IPFS-Eric/.ipfs",
		"flags": [
			"--migrate",
			"--enable-gc",
			"--routing",
			"dhtclient"
		],
		"keysize": 2048
	},
	"language": "en-US",
	"experiments": {
		"npmOnIpfs": false
	},
	"__internal__": {
		"migrations": {
			"version": "5.1.1"
		}
	},
	"openWebUIAtLaunch": false,
	"ipfsOnPath": true,
	"checkedCorsConfig": true
}

The path is correct.

CLI command ipfs config show returns:

{
  "API": {
    "HTTPHeaders": {}
  },
  "Addresses": {
    "API": "/ip4/127.0.0.1/tcp/5001",
    "Announce": [],
    "Gateway": "/ip4/127.0.0.1/tcp/8080",
    "NoAnnounce": [],
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4001",
      "/ip6/::/tcp/4001"
    ]
  },
  "AutoNAT": {},
  "Bootstrap": [
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb",
    "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt",
    "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
  ],
  "Datastore": {
    "BloomFilterSize": 0,
    "GCPeriod": "1h",
    "HashOnRead": false,
    "Spec": {
      "mounts": [
        {
          "child": {
            "path": "blocks",
            "shardFunc": "/repo/flatfs/shard/v1/next-to-last/2",
            "sync": true,
            "type": "flatfs"
          },
          "mountpoint": "/blocks",
          "prefix": "flatfs.datastore",
          "type": "measure"
        },
        {
          "child": {
            "compression": "none",
            "path": "datastore",
            "type": "levelds"
          },
          "mountpoint": "/",
          "prefix": "leveldb.datastore",
          "type": "measure"
        }
      ],
      "type": "mount"
    },
    "StorageGCWatermark": 90,
    "StorageMax": "10GB"
  },
  "Discovery": {
    "MDNS": {
      "Enabled": true,
      "Interval": 10,
      "enabled": true
    }
  },
  "Experimental": {
    "FilestoreEnabled": false,
    "GraphsyncEnabled": false,
    "Libp2pStreamMounting": false,
    "P2pHttpProxy": false,
    "QUIC": false,
    "ShardingEnabled": false,
    "StrategicProviding": false,
    "UrlstoreEnabled": false
  },
  "Gateway": {
    "APICommands": [],
    "HTTPHeaders": {
      "Access-Control-Allow-Headers": [
        "X-Requested-With",
        "Range",
        "User-Agent"
      ],
      "Access-Control-Allow-Methods": [
        "GET"
      ],
      "Access-Control-Allow-Origin": [
        "*"
      ]
    },
    "NoDNSLink": false,
    "NoFetch": false,
    "PathPrefixes": [],
    "PublicGateways": null,
    "RootRedirect": "",
    "Writable": false
  },
  "Identity": {
    "PeerID": "QmZE8vd6jUt8bmduEK6jBE6vGvEN5rzUNt8D39H92oWJmU"
  },
  "Ipns": {
    "RecordLifetime": "",
    "RepublishPeriod": "",
    "ResolveCacheSize": 128
  },
  "Mounts": {
    "FuseAllowOther": false,
    "IPFS": "/ipfs",
    "IPNS": "/ipns"
  },
  "Plugins": {
    "Plugins": null
  },
  "Provider": {
    "Strategy": ""
  },
  "Pubsub": {
    "DisableSigning": false,
    "Router": "",
    "StrictSignatureVerification": false
  },
  "Reprovider": {
    "Interval": "12h",
    "Strategy": "all"
  },
  "Routing": {
    "Type": "dht"
  },
  "Swarm": {
    "AddrFilters": null,
    "ConnMgr": {
      "GracePeriod": "300s",
      "HighWater": 300,
      "LowWater": 50,
      "Type": "basic"
    },
    "DisableBandwidthMetrics": false,
    "DisableNatPortMap": false,
    "DisableRelay": false,
    "EnableAutoRelay": false,
    "EnableRelayHop": false
  }
}

There is no Datastore.Path entry, although some documentation suggests there should be one. I don't know if that's relevant/helpful.

@EricLScace EricLScace added the need/triage Needs initial labeling and prioritization label May 16, 2020
@rafaelramalho19
Copy link
Contributor

Thank you for providing such a detailed issue.

My first suspection is related to permissions. Can you please tell me what are the read & write permissions you have set up for your NAS mount?

@lidel
Copy link
Member

lidel commented May 18, 2020

I suspect the problem may be due to the protocol used for mounting NAS on macOS.

Drobo docs suggest they can use AFP or SMB

  • First step is to figure out which one is used – @EricLScace do you know?
  • Then, look for protocol-specific fix for file locking
    • perhaps locks are held per app (AFP?) and can be cleared by a dedicated command etc (I am not familiar, just guessing – this needs more research)
  • it is also possible the protocol/ipfs-desktop combo does not support locking, then the only option is to manually move repo location back and update ipfsConfig / path in config.json

@lidel lidel added the need/author-input Needs input from the original author label May 18, 2020
@EricLScace
Copy link
Author

EricLScace commented May 18, 2020 via email

@EricLScace
Copy link
Author

EricLScace commented May 18, 2020 via email

@lidel lidel added area/experiments Issues related to opt-in features and experiments disabled by default area/macos MacOS labels Oct 12, 2020
@tmladek
Copy link

tmladek commented Dec 23, 2020

Yup, having the same issue, also with the repo being on a SMB share.

I can read, create, delete, remove and files all fine, the permissions are all correct - is there something else that fs-repo-migrations is doing?

@jessicaschilling
Copy link
Contributor

@tmladek - as some core team members are away for winter holidays, I'd suggest checking and/or asking in the forums at discuss.ipfs.io to see if other folks in the larger community using NAS have experienced similar, or solved. Thanks!

@hsanjuan
Copy link

A discussion about this problem has been started here: https://discuss.ipfs.io/t/error-cannot-acquire-lock-lock-fcntlflock-of-path-to-repo-repo-lock-failed-operation-not-supported/10620/3

This is not an ipfs-desktop issue per se, and it has yet another duplicate here: ipfs/kubo#8005. Thus, closing.

@lidel lidel removed the need/triage Needs initial labeling and prioritization label May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/experiments Issues related to opt-in features and experiments disabled by default area/macos MacOS need/author-input Needs input from the original author
Projects
None yet
Development

No branches or pull requests

6 participants