Did you correctly stopped bitcoind before copying the state directory ?
Sure. Here is the script that stops my bitcoind. Is this correct stopping?
[suser@power ~]$ cat /home/suser/bitcoin-core/.bitcoin/stop.sh
#!/bin/sh
if [ -f /home/suser/bitcoin-core/.bitcoin1/bitcoind.pid ]; then
kill $(cat /home/suser/bitcoin-core/.bitcoin/bitcoind.pid)
fi
I stopped it before copying. I am using bitcoin core 0.16.0
You must take care of waiting a few seconds before copying: bitcoind takes a few seconds to stop & correctly close the database. If you send the kill signal then directly copy the directory, it is possible the database is still marked as open and the leveldb library will refuse to open it, leading to the exception you're hitting. Please add a "sleep 15" after your kill, and check your bitcoind is really down.
If that does not do it, the best I can do is to show the leveldb error message instead of the exception; It would give you an hint. I'll take a look about this tonight.