dashman - linux masternode mangement made mootastic

UdjinM6

Official Dash Dev
Dash Core Group
May 20, 2014
3,639
3,537
1,183

pin0de

New Member
Jan 30, 2016
36
29
18
Hello moocowmoo,

I like your dashman script, just successfully updated one of my masternodes with it.

I set up another server, also with dashman, and for some reason it does not seem to start dashd at all. I can't find out why. Do you have any idea?

[email protected]:~/dashman$ ./dashman status
dashman version 0.1.18 (12-g7487703) - Mon Jun 13 08:56:40 UTC 2016
gathering info, please wait... DONE!

hostname : vultr.guest
host uptime/load average : 0 days, 0.00 0.01 0.02
dashd bind ip address : 45.X.X.X
dashd version : 0.12.0.58
dashd up-to-date : YES
dashd running : NO
dashd uptime : 0 days, 0 hours, 0 mins, 0 secs
dashd responding (rpc) : NO
dashd listening (ip) : NO
dashd connecting (peers) : NO
dashd port open : NO
dashd connection count : 0
dashd blocks synced : NO
last block (local dashd) : 0
(chainz) : 485823
(dash.org) : 485823
(dashwhale) : 485822
(masternode.me) : 485822 - no forks detected
dashd current difficulty :
masternode count : 0
Exiting.


There are no errors in the debug.log.

./dashman restart will get stuck here:

dashman version 0.1.18 (12-g7487703) - Mon Jun 13 09:22:11 UTC 2016

restart dashd? [y/N] y
--> Deleting cache files, debug.log...DONE!
--> Starting dashd...DONE!
--> Waiting for dashd to respond..........................


./dashman restart now get stuck as well.
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
I set up another server, also with dashman, and for some reason it does not seem to start dashd at all. I can't find out why. Do you have any idea?
Not offhand. I'd be willing to take a look and see if you like. PM me.

Or, since it's a new install with no funds or anything, just delete everything
Code:
rm -rf ~/.dash
and try installing again.
 
  • Like
Reactions: stan.distortion

pin0de

New Member
Jan 30, 2016
36
29
18
moocowmoo, yes it was more time efficient to just delete the instance and start over on a new one, next time it worked as usual. I run 4 nodes with dashman now and the updating feature worked really well, it was quick and easy! Thanks so much for this script, I will donate something!!
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
moocowmoo, yes it was more time efficient to just delete the instance and start over on a new one, next time it worked as usual. I run 4 nodes with dashman now and the updating feature worked really well, it was quick and easy! Thanks so much for this script, I will donate something!!
Glad to hear it! Makes me feel good to make peoples lives a little easier.
 
  • Like
Reactions: TaoOfSatoshi

Voluntary

Member
May 14, 2016
109
37
78
Dash Address
XivwUmSu5davqhqc3BX1j4w6dskzNFihQQ
Getting a litle off-topic... What kind of resources are needed to run a masternode? Would it be practical to run 10 on a single computer?
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Getting a litle off-topic... What kind of resources are needed to run a masternode? Would it be practical to run 10 on a single computer?
Today, a masternode needs about 256M RAM and about 2G disk (not accounting for log file) 10G is safer.
A medium speed cpu is fine, anything less than a minimum-level VPS isn't recommended.

As Evolution progresses, instances will be required to have more resources.

Multiple instances per host are possible, but not recommended.
It's bad for the network having too many points of failure and you'd still need one ip address for each instance.
Additionally, dashman only supports single-host installations.
 
  • Like
Reactions: splawik21

martinf

Member
Aug 21, 2015
70
38
58
Hi,

I just tried 'vote', but got the following error:
KeyError: 'masternodeaddr'

I'm using dash.conf for configuration. There's a dummy masternode.conf as well containing comments only. Removing masternode.cong changes the error to "cannot find masternode.conf".

Do I need to specify masternodeaddr? It's the address of the current node.
Maybe I got this all backwards. Do I have to vote through my hot wallet? I'm trying this on my cold wallet masternode.
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
I'm using dash.conf for configuration.
You need to add:
Code:
masternodeaddr=ip.address.of.masternode:9999
to vote with dash.conf. But I recommend you upgrade to using masternode.conf.

Do I have to vote through my hot wallet? I'm trying this on my cold wallet masternode.
No. Any sync'd dashd (dash-cli) will do. It doesn't need any funds. It just needs the masternode information in dash.conf or masternode.conf.
 
Last edited:
  • Like
Reactions: UdjinM6

martinf

Member
Aug 21, 2015
70
38
58
Thanks! That worked!


Also, man you are quick with updates. Noticed dashman trew an error as the Dash download page changed. Not many minutes before you fixed it. Thumbs up!
 
  • Like
