Leveldb closed error after updating ipfs to 0.8 from 0.7

Updated ipfs 0.7 to 0…8 and then when I try to do ipfs init I get this error.
Error provider.queue Failed to enqueue cid: leveldb: closed.

How to fix this ?

Can you send the full logs?

export IPFS_LOGGING=debug
ipfs init

Weird I have the same exact error

Changing user to ipfs
ipfs version 0.8.0-rc2
Initializing IPFS...
generating ED25519 keypair...done
peer identity: 12D3KooWLr6s6ZCBJCXhb1xXYLREqA9wM8brHEbjmFLu9oxBaqGS
initializing IPFS node at /data/ipfs
to get started, enter:

        ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

**2021-03-25T21:38:37.535Z        ERROR   provider.queue  Failed to enqueue cid: leveldb: closed**
Removing default bootstrap nodes...
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt
removed /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
removed /ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
    "PeerID": "12D3KooWLr6s6ZCBJCXhb1xXYLREqA9wM8brHEbjmFLu9oxBaqGS"
Initializing daemon...
go-ipfs version: 0.8.0-rc2-4080333
Repo version: 11
System version: amd64/linux
Golang version: go1.14.4
Swarm is limited to private network of peers with the swarm key
Swarm key fingerprint: fa058705c0e62ecbbc2b796101540800
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/172.17.0.1/tcp/4001
Swarm listening on /ip4/172.18.0.1/tcp/4001
Swarm listening on /ip4/172.31.36.188/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/172.31.36.188/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/0.0.0.0/tcp/5001
WebUI: http://0.0.0.0:5001/webui
Gateway (readonly) server listening on /ip4/0.0.0.0/tcp/8080
Daemon is ready

I don’t know what I’m looking at here. These are not debug logs as requested. This is running an rc2 release and even though there is an error, initialization seems to work?

Hi Hector

Logs look like this (NB: private ipfs running in docker container). Highligted in bold is where the error comes in.

