Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

dashman - linux masternode mangement made mootastic

Discussion in 'Tips and Tricks' started by moocowmoo, Oct 11, 2015.

  1. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    • Like Like x 2
  2. pin0de

    pin0de New Member

    Joined:
    Jan 30, 2016
    Messages:
    36
    Likes Received:
    29
    Trophy Points:
    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.
     
  3. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    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 Like x 1
  4. pin0de

    pin0de New Member

    Joined:
    Jan 30, 2016
    Messages:
    36
    Likes Received:
    29
    Trophy Points:
    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!!
     
    • Like Like x 2
  5. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    Glad to hear it! Makes me feel good to make peoples lives a little easier.
     
    • Like Like x 1
  6. Voluntary

    Voluntary Member

    Joined:
    May 14, 2016
    Messages:
    109
    Likes Received:
    37
    Trophy Points:
    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?
     
  7. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    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 Like x 1
    • Informative Informative x 1
  8. martinf

    martinf Member

    Joined:
    Aug 21, 2015
    Messages:
    70
    Likes Received:
    38
    Trophy Points:
    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.
     
  9. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    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.

    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.
     
    #99 moocowmoo, Jun 21, 2016
    Last edited: Jun 21, 2016
    • Like Like x 1
  10. martinf

    martinf Member

    Joined:
    Aug 21, 2015
    Messages:
    70
    Likes Received:
    38
    Trophy Points:
    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 Like x 1
  11. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    Glad to hear it! I just had to peek at the code to remember the dash.conf processing.

    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.
     
    #101 moocowmoo, Jun 21, 2016
    Last edited: Jun 21, 2016
    • Like Like x 1
  12. Balych

    Balych Active Member

    Joined:
    Sep 12, 2015
    Messages:
    365
    Likes Received:
    211
    Trophy Points:
    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 Like x 1
  13. splawik21

    splawik21 Grizzled Member
    Dash Core Team Foundation Member Dash Support Group Moderator

    Joined:
    Apr 8, 2014
    Messages:
    1,916
    Likes Received:
    1,273
    Trophy Points:
    1,283
    MOO indeed I get the same error as above.
     
  14. TaoOfSatoshi

    TaoOfSatoshi Grizzled Member

    Joined:
    Jul 15, 2014
    Messages:
    2,720
    Likes Received:
    2,613
    Trophy Points:
    1,183
  15. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    • Like Like x 3
    • Agree Agree x 1
  16. Balych

    Balych Active Member

    Joined:
    Sep 12, 2015
    Messages:
    365
    Likes Received:
    211
    Trophy Points:
    113
    Dash Address:
    Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
    Code:
    dash successfully upgraded to version 0.12.0.58
    Thanks
     
    • Like Like x 1
  17. 555007

    555007 Active Member

    Joined:
    Sep 15, 2015
    Messages:
    371
    Likes Received:
    169
    Trophy Points:
    113
    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?
     
    #107 555007, Jul 31, 2016
    Last edited: Jul 31, 2016
  18. 555007

    555007 Active Member

    Joined:
    Sep 15, 2015
    Messages:
    371
    Likes Received:
    169
    Trophy Points:
    113
    Update: full reinstall is healing everything.
    ;)
     
  19. DYGYs

    DYGYs New Member

    Joined:
    Aug 11, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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]
     
  20. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Fixed 6 days ago, pull the latest version ;)
    https://github.com/moocowmoo/dashman/commit/18e1a15b1bc998ea55972b37602b83eee8028bfc
     
    • Like Like x 1
  21. DYGYs

    DYGYs New Member

    Joined:
    Aug 11, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  22. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    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.
     
  23. DYGYs

    DYGYs New Member

    Joined:
    Aug 11, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  24. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Week or too till public testing, smth around month (and a half probably) for going live on mainnet if all is fine.

    PS. Friendly reminder - going offtopic for more than one post is not a good practice for your karma ;)
    e.g. for questions regarding 12.1 testing use https://www.dash.org/forum/threads/v12-1-testnet-launch-thread.9014/
     
  25. DYGYs

    DYGYs New Member

    Joined:
    Aug 11, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    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 :)
     
  26. martinf

    martinf Member

    Joined:
    Aug 21, 2015
    Messages:
    70
    Likes Received:
    38
    Trophy Points:
    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?
     
  27. exact

    exact New Member

    Joined:
    Oct 19, 2016
    Messages:
    19
    Likes Received:
    14
    Trophy Points:
    3
    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. :)
     
  28. Solaso

    Solaso Member

    Joined:
    Aug 20, 2015
    Messages:
    134
    Likes Received:
    20
    Trophy Points:
    68
  29. moocowmoo

    moocowmoo Bovine Bit-flipper
    Foundation Member

    Joined:
    Jun 15, 2014
    Messages:
    483
    Likes Received:
    603
    Trophy Points:
    263
    Dash Address:
    XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
    Try updating dashman first:

    Code:
    dashman/dashman sync
    if it's still doing it, pm me the output of
    Code:
    ls -la ~
     
    • Like Like x 2
  30. Solaso

    Solaso Member

    Joined:
    Aug 20, 2015
    Messages:
    134
    Likes Received:
    20
    Trophy Points:
    68
    Good. Updating helped