Reactions: moocowmoo

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Thanks! That worked!
Glad to hear it! I just had to peek at the code to remember the dash.conf processing.

Also, man you are quick with updates. Noticed dashman trew an error as the Dash download page changed. Not many minutes before you fixed it. Thumbs up!
It was luck tonight. I went to vote with dashman and saw the failure.
But, you can count on me fixing things quickly once I'm aware of them. I know a lot of people rely on dashman. :)

Over the next year, I'll be creating dash.org api's for dashman to rely on instead of web scraping.
 
Last edited:
  • Like
Reactions: TaoOfSatoshi

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Code:
dashman version 0.1.19 (15-g13a09d6) - Tue Jun 21 17:27:32 UTC 2016
gathering info, please wait... DONE!

*** a newer version of dash is available. ***

  current version:  0.12.0.57
   latest version:  0.12.0.58

download https://www.dash.org/binaries/dash-0.12.0.58-linux64.tar.gz.asc
and install to /home/imp/.dash? [y/N] y

 --> Downloading https://www.dash.org/binaries/dash-0.12.0.58-linux64.tar.gz.asc...DONE!
 --> Checksumming dash-0.12.0.58-linux64.tar.gz.asc...  SHA256 checksum FAILED! Try again later. Exiting.
 
  • Like
Reactions: splawik21

splawik21

Yeah, it's me....
Dash Core Group
Foundation Member
Dash Support Group
Apr 8, 2014
1,971
1,339
1,283
MOO indeed I get the same error as above.
 

Balych

Active Member
Sep 12, 2015
365
211
113
Dash Address
Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
Code:
dash successfully upgraded to version 0.12.0.58
Thanks
 
  • Like
Reactions: TaoOfSatoshi

555007

Active Member
Sep 15, 2015
371
169
113
t.me
Hello! completely newbie question:
trying to install dashman in accordance with
https://github.com/moocowmoo/dashman
but it fails somehow. Linux 16.04.

[email protected]:~/dashman# ./dashman install
missing dependency: curl netcat
--> sudo apt-get install curl netcat
***
Update:
sudo apt-get install curl netcat
with success
sudo apt-get update
success
But if try to install dashman then new message:
missing dependency: netcat6
--> sudo apt-get install netcat6

Trying to:
sudo apt-get install netcat6
results in fail:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package netcat6

***

Any idea why?
 
Last edited:

DYGYs

New Member
Aug 11, 2016
4
0
1
43
Hi,

Since about a week ago, running the (latest?)
dashman version 0.1.19 (15-g13a09d6-dirty)
always returns "No JSON object could be decoded"

so, launching it in debug mode (btw, could a --verbose be added to just turn it on through "set -x" ?)
bash -x dashman/dashman status

it turns out that the command
timeout 7 curl -s 'httpx://dashninja.pl/api/masternodes?ips=\["x.x.x.x:9999"\]&portcheck=1&balance=1'

gets a redirection into "www." + the old link

which... isn't followed because we're not telling it to do so.

How to fix this?
a) fix the url path (which may break again on the next dashninja website update), and/or
b) explicitly tell curl to follow the redirection, by passing it "-L" (I had gone with this one - for now)

so,
nano dashman/lib/dashman_functions.sh

and on about line 27

change:
curl_cmd='timeout 7 curl -s'

into:
curl_cmd='timeout 7 curl -s -L'

Save it (Ctrl+x, Enter)

Done! It's now fixed until moocowmoo comes back from vacations and updates the dashman tool :)

Cheers

[Edit: second attempt, first got stuck on the moderation approval queue]
 

UdjinM6

Official Dash Dev
Dash Core Group
May 20, 2014
3,639
3,537
1,183
Hi,

Since about a week ago, running the (latest?)
dashman version 0.1.19 (15-g13a09d6-dirty)
always returns "No JSON object could be decoded"

so, launching it in debug mode (btw, could a --verbose be added to just turn it on through "set -x" ?)
bash -x dashman/dashman status

it turns out that the command
timeout 7 curl -s 'httpx://dashninja.pl/api/masternodes?ips=\["x.x.x.x:9999"\]&portcheck=1&balance=1'

gets a redirection into "www." + the old link

which... isn't followed because we're not telling it to do so.

How to fix this?
a) fix the url path (which may break again on the next dashninja website update), and/or
b) explicitly tell curl to follow the redirection, by passing it "-L" (I had gone with this one - for now)

so,
nano dashman/lib/dashman_functions.sh

and on about line 27

change:
curl_cmd='timeout 7 curl -s'

into:
curl_cmd='timeout 7 curl -s -L'