Changing user to ipfs
ipfs version 0.8.0
Initializing IPFS…
2021-03-30T13:26:28.022Z DEBUG cmd/ipfs config path is /data/ipfs
2021-03-30T13:26:28.023Z DEBUG lock Checking lock
2021-03-30T13:26:28.023Z DEBUG lock File doesn’t exist: /data/ipfs/repo.lock
2021-03-30T13:26:28.023Z INFO core/commands checking if daemon is running…
generating ED25519 keypair…done
peer identity: 12D3KooWHy3pMJCignf9hzfwgssPun7qzcE3a5uAZELHnuh4Wg3w
initializing IPFS node at /data/ipfs
2021-03-30T13:26:28.083Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.108Z DEBUG blockservice BlockService GetBlock: ‘QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn’
2021-03-30T13:26:28.108Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.113Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.124Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.124Z DEBUG blockservice BlockService GetBlock: ‘Qmb9Mbk9Z5p72pSsgFQ1wMpm1fZScQqxy6rG5qwE23GGW7’
2021-03-30T13:26:28.125Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.129Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.129Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.129Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.148Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.148Z DEBUG blockservice BlockService GetBlock: ‘QmRGXm9gpLBkUsz7SBDNgeR45vMK3w99R5Ep6JGAYjuwqy’
2021-03-30T13:26:28.149Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.153Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.153Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.153Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.153Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.153Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.176Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.176Z DEBUG blockservice BlockService GetBlock: ‘QmW4muv7TdWf88QGky278wfLdM2Xr6EEpUmhBGydehxKMZ’
2021-03-30T13:26:28.176Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.181Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.181Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.181Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.181Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.181Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.181Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.181Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.190Z DEBUG blockservice BlockService GetBlock: ‘QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm’
2021-03-30T13:26:28.205Z DEBUG blockservice BlockService GetBlock: ‘QmNsVthMF6TuEA6Ybh33f5RVQDCvd35dvD1ehPL2KUAs4Z’
2021-03-30T13:26:28.205Z DEBUG blockservice BlockService GetBlock: ‘QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm’
2021-03-30T13:26:28.210Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.210Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.210Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.210Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.210Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.210Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.210Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.210Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.210Z DEBUG blockservice BlockService GetBlock: ‘QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm’
2021-03-30T13:26:28.218Z DEBUG blockservice BlockService GetBlock: ‘QmQGiYLVAdSHJQKYFRTJZMG4BXBHqKperaZtyKGmCRLmsF’
2021-03-30T13:26:28.219Z DEBUG blockservice BlockService GetBlock: ‘QmPJWgZumK11DquASVuKkG55XXEPxWZ62a1UVBoCHxgEnM’
2021-03-30T13:26:28.219Z DEBUG blockservice BlockService GetBlock: ‘QmQGiYLVAdSHJQKYFRTJZMG4BXBHqKperaZtyKGmCRLmsF’
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.235Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.235Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.235Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmQGiYLVAdSHJQKYFRTJZMG4BXBHqKperaZtyKGmCRLmsF’
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.235Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.235Z DEBUG blockservice BlockService GetBlock: ‘QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm’
2021-03-30T13:26:28.236Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.244Z DEBUG blockservice BlockService GetBlock: ‘QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y’
2021-03-30T13:26:28.246Z DEBUG blockservice BlockService GetBlock: ‘QmUzeVpcxnJjamyo2EV15ntmy9JGRALFRknHZEAVhC5Jtz’
2021-03-30T13:26:28.247Z DEBUG blockservice BlockService GetBlock: ‘QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y’
2021-03-30T13:26:28.251Z DEBUG blockservice BlockService GetBlock: ‘QmQy6xmJhrcC5QLboAcGFcAE1tC8CrwDVkrHdEYJkLscrQ’
2021-03-30T13:26:28.251Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.251Z DEBUG blockservice BlockService GetBlock: ‘QmYCvbfNbCwFR45HiNP45rwJgvatpiW38D961L5qAhUM5Y’
2021-03-30T13:26:28.251Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.251Z DEBUG blockservice BlockService GetBlock: ‘QmU5k7ter3RdjZXu3sHghsga1UQtrztnQxmTL22nPnsu3g’
2021-03-30T13:26:28.252Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.252Z DEBUG blockservice BlockService GetBlock: ‘QmejvEPop4D7YUadeGqYWmZxHhLc4JBUCzJJHWMzdcMe2y’
2021-03-30T13:26:28.252Z DEBUG blockservice BlockService GetBlock: ‘QmQGiYLVAdSHJQKYFRTJZMG4BXBHqKperaZtyKGmCRLmsF’
2021-03-30T13:26:28.252Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.252Z DEBUG blockservice BlockService GetBlock: ‘QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB’
2021-03-30T13:26:28.252Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.252Z DEBUG blockservice BlockService GetBlock: ‘QmQ5vhrL7uv6tuoN9KeVBwd4PwfQkXdVVmDLUZuTNxqgvm’
2021-03-30T13:26:28.252Z DEBUG blockservice Blockservice: Searching bitswap
2021-03-30T13:26:28.252Z DEBUG blockservice BlockService GetBlock: ‘QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc’
2021-03-30T13:26:28.292Z DEBUG cmd/ipfs init: seeded init docs QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc
to get started, enter:

    ipfs cat /ipfs/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc/readme

