• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Masternode went down (twice) without apparent reasons. No payments at all

Gi01

Member
Hello

As suggested on the BTC forum, I have some issues with my recently set-up MN.

Pardon me for x-posting for who got this there:

Given that i didn't introduce myself, let me add something. I am not into cryptocoins, i am not a trader, i am not 15; i am just a regular person that found the idea of Dash being very smart. I love the MN concept and how it solves the efficiency of the chain without impacting on mining. There are a lot of advantages that you know better than i do. I studied a bit and decided to put money and time into this.

In a way if a person like me invests into this is a good signal, and you should not scare me.
So for the first time ever i invested into a crypto. It was painful, but i got a certain amount of money available and i decided to put some here to start 2-4 nodes.

It wasn't easy (euro to BTC to Dash to MN) but i was able to set my 1st and i was going to open almost 1 more immediately.
Then my node stopped after about 40h. Oh well, i assume it happens. I learned how to restart the node and in the end it was ok (opened a topic here too)
Then 11.2.22. Ok. Let's do the upgrade, cause i understood that with "enforcement" i wasn't going to get any Dash (and if i am fast i don't get delisted). Change of exe, new file on the vps, executable, bam. It goes. Great! I did it in 4 mins!
cheesy.gif

Then it stopped after a while. No reason to me. VPS up (vultr), node was running, delisted as before. I checked for like 2h after i upgraded the wallet, and it was up and running, with .22 version shown. So i really don't get why.

I restarted the node, again.
Daemon was up. Now i am up again and uptime is zero, proof of service is zero... All zeroed. I have to wait again, this time i lost almost 4 days! 0 payments!

How do you think i feel? Will i buy more coins? Don't think so. I am not even putting my 2nd node, I just pay money for that, and if i have to restart VPS i'll be delisted surely.

But it's ok to learn something, as soon I get solutions and the issues are solved. Questions:

- Why the nodes went down (twice - Tuesday midday and Friday late afternoon) without any reason (daemon running, VPS running, right .exe, perfectly shown on dashninja etc)? I don't care to have an issue, it's OK, it's pointless that i go down and all the nodes are up
- Why the concept of "Proof of service" it's not applying at all? I am at 0 ofc now, but i was fully delisted in a matter of minutes
- Wasn't the payment chain going to "remember" the order? I started the node about 6 days ago. Had 40h uptime, down, 3,5d up, down, 1d+ up now and no payment. It's clearly resetting every time.
-----

I'd really like to put some more effort here, but if i have to spend money and time for the system to work without benefits I feel just stupid :)

Hope to get some helps

G.
 
Didn't Cancel anything. Still no payments. Clearly the system isn't considering that i was active for many other days
 
Hello and welcome!

I'm sorry for inconvenience, it's actually really hard to say what went wrong and when. splawik21 had similar problems and I was able to reproduce it once but after that my node is fine and didn't stop anymore. I'm trying to reproduce it again and catch that error but no luck so far.

Meanwhile you can set a monitoring script to restart you MN daemon every time it's down and it will send you last 100 lines of debug.log (forward them to me pls if you want to help to find the root case of this issue - [email protected] ). It's not a perfect solution but should help you until the issue is fixed.

So I'm assuming you are running under user mnuser, your email is [email protected] (change them to correct one).

Install mailutils:
Code:
sudo apt-get update && sudo apt-get install mailutils
Now you'll be able to send emails.

Create new file mn_watch.sh on vps with content like that:
Code:
#!/bin/bash
if [ -z `pidof dashd` ]; then
tail -n 100 /home/mnuser/.dash/debug.log | mail -s "Masternode is down. Restarting..." -r [email protected] [email protected]
/home/mnuser/dashd
fi
This will check if dash daemon is up and start it if it's not.

Make it executable:
Code:
chmod u+x mn_watch.sh

Run "crontab -e" on vps to edit scheduler settings and add 2 new lines there
Code:
@reboot /home/mnuser/dashd >/dev/null 2>&1
*/5 * * * * /home/mnuser/mn_watch.sh >/dev/null 2>&1
This will do 2 things: start daemon on vps reboot and run our script every 5 minutes.

PS. emails may go to spam folder, depends on your mail hoster

PPS. Btw splawik21 how are your nodes doing on .22? Still having issues?

EDIT: fixed for dashd sitting in user home folder as in many guides here (I used mnuser name, change it accordingly)
EDIT2: suppressing crontab local mail output
 
Last edited by a moderator:
Hello UdjinM6 :)

I am getting good at this, i was able to install all the things above

In the meantime I added another MN, and it was a pain. But again... after a short while it went down.
I thought that it was a mistake of mine, but the original MN was up. I restarted all again, i shut the pc down and it's still up.
But I'll see tomorrow morning if it's a mistake in setup, or if again the system failed me.

In case, the above script it's going to help me? Do you see something wrong that i could have done?
 
UdjinM6 sry again

I have now 2 users on my VPS for 3 different nodes

How should i edit both the file AND the crontab?

Thanks

G.

I'm not sure I get it... what 2 users you have and how do you start 3 MNs from them? Can you give more info pls?..
 
I am having the exact same problem as of late. I keep restarting the nodes and they go down soon after without any apparent reason.
 
I'm not sure I get it... what 2 users you have and how do you start 3 MNs from them? Can you give more info pls?..

Pardon me, my explanation was terrible.

I added 2 more users I mean. Sey myuser1, myuser2, myuser3. Is there a script to tell me if a node went down and/or to autorestart?

TY

G.
 
Pardon me, my explanation was terrible.

I added 2 more users I mean. Sey myuser1, myuser2, myuser3. Is there a script to tell me if a node went down and/or to autorestart?

TY

G.

Ok, that's better :)
Still not clear where your dashd daemon(s) are and how do you run them though... ;)
Let's assume you have 3 copy of it in user home folders..

So follow the step to install mail (see above or just remove line #3 from the script below if you don't want emails) and then create new file mn_watch.sh for every user in his home folder (on vps) with content like that:
Code:
#!/bin/bash
if [ -z `pgrep -u myuser1 dashd` ]; then
tail -n 100 /home/myuser1/.dash/debug.log | mail -s "Masternode1 is down. Restarting..." -r [email protected] [email protected]
/home/myuser1/dashd
fi
This will check if dash daemon for myuser1 is up and start it if it's not. Create the same for for myuser2 and myuser3 and fix them accordingly.

Make all of them executable:
Code:
chmod u+x mn_watch.sh

Run "crontab -e" on vps to edit scheduler settings and add new lines there
Code:
@reboot myuser1 /home/myuser1/dashd >/dev/null 2>&1
@reboot myuser2 /home/myuser2/dashd >/dev/null 2>&1
@reboot myuser3 /home/myuser3/dashd >/dev/null 2>&1
*/5 * * * * myuser1 /home/myuser1/mn_watch.sh >/dev/null 2>&1
*/5 * * * * myuser2 /home/myuser2/mn_watch.sh >/dev/null 2>&1
*/5 * * * * myuser3 /home/myuser3/mn_watch.sh >/dev/null 2>&1

PS. it's not in the best way script and cron can be written, I know, but I hope it's simpler to understand what's going on

PPS. please keep in mind that this _should_ work but I didn't actually test it - do you tests yourself pls (stop daemon manually and see how it goes for 5+ minutes)
 
Thanks UdjinM6

The 3 users are all identical barrying the name :) So i just have to duplicate the script and update crontab accordingly

Is there a way to insert an "autorestart" in this script (as long as the VPS is up, ofc)?

Thanks
 
Back
Top