Save it (Ctrl+x, Enter)

Done! It's now fixed until moocowmoo comes back from vacations and updates the dashman tool :)

Cheers

[Edit: second attempt, first got stuck on the moderation approval queue]
Fixed 6 days ago, pull the latest version ;)
https://github.com/moocowmoo/dashman/commit/18e1a15b1bc998ea55972b37602b83eee8028bfc
 
  • Like
Reactions: studioz

DYGYs

New Member
Aug 11, 2016
4
0
1
43
Fixed 6 days ago, pull the latest version ;)
Thanks. Should have checked there first :)

I guess that I've just grown spoiled by the auto-update
notifications of the dashman, which didn't quite trigger (yet).

On a tangentially related (to me only, but granted... way off
topic to dashman): I've just got my first node payment skipped.

The info from 'httpx://dashninja.pl/mndetails.html?mnpubkey=XkqrtwtcK3e9Jsc4CZjnjgH5yWR3woyL94' says:
Last Paid (from dashd) - 8/10/2016, 5:10:58 PM (1 day 13 hours 48 minutes 41 seconds ago)
Last Paid (from blocks) - 8/3/2016, 11:46:19 AM (1 week 1 day 19 hours 13 minutes 20 seconds ago) on block 513838

What means "from dashd" above? Was it the expected date from the node's daemon itself?

Any clue on what can have been wrong, or it's just something
that do happens sometimes?
 

UdjinM6

Official Dash Dev
Dash Core Group
May 20, 2014
3,639
3,537
1,183
Thanks. Should have checked there first :)

I guess that I've just grown spoiled by the auto-update
notifications of the dashman, which didn't quite trigger (yet).

On a tangentially related (to me only, but granted... way off
topic to dashman): I've just got my first node payment skipped.

The info from 'httpx://dashninja.pl/mndetails.html?mnpubkey=XkqrtwtcK3e9Jsc4CZjnjgH5yWR3woyL94' says:
Last Paid (from dashd) - 8/10/2016, 5:10:58 PM (1 day 13 hours 48 minutes 41 seconds ago)
Last Paid (from blocks) - 8/3/2016, 11:46:19 AM (1 week 1 day 19 hours 13 minutes 20 seconds ago) on block 513838

What means "from dashd" above? Was it the expected date from the node's daemon itself?

Any clue on what can have been wrong, or it's just something
that do happens sometimes?
Yeah, this happens sometimes... The reason is that network sometimes has hard times to decide which masternode is the winner and we are not good enough to detect this yet, so we count that for every mn which received high number of votes, not only for the one which was actually paid later. I'm working on improving this logic but there are some difficulties - we need to find the balance between accuracy and speed (you don't want your mn/wallet to hick up for a few seconds scanning blocks every 2,5 minutes). Hopefully in 12.1 this will be much rare event if it would happen at all.
 

DYGYs

New Member
Aug 11, 2016
4
0
1
43
Yeah, this happens sometimes (...). Hopefully in 12.1 this will be much rare event if it would happen at all.
Thanks, I'll wait then :cool:

Regarding 12.1, public release is on queue for the next few days or still a couple of weeks?
 

UdjinM6

Official Dash Dev
Dash Core Group
May 20, 2014
3,639
3,537
1,183

DYGYs

New Member
Aug 11, 2016
4
0
1
43
PS. Friendly reminder - going offtopic for more than one post is not a good practice for your karma ;)
/
Duly noted :D

Back to dashman, while it's auto-update notification didn't kick in (this time), a manual "dashman sync" did indeed the trick, running now the very latest git release :)
 

martinf

Member
Aug 21, 2015
70
38
58
I'm seeing some strange masternode queue positions being reported by dashman.

When a masternode has been really unlucky and not been paid in the last 1.2*number_of_masternodes the lastPaid is set to zero. See:
https://github.com/dashpay/dash/blob/master/src/masternode.cpp#L255-L260

This causes dashman to treat the node as one that hasn't been paid. And sorts it at the very end of the queue. See:
https://github.com/moocowmoo/dashman/blob/master/lib/dashman_functions.sh#L840

I think even ignoring the zeroing of lastpaid the assumption that all unpaid nodes should be at the end of the sorted list is incorrect.

I think the correct way of sorting would be to sort all nodes in one list. The list should be sorted on lastpaid, unless lastpaid is zero. If lastpaid is zero the node should be sorted on (now - activeseconds). Right?
 

exact

New Member
Oct 19, 2016
19
14
3
48
Hi!

Please tell when you plan to upgrade to version 12.1? It makes sense to wait or try to update manually?

Thank you very much in advance. :)
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
  • Like
Reactions: exact and Solaso
Top Bottom