OS: FreeBSD 12.2-RELEASE FreeBSD 12.2-RELEASE r366954 GENERIC amd64 CPU: AMD Phenom(tm) II X2 550 Processor (3100.07-MHz K8-class CPU) RAM: real memory = 5368709120 (5120 MB), avail memory = 4874006528 (4648 MB) Version: bitcoin-daemon-0.20.1_3 Error: /var/log/messages: exited on signal 6 (core dumped) Error: /var/log/bitcoind.log: ReadRawBlockFromDisk: Block magic mismatch for FlatFilePos(nFile=0, nPos=6496176): c3291407 versus expected f9beb4d9
Hello, I share my experience of what I did and I would like to understand what this error is due to. I got the entire blockchain on a hard drive that I have placed in the root at /nfs2/blockchain. (this is not a nfs resource) All the blocks were fine in this directory. The problem was that I was running the bitcoind service as root. Everything was going well.
I then configured the service to run as a bitcoin group and user. I performed a chown -R bitcoin:bitcoin /nfs2/blockchain I restarted the OS and the service ran for a few hours to give me the errors as indicated above. I then restarted the service but the error always occurred after a few hours of execution. Then I completely deleted the contents of the /nfs2/blockchain directory I added the parameter to the bitcoind.conf file: debug=libevent, qt I restarted the machine and since January 30 the service has not stopped.
I would like to understand so as not to have to take over the entire blockchain again, which is what it is recommended to do. Why when we change the user do we have this type of error? What should be done to stop having this type of error? What is recommended to do when the machine suddenly shuts down? Thank you.