question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue
  • 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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
hsanjuancommented, Mar 26, 2021

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: https://github.com/ipfs/go-ipfs/issues/8005. Thus, closing.

0reactions
jessicaschillingcommented, Dec 23, 2020

@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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trouble running ipfs daemon - Stack Overflow
If the file repo.lock exists, it normally means that the IPFS daemon is already running. It could also be left over from an...
Read more >
Cannot acquire lock: Lock FcntlFlock of /data/ipfs-cluster ...
I get the same error. cannot acquire lock: Lock FcntlFlock of /data/ipfs-cluster/cluster.lock failed: resource temporarily unavailable. error ...
Read more >
npm-on-ipfs - Bountysource
I has become clear that ipfs-npm is unmaintained since the last commit is from June 2019, the latest release is still impossible to...
Read more >
Distributed lock cleanup ( ILock.destroy() ) - Google Groups
If thread 1 acquires distributed lock("foo"), thread 2 attempts to acquire and waits on lock("foo") because thread 1 has it locked, then thread...
Read more >
redis - Go Packages
Config, addrs []string, db, retries int) Lock. func (r Lock) Lock(key string, ... New("redis lock: failed to acquire lock") ) ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found