nano-node icon indicating copy to clipboard operation
nano-node copied to clipboard

Log inability to access `data.ldb` on node startup

Open zhyatt opened this issue 2 years ago • 4 comments

Currently if the node is started up with a data.ldb existing, but where the permissions do not allow the node user to access, the node crashes and nothing shows in the logs. For easier identification of this issue, I propose we add log entry similar to: Unable to to access data.ldb file, check permissions and gracefully exit with Node stopping log entry.

zhyatt avatar Sep 23 '21 23:09 zhyatt

If it doesn't have access to data.ldb it likely doesn't have access to the log directory though we could print an error to the console and exit cleanly.

clemahieu avatar Sep 24 '21 09:09 clemahieu

I am currently facing this issue and wonder if anyone has a manual fix to make data.ldb accessible? I tried following this Here's my steps to replicate.

  1. Use scp to transfer the entire Nano folder of a healthy (and running) nano node from server A to server B
  2. Start the node on server B using docker
  3. Noticed that the block_count was starting from 0 even though the data.ldb file was available
  4. Stopped the node
  5. sudo chmod -R a+rwx Nano
  6. Used docker to remove the container (sudo docker remove nanonode) and started the node again
  7. block_count still starts from same block as in step 3.

Is there another command to be able to make server A's data.ldb file accessible on server B? Both are running Ubuntu 16.04.

adrianegraphene avatar Jan 23 '22 13:01 adrianegraphene

@adrianegraphene You might want to check file/group ownership. For Docker it is running as root by default so if the owner/group are incorrect when running ls -lsa then chgrp root data.ldb and chown root data.ldb should fix it I believe.

I would also recommend upgrading from Ubuntu 16.04 if possible. That version no longer receives hardware and maintenance updates, though EOL for security updates isn't until 2026 (https://ubuntu.com/about/release-cycle).

zhyatt avatar Jan 24 '22 17:01 zhyatt

Thanks @zhyatt, I'll give this a try and edit this post when I get that chance. Your note on 16.04 is taken and I'll look into upgrading, thank you.

adrianegraphene avatar Jan 24 '22 20:01 adrianegraphene