Error: Couldn't connect to server


#1

Hi guys!

I’ve been running 2 SmartNodes via a Vultr VPS for the last couple of days, but today they just stopped working.

So I open PuTTY and type in:
smartcash-cli getinfo

“Error: Couldn’t connect to server”

I’ve tried to restart the server without any results:

reboot

smartcashd
“SmartCash server is starting” (Nothing more. Just that one line.)

What do I do to get this up and running again?


#2

SOLUTION:

This is a memory issue. I got this answer from the official discord.

You need to run the commands:

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
cp /etc/fstab /etc/fstab.bak
echo ‘/swapfile none swap sw 0 0’ | tee -a /etc/fstab

After issuing the above commands, run free mem -h again and verify that swap space is enabled.

Now run smartcashd
If you get an errormessage like: “Corrupted block database detected”
Please restart with -reindex or -reindex-chainstate to recover.": Run smartcashd -reindex

Give it a few minutes then run: smartcash-cli getinfo


#3

Yes, adding swap space helps a lot! This guide describes the approach. Doing this you can also use a cheaper server and it will still run well (for now):