dashpay / dash

Dash - Reinventing Cryptocurrency
https://www.dash.org
MIT License
1.49k stars 1.2k forks source link

Masternode fails to restart on Failed loading settings file error #5497

Closed kxcd closed 1 year ago

kxcd commented 1 year ago

I've seen this issue happen on two separate masternodes, the node appears to crash and when it autorestarts it fails to start with the below messages

Jul 21 09:21:15 pluto dashd[882103]: Error: Failed loading settings file:
Jul 21 09:21:15 pluto dashd[882103]: - Unable to parse settings file /home/dash02/.dashcore/settings.json

Inspecting the .dashcore directory, there is a settings.json file with correct permissions, but it is zero bytes in size. Deleting this file and only this file allows the masternode to start again and run normally.

The dashd is version 19.2 and hosted on AMD64, the issue is observed on mainnet, the disk is not full.

kxcd commented 1 year ago

I was just able to reproduce the error by blanking out that file and trying to start the dashd

> ~/.dashcore/settings.json

What I don't know is how that file gets to be empty during the normal operations of the node. A healthy version of that file will contain four bytes, eg

{
}

Including the two newline characters. Please fix the abort on empty file, it is most frustrating!

PastaPastaPasta commented 1 year ago

I have also ran into this issue previously. Let me figure out how should take a look at this. For now assigning Ody and KW.