Farming suddenly stopped working: "Connection error. Check if harvester is running at 8560"

Hi all, I’d set up an unattended farmer on Fedora Linux. Basic install just following install instructions from the Chia wiki, version 1.1.16. It had been happily farming my plots for weeks, but yesterday it suddenly stopped working while I was at work (i.e. I didn’t change anything nor am I aware of any event that might have triggered).

If I run chia farm summary I get the connection error message below, and it doesn’t recognise my plots. I’ve tried removing my plot directories, doesn’t make a difference. Rebooting, restarting the node makes no difference. Some snippets:

$ chia farm summary
Connection error. Check if harvester is running at 8560
Farming status: Farming
Total chia farmed: 0.0
User transaction fees: 0.0
Block rewards: 0.0
Last height farmed: 0
Plot count: Unknown
Total size of plots: Unknown
Estimated network space: 27040.344 PiB
Expected time to win: Unknown
Note: log into your key using 'chia wallet show' to see rewards for each key

After having this problem I upgraded to 1.1.17, makes no difference to this issue. Any help would be appreciated.

I managed to get some help from the Keybase support channel. I solved this issue by refreshing the config whilst backing up the DB. For reasons I can’t explain, it worked. Two gotchas to keep in mind when doing this, 1) make sure to update your wallet keys in the config if you are paying out to another address, 2) if you had changed your log info from WARNING to something else, don’t forget to change it back. I was scratching my head for hours trying to figure out why my debug log wasn’t moving!

LINUX COMPLETE CONFIG RESET

Close down the Chia app, and open up a terminal, and execute the below commands one at a time:
mv ~/.chia/mainnet ~/.chia/old
chia init
mv ~/.chia/old/db ~/.chia/mainnet/
mv ~/.chia/old/wallet ~/.chia/mainnet/

(thanks to @pyl from chia_network.public#support for helping me through this)