nano-node
nano-node copied to clipboard
Log inability to access `data.ldb` on node startup
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.
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.
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.
- Use
scp
to transfer the entireNano
folder of a healthy (and running) nano node from server A to server B - Start the node on server B using docker
- Noticed that the
block_count
was starting from 0 even though thedata.ldb
file was available - Stopped the node
-
sudo chmod -R a+rwx Nano
- Used docker to remove the container (
sudo docker remove nanonode
) and started the node again -
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 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).
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.