Broke first MN adding a second and push script

c3works

Member
Jun 22, 2016
52
18
48
60
noob here (and noobier by the minute now) - set up 1 mn fine. was running as seen in Dashcentral and CLI return msg. Then I set up a second MN and loaded the suggested push script thinking I was following the hosted README.txt instructions - now both MN's are down :( --- I verified the cron job path and dashcentral.conf paths (both mn's) all point to the home directory where the dcupdater files are located, so I want to refresh and see if I'm up...how do I refresh, or can you suggest any other ideas? Thanks
 

Walter

Active Member
Masternode Owner/Operator
Jul 17, 2014
234
220
103
noob here (and noobier by the minute now) - set up 1 mn fine. was running as seen in Dashcentral and CLI return msg. Then I set up a second MN and loaded the suggested push script thinking I was following the hosted README.txt instructions - now both MN's are down :( --- I verified the cron job path and dashcentral.conf paths (both mn's) all point to the home directory where the dcupdater files are located, so I want to refresh and see if I'm up...how do I refresh, or can you suggest any other ideas? Thanks

Double check your home paths (in %XXXX% parenthasis) and RPC Port number (they need to be different for each MN otherwise the Daemon cant bind to the IP address). Both settings need to be different for each MN. See example for 2 masternodes below:

our %masternodes = (
'MNADDRESS' => {
'rpc_host' => 'localhost',
'rpc_port' => 9998,
'rpc_user' => 'XXXX',
'rpc_password' => 'XXXX',
'daemon_autorestart' => 'enabled',
'daemon_binary' => '/home/%MNuser1%/dashd',
'daemon_datadir' => '/home/%MNuser1%/.dash'
},
'MNADDRESS' => {
'rpc_host' => 'localhost',
'rpc_port' => 9997,
'rpc_user' => 'XXXX',
'rpc_password' => 'XXXX',
'daemon_autorestart' => 'enabled',
'daemon_binary' => '/home/%MNuser2%/dashd',
'daemon_datadir' => '/home/%MNuser2%/.dash'
}
);

It's a bit fiddly but it's usually either of the above that cause problems with push scripts...

Other than that check your crontab, it should look something like this:

SHELL=/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
MAILTO=root
HOME=/

*/2 * * * * /root/dashcentral-updater/dcupdater


... Hope this helps :)

Walter
 

c3works

Member
Jun 22, 2016
52
18
48
60
Very helpful!

I have made at least those two errors: same rpc_port, and same paths. I'll work on that and see. Appreciate the tip (and example)!
 

c3works

Member
Jun 22, 2016
52
18
48
60
I tried making the rpc_ports different, but was surprised to see the readme doc explicitly shows them as the same (still offline, though):

"Example of /opt/dashcentral-updater/dashcentral.conf with two masternodes:

our %masternodes = (
'Xuia3V5v51AFTjYNtz6tpu9YrKYoWc9Ruz' => {
'rpc_host' => 'localhost',
'rpc_port' => 9998,
'rpc_user' => 'masternode1',
'rpc_password' => '123password',
'daemon_autorestart' => 'disabled',
'daemon_binary' => '/usr/bin/dashd',
'daemon_datadir' => '/root/.dash'
},
'Xo1cwpFNHff5Nj12qWWXhCDyv5fPCdGZNR' => {
'rpc_host' => 'localhost',
'rpc_port' => 9998,
'rpc_user' => 'masternode2',
'rpc_password' => '123password',
'daemon_autorestart' => 'disabled',
'daemon_binary' => '/usr/bin/dashd',
'daemon_datadir' => '/root/.dash'
}
); "
 

Walter

Active Member
Masternode Owner/Operator
Jul 17, 2014
234
220
103
Yeah, ignore that bit.. You need to change the RPC port for each MN if they're on the same linux VPS host. You also need unique public IP addresses and unique user accounts for each MN on your VPS. I.e. you can't run two masternodes under the 'root' account on your VPS. Make sure you create 2 dedicated accounts called 'MN01' and 'MN02' for example. The push script should then reference those accounts home drives. Root should only be used for admin related functions on the VPS, not for running masternode daemons.

Sorry if you already know some of the above info :) Hopefully it helps though. It's a bloody pain getting them running for the first time but once you crack it you'll be fine ;)

Cheers

Walter
 

Walter

Active Member
Masternode Owner/Operator
Jul 17, 2014
234
220
103
The only other thing to check is whether your daemons are running on the VPS. Check with this command:

./dash-cli getinfo

If it returns with dash daemon statistics and info then your MN is running fine and you just need to issue a masternode start command from the wallet that contains your 1000 dash Vins.

Cheers
 

c3works

Member
Jun 22, 2016
52
18
48
60
So one mn is running happily via Dashman (with his patient help!), but I am working a second mn myself through Dash Central right now to gain some proficiency at this.
Problem: That node seems to run for a while (data comes through using '.dash-cli getinfo,' gives thumbs up on DashCentral at first), but this error consistently stays on DashNinja: 'Port Check Status: Closed (Connection refused).'

After time, Dash Central loses thumbs up to this; 'Warning: We did not receive a remote data update since more than 15 minutes. Please check your DashCentral push script.'

I am using Vultr, have checked my rpc creds, can sucessfully use './dcupdater' manually to return 'Update status: ok,' and I have verified my vultr ufw status returns (in part) this:
'9999/tcp ALLOW Anywhere'.

I also have this in crontab:
*/2 * * * * root /home/mn2admin/opt/dashcentral-updater/dcupdater (valid path)

Is there another place I should look to get this to stay online (i.e. clear the port check refusal and maintain its updates)?
 
Last edited:

c3works

Member
Jun 22, 2016
52
18
48
60
Hi - thanks, read it now.

My point above was just that it's potentially an attack vector having a 3rd party (DashChat) access to the dash.org homepage to engage users directly....
... so I would say this is the wrong direction to be going in / use of resources - e.g. spend those funds on additional Evo developers to build the product sooner that doesn't need this one-on-one help.

Andy
Sorry for my apparent overreach...maybe my thread would have been better in a Stack Overflow area, or something.
 

AndyDark

Well-known Member
Sep 10, 2014
384
728
163
Sorry for my apparent overreach...maybe my thread would have been better in a Stack Overflow area, or something.
Lol. yep sorry, this wasn't meant for you, i posted in the wrong thread. long day...I will delete that one and post in the right thread.