Go-ipfs: Leveldb corruption

Created on 26 Apr 2018  Â·  9Comments  Â·  Source: ipfs/go-ipfs

Version information:

go-ipfs version: 0.4.12-rc1-8ec1ce9e
Repo version: 6
System version: arm/linux
Golang version: go1.9

Type:

Bug

Description:

  • What you were doing when you experienced the bug.

I played around a bit with launching/killing ipfs, because it was using a lot of ressources, and it kept rebooting.

  • Any error messages you saw, where you saw them, and what you believe may have caused them (if you have any ideas).

The actual bug is that when I want to actiate it now, with ipfs deamon I obtain the following:

Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
Error: leveldb: manifest corrupted (field 'comparer'): missing [file=MANIFEST-000224]

From what I know there is an easy way to fix this, however I do not know the location of the said database.

Thanks for your help!

kinbug

Most helpful comment

$cd ~/.ipfs/datastore
$ python
…
>>> import leveldb
>>> leveldb.RepairDB("./")

Make sure you have leveldb installed first

All 9 comments

Please always try to shutdown IPFS gracefully to prevent corruption.
LevelDB files by default should be stored in ~/.ipfs/datastore.

Please always try to shutdown IPFS gracefully to prevent corruption.

Note: IPFS should recover from a crash. This is a bug.

Just in case it helps, the repair from python worked perfectly well!

how to recover the file?

$cd ~/.ipfs/datastore
$ python
…
>>> import leveldb
>>> leveldb.RepairDB("./")

Make sure you have leveldb installed first

leveldb.RepairDB("~/.ipfs/datastore")
Traceback (most recent call last):
File "", line 1, in
leveldb.LevelDBError: IO error: ~/.ipfs/datastore: No such file or directory

Try that:

$cd ~/.ipfs/datastore
$ python
…
>>> import leveldb
>>> leveldb.RepairDB("./")

it works!thank you very mush!

Welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

slrslr picture slrslr  Â·  3Comments

Kubuxu picture Kubuxu  Â·  3Comments

JesseWeinstein picture JesseWeinstein  Â·  4Comments

magik6k picture magik6k  Â·  3Comments

zignig picture zignig  Â·  3Comments