Task #1867
closedInitiation read entries from database
100%
Description
I have just installed the latest code of ndn-cxx, NFD and repo-ng from github. However, after running nfd-start and ndn-repo-ng respectively, I got an error about
"ERROR: Initiation Read Entries from Database Prepare error"
Do I need to do some prerequisite steps such as generating a database file? Besides, I could not find any database file after installing the repo-ng.
Thank you!
Updated by Alex Afanasyev over 10 years ago
- Assignee set to Weiqi Shi
- Priority changed from Normal to High
Updated by Weiqi Shi over 10 years ago
It seems it is something wrong with your database. This error is thrown when repo reads data from database and uses the data to rebuild the repo index. Have you changed your database path in config file? Or have you removed the original database generated by running repo last time? Repo can read from existing database, but if there is something wrong with the database, data cannot be read from it.
Updated by Alex Afanasyev over 10 years ago
What would happen if database does not yet exist. Will this error be generated?
Updated by Weiqi Shi over 10 years ago
If database does not exist, repo will generate one. That case would be much simpler than handle the existed database. And the problem will not exist since repo do not need to rebuild the index.
Updated by Zhehao Wang over 10 years ago
Hi guys,
I'm having the same problem with the latest code of ndn-cxx, NFD and repo-ng. (on OSX 10.8.4)
I haven't changed the database in config file, or removed the original database. If I recall correctly, what I did is running integrated-tests, and running a few ndnputfile and ndngetfiles.
Do you know if I can access its log somewhere? Or do I have to remove the database files in /var/db/ndn-repo-ng/, and let repo-ng regenerate the db files?
Thanks!
Updated by Alex Afanasyev over 10 years ago
If you had your database created with previous version of repo-ng, you probably need to remove it, as the formats has been changed.
Updated by Ali Khan over 10 years ago
Thank you for your response.
I haven't changed my database path in config file and now the path is "/var/db/ndn-repo-ng". However, I also removed an old database file (ndn-repo.db), but it seems that repo-ng didn't create a new database file for me (my database path is empty). Then I got an error message as follows:
Database file open failure rc:14
ERROR: Database file open failure
Updated by Alex Afanasyev over 10 years ago
Can you check that the specified path is writeable by the user you running repo?
Updated by Weiqi Shi over 10 years ago
Under that path, you need the root authority to create a database. Have you use sudo to run the repo?
Updated by Ali Khan over 10 years ago
Sorry, at the beginning I didn't run repo with sudo. Now, the database file can be initialized when I run the repo.
However, I still have problems with ndnputfile and ndngetfile. Currently, I try to load a file to repo with command
"sudo ndnputfile -v ndn:/example/repo/1 ndn:/example/data/1/photo ./photo.JPG"
It seems that repo cannot identify the endblock of my content and then I obtain error messages as follows:
interlab@12:~/repo-ng$ sudo ndnputfile -v ndn:/example/repo/1 ndn:/example/data/1/photo ./photo.JPG
setInterestFilter for /example/data/1/photo/%00%00%01G%E7%FE%9D%1C
Requested segment [829] does not exist
Requested segment [830] does not exist
Requested segment [831] does not exist
Requested segment [832] does not exist
Requested segment [833] does not exist
Requested segment [834] does not exist
Requested segment [835] does not exist
Requested segment [836] does not exist
Requested segment [837] does not exist
Requested segment [838] does not exist
Requested segment [839] does not exist
P.S. size of file is about 828 kB
thank you
Updated by Weiqi Shi over 10 years ago
For the sudo and database path, I would suggest you to change to path in config file so that you do not need to bother with this problem, but anyway.
For ndnputfile and ndngetfile, it seems there are something wrong, or at least they are kinds of misleading and inconvenient to use. Currently, I am not very sure about this since I have not looked into the code, but I will try to figure it out this week.
For now, if you want to insert the a data, you can specify -s when you run ndnputfile as long as the file does not exceed some certain value. It will put your file into one data and save it.
Sorry for the limited information I can provide, I will try to solve this problem as soon as possible.
Updated by Weiqi Shi over 10 years ago
This issue will be solved in the task# 1887.
Updated by Ali Khan over 10 years ago
Thank you very much for your information. I will follow the task#1887 by now.
Updated by Weiqi Shi over 10 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
This issue has been solved.
Updated by Junxiao Shi over 7 years ago
- Is duplicate of Task #1887: The problem of ndnputfile and ndngetfile added