2021-03-30T13:26:28.293Z DEBUG blockservice blockservice is shutting down…
2021-03-30T13:26:28.314Z ERROR provider.queue Failed to enqueue cid: leveldb: closed
2021-03-30T13:26:28.322Z DEBUG namesys error when determining the last published IPNS record for 12D3KooWHy3pMJCignf9hzfwgssPun7qzcE3a5uAZELHnuh4Wg3w: datastore: key not found
2021-03-30T13:26:28.328Z DEBUG namesys Storing ipns entry at: /ipns/ y������"���j�Fc4�ya>}Z!��&��^
2021-03-30T13:26:28.331Z DEBUG blockservice blockservice is shutting down…
2021-03-30T13:26:28.368Z DEBUG cmd/ipfs config path is /data/ipfs
2021-03-30T13:26:28.432Z DEBUG cmd/ipfs config path is /data/ipfs
Removing default bootstrap nodes…
2021-03-30T13:26:28.496Z DEBUG cmd/ipfs config path is /data/ipfs
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb
removed /dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt
removed /ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
removed /ip4/104.131.131.82/udp/4001/quic/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
2021-03-30T13:26:28.560Z DEBUG cmd/ipfs config path is /data/ipfs
“PeerID”: “12D3KooWHy3pMJCignf9hzfwgssPun7qzcE3a5uAZELHnuh4Wg3w”
2021-03-30T13:26:28.613Z DEBUG cmd/ipfs config path is /data/ipfs
Initializing daemon…
go-ipfs version: 0.8.0-ce693d7
Repo version: 11
System version: amd64/linux
Golang version: go1.14.4
2021-03-30T13:26:28.653Z DEBUG basichost failed to fetch local IPv6 address {“error”: “no route found for ::”}
2021-03-30T13:26:28.654Z DEBUG basichost failed to resolve listen addrs {“error”: “failed to specify addrs: []”}
2021-03-30T13:26:28.704Z INFO dht/RtRefreshManager starting refreshing cpl 0 with key CIQAAACA6IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA (routing table size was 0)
2021-03-30T13:26:28.704Z WARN dht/RtRefreshManager failed when refreshing routing table2 errors occurred:
* failed to query for self, err=failed to find any peer in table
* failed to refresh cpl=0, err=failed to find any peer in table

2021-03-30T13:26:28.705Z DEBUG basichost failed to fetch local IPv6 address {“error”: “no route found for ::”}
2021-03-30T13:26:28.705Z DEBUG addrutil adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/172.31.36.188/tcp/4001 [/ip4/172.31.36.188/tcp/4001]
2021-03-30T13:26:28.705Z DEBUG addrutil adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/127.0.0.1/tcp/4001 [/ip4/172.31.36.188/tcp/4001 /ip4/127.0.0.1/tcp/4001]
2021-03-30T13:26:28.706Z DEBUG addrutil ResolveUnspecifiedAddresses:[/p2p-circuit /ip4/0.0.0.0/tcp/4001] [/ip4/172.31.36.188 /ip4/127.0.0.1 /ip6/::1] [/p2p-circuit /ip4/172.31.36.188/tcp/4001 /ip4/127.0.0.1/tcp/4001]
2021-03-30T13:26:28.706Z DEBUG basichost failed to fetch local IPv6 address {“error”: “no route found for ::”}
2021-03-30T13:26:28.706Z DEBUG addrutil adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/172.31.36.188/tcp/4001 [/ip4/172.31.36.188/tcp/4001]
2021-03-30T13:26:28.706Z DEBUG addrutil adding resolved addr:/ip4/0.0.0.0/tcp/4001 /ip4/127.0.0.1/tcp/4001 [/ip4/172.31.36.188/tcp/4001 /ip4/127.0.0.1/tcp/4001]
2021-03-30T13:26:28.706Z DEBUG addrutil ResolveUnspecifiedAddresses:[/p2p-circuit /ip4/0.0.0.0/tcp/4001] [/ip4/172.31.36.188 /ip4/127.0.0.1 /ip6/::1] [/p2p-circuit /ip4/172.31.36.188/tcp/4001 /ip4/127.0.0.1/tcp/4001]

Hi @hector

Any thoughts on this? Is it something I need to worry about?

It seems like a race condition during initialization when the leveldb datastore is closed a bit too early, but it does not seem to affect operation of the node in general (it’s a thing that only happens during shutdown). I would open a bug report on go-ipfs if it does not exist already.

1 Like

Thanks for this @hector i’m on standby in case of any help or extra information needed.