Check failed: mdb_status == 0 (2 vs. 0) No such file or directory

Ashutosh Singla picture Ashutosh Singla · Apr 11, 2016 · Viewed 7.2k times · Source

I received the following error while I was training the data. I have tried all the solutions given on the internet and nothing seems to work for me. I have checked paths and size of the lmdb files are non-zero. But the problem still exists. I have no idea how to solve this issue.

pooling_
I0411 12:42:53.114141 21769 layer_factory.hpp:77] Creating layer data
I0411 12:42:53.114586 21769 net.cpp:91] Creating Layer data
I0411 12:42:53.114604 21769 net.cpp:399] data -> data
I0411 12:42:53.114645 21769 net.cpp:399] data -> label
F0411 12:42:53.114650 21772 db_lmdb.hpp:14] Check failed: mdb_status == 0 (2 
vs. 0) No such file or directory
*** Check failure stack trace: ***
I0411 12:42:53.114673 21769 data_transformer.cpp:25] Loading mean file from: 
/home/Documents/Test/Images300/train_image_mean.binaryproto
@ 0x7fa9436a3daa (unknown)
@ 0x7fa9436a3ce4 (unknown)
@ 0x7fa9436a36e6 (unknown)
@ 0x7fa9436a6687 (unknown)
@ 0x7fa943b0472e caffe::db::LMDB::Open()
@ 0x7fa943afc644 caffe::DataReader::Body::InternalThreadEntry()
@ 0x7fa940e46a4a (unknown)
@ 0x7fa9406fe182 start_thread
@ 0x7fa942a8a47d (unknown)
@ (nil) (unknown)
Aborted (core dumped)

Below is my file settings:

name: "GoogleNet"
layer {
    name: "data"
    type: "Data"
    top: "data"
    top: "label"
    include {
        phase: TRAIN
    }
    transform_param {
        mirror: true
        crop_size: 224
        mean_file: "/home/Documents/Test/Images300/train_image_mean.binaryproto"
    }
    data_param {
        source: "/home/caffe/examples/zImageDetection/ImageDetection_train_lmdb"
        batch_size: 32
        backend: LMDB
    }
}
layer {
    name: "data"
    type: "Data"
    top: "data"
    top: "label"
    include {
        phase: TEST
    }
    transform_param {
        mirror: false
        crop_size: 224
        mean_file: "/home/Documents/Test/Image300/test_image_mean.binaryproto"
    }
    data_param {
        source: "/home/caffe/examples/zImageDetection/ImageDetection_val_lmdb"
        batch_size: 50
        backend: LMDB
    }
}

Answer

Harsh Wardhan picture Harsh Wardhan · Apr 11, 2016

You have not set your paths to the LMDB directories correctly. Go to the directory where you have created your LMDBs and get the absolute paths using this command:

$ readlink -f <LMDB_directory_name>

Use this path, it should solve your problem.