Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

TAO'S MASTERNODE SETUP GUIDE FOR DUMMIES (UPDATE GUIDE UPDATED FOR 13.0)

Discussion in 'Masternode Guides' started by TaoOfSatoshi, Oct 15, 2014.

  1. lostmybrain

    lostmybrain New Member

    Joined:
    Sep 23, 2014
    Messages:
    17
    Likes Received:
    14
    Trophy Points:
    3
    Any chance of this being updated for 12.1? Can't find anything about doing a fresh install of it.
     
  2. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
  3. TaoOfSatoshi

    TaoOfSatoshi Grizzled Member

    Joined:
    Jul 15, 2014
    Messages:
    2,746
    Likes Received:
    2,615
    Trophy Points:
    1,183
    • Like Like x 2
  4. bhkien

    bhkien Active Member

    Joined:
    Mar 31, 2014
    Messages:
    454
    Likes Received:
    282
    Trophy Points:
    133
    Can anybody please let me know what the status "WATCHDOG_EXPIRED" means?

    Thank you,
     
  5. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    It means your node have not yet seen proper "watchdog" message (which is triggered by Sentinel) from the masternode in WATCHDOG_EXPIRED state. While in migrations period it's ok to see this for all 12.0 masternodes (they don't have one) and for some 12.1 masternodes (due to connectivity issues - 12.1 masternode could be surrounded by 12.0 nodes only which do not recognize this message and do not relay it).
     
  6. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    I have the same problem. Running 2 MN on 1 Server with 2 different IP's on VULTR (15GB SSD, 1 CPU 768MB Memory 1000GB Bandwidth).
    On my local PC it showed ENABLED first but after a while is the status WATCHDOG_EXPIRED.
    Also on dashninja.pl it was 100% active but now it shows the status Inactive(0%).

    But if I look on Server, both 2 dash demons are running.
    ps ax| grep dashd
    22216 ? SLsl 0:51 ./dashd
    22271 ? SLsl 0:57 ./dashd


    Also staus shows
    ./dash-cli mnsync status
    {
    "AssetID": 999,
    "AssetName": "MASTERNODE_SYNC_FINISHED",
    "Attempt": 0,
    "IsBlockchainSynced": true,
    "IsMasternodeListSynced": true,
    "IsWinnersListSynced": true,
    "IsSynced": true,
    "IsFailed": false
    }


    So should I not care about it in migration period? Or is something wrong with it please?
     
    #336 Dusan, Feb 7, 2017
    Last edited: Feb 7, 2017
  7. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    What's the output of "dash-cli masternode status", same for both? Check for special characters in the RPC settings in dash.conf (RPC user and pass), that's caused trouble for some. looks like then need alphanumeric only.
     
  8. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Masternodes in WATCHDOG_EXPIRED should be paid during migration period too. The issue most likely is caused by lack of connectivity (e.g. 12.1 mn is surrounded by 12.0 nodes only, which can't relay new messages).
     
    • Like Like x 2
  9. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    dash-cli masternode status
    {
    .
    .
    "status": "Masternode successfully started"
    }

    ..both OK

    The dash.conf worked fine for me in 12.0.58.
    I just copied it and changed in it:
    masternodeaddr=111.111.111.111:9999 to externalip=111.111.111.111 without 9999,
    all other remained the same.
     
    • Like Like x 1
  10. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    Thanks for Info

    When I look peers on my local PC there are more 12.1 MN's surrounded then 12.0 MN's.

    How can I display peers in console on the Server please?
     
    • Like Like x 1
  11. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    "dash-cli getpeerinfo" to get full info or "dash-cli getpeerinfo | grep version" to get only list of their protocols
     
    • Like Like x 2
  12. bhkien

    bhkien Active Member

    Joined:
    Mar 31, 2014
    Messages:
    454
    Likes Received:
    282
    Trophy Points:
    133
    Thank you very much.
     
    • Like Like x 1
  13. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    It seams to be 12.1 majority... similar by both MN's

    dash-cli getpeerinfo | grep subver
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.0.58/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.0.58/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
    "subver": "/Dash Core:0.12.1/",
     
    • Like Like x 1
  14. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    It can still be isolated in other parts of the network, there are a lot of islands with one version or the other. It's perfectly normal, you don't realise it as a user but it's kind of scary from an admin perspective :) Try running "dash-cli getchaintips" sometime, they're places where the network has begun to fork, there will only be a few on a new installation but there are pages of them on an old one! They all fix themselves though, it's extremely fault-tolerant and that's what the network is doing at the mo, trying to go with one version or the other. The new version will accept the old one but the old can't accept the new so it can only go one way but it's chaotic while it sorts its self out.

    "Masternode successfully started" on both clients means all is good. You could try checking them in dashninja to see what another part of the network is seeing, you may get the same results as your own client, maybe the reverse but it's a good service, chances are they'll both show up as active:
    https://www.dashninja.pl/
     
    • Like Like x 1
    • Agree Agree x 1
  15. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    Maybe I did not properly do the step 10 at Updating+to+12.1
    */5 * * * * cd /home/YOURUSERNAME/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log

    should it be run as root or user?

    */5 * * * * root cd /home/YOURUSERNAME/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 > sentinel-cron.log
    */5 * * * * MNuser cd /home/YOURUSERNAME/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 > sentinel-cron.log
     
  16. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    The Problem was that this command did not run from crontab (advised to run every 5 min., I set it up every one minit):
    cd /home/YOURUSERNAME/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
     
  17. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    You've changed YOURUSERNAME to the name of your home folder? It shouldn't be run as root and if it has you may need to change permissions on some files before it can be run as a normal user.
     
  18. Dusan

    Dusan New Member

    Joined:
    Oct 7, 2016
    Messages:
    32
    Likes Received:
    9
    Trophy Points:
    8
    Of course I changed YOURUSERNAMe :)
    I run it as MNuser (not root) and it wors fine.
     
    • Like Like x 1
  19. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    #349 stan.distortion, Feb 8, 2017
    Last edited: Feb 8, 2017
  20. GrandMasterDash

    GrandMasterDash Well-known Member
    Masternode Owner/Operator

    Joined:
    Jul 12, 2015
    Messages:
    2,713
    Likes Received:
    963
    Trophy Points:
    183
    In "Remote wallet -- in datacenter, has no funds, and runs Sentinel"
    ...
    step 5) delete debug.log and all cache files new dashcore folder

    rm -f .dashcore/{debug.log,peers.dat,fee_estimates.dat,mn*.dat}


    ... it should also remove budget.dat?

    rm -f .dashcore/{budget.dat,debug.log,peers.dat,fee_estimates.dat,mn*.dat}
     
    • Agree Agree x 1
  21. TaoOfSatoshi

    TaoOfSatoshi Grizzled Member

    Joined:
    Jul 15, 2014
    Messages:
    2,746
    Likes Received:
    2,615
    Trophy Points:
    1,183
    Guide updated for 12.1! :D
     
    • Like Like x 2
  22. Mirage1981

    Mirage1981 New Member

    Joined:
    Feb 10, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the update,

    but I run into some problems with the sentinel at step 8:
    but I receive:
    it wont let me copy the full list

    any help??
     
  23. MrMime

    MrMime Well-known Member
    Foundation Member

    Joined:
    Mar 9, 2014
    Messages:
    169
    Likes Received:
    36
    Trophy Points:
    188
    Code:
    Traceback (most recent call last):
      File "bin/sentinel.py", line 206, in <module>
        Transient.set(mutex_key, misc.now(), timeout_seconds)
      File "lib/models.py", line 662, in set
        setting, created = Setting.get_or_create(name=setting_name, defaults=setting_dikt)
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 4807, in get_or_create
        return cls.create(**params), True
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 4776, in create
        inst.save(force_insert=True)
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/playhouse/signals.py", line 69, in save
        ret = super(Model, self).save(*args, **kwargs)
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 4982, in save
        pk_from_cursor = self.insert(**field_dict).execute()
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 3435, in execute
        cursor = self._execute()
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 2826, in _execute
        return self.database.execute_sql(sql, params, self.require_commit)
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 3683, in execute_sql
        self.commit()
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 3507, in __exit__
        reraise(new_type, new_type(*exc_args), traceback)
      File "/home/mrmime/.dashcore/sentinel/venv/local/lib/python2.7/site-packages/peewee.py", line 3676, in execute_sql
        cursor.execute(sql, params or ())
    peewee.OperationalError: attempt to write a readonly database 
    So I get this error when I try to run sentinel w/o sudo, seems to work okay with sudo however, in getting no response. MN is fully synced, but appears that crontab eventually fails, and I resort back to inactive status after a couple hours.. Any similar issues?

    Got some assistance, likely I ran things as root, derp :/
     
    #353 MrMime, Feb 11, 2017
    Last edited: Feb 11, 2017
  24. Janus Anderson

    Janus Anderson New Member

    Joined:
    Feb 13, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I've been trying to figure out this problem for a couple of hours now - (I'm a relative linux noob so forgive me if I'm missing something obvious).

    I've been trying to update my masternode to 12.1, but when I try to start the sentinel, I get:

    > ~/dashcore/sentinel$ venv/bin/python bin/sentinel.py
    > -342: non-JSON HTTP response with '401 Unauthorized' from server
    > Cannot connect to dashd. Please ensure dashd is running and the JSONRPC port is open to Sentinel.

    My masternode is running off of vultr as the guide suggests.

    I have tried:
    * verifying that my rpcuser and rpcpassword in dash.conf do not have any special characters
    * tried adding :9999 to the externalip in dash.conf.
    * starting an entirely new ubuntu 14.04 instance and going through the setup from scratch, this still happens.

    Also, I noticed in the step where you start the dash masternode in the guide (./dashd), if you don't specify the -daemon flag it will not give you back shell control, it just hangs.

    I can verify that the dash server is running:

    :~/dashcore$ ./dash-cli mnsync status
    {
    "AssetID": 999,
    "AssetName": "MASTERNODE_SYNC_FINISHED",
    "Attempt": 0,
    "IsBlockchainSynced": true,
    "IsMasternodeListSynced": true,
    "IsWinnersListSynced": true,
    "IsSynced": true,
    "IsFailed": false
    }

    I am also using the default firewall specified in the guide. What am I missing here? Thanks for any help :)
     
  25. Bertrand256

    Bertrand256 Active Member

    Joined:
    Feb 13, 2017
    Messages:
    228
    Likes Received:
    272
    Trophy Points:
    123
    Dash Address:
    XwZzf7yqYoUBnDFqE7r3zuNmpwKo1CYLMC
    @Janus, did you notice, that along with version 12.1, dashd configuration directory has changed from .dash to .dashcore? Make sure, that you modify .dashcore/dash.conf file, not the .dash/dash.conf.
     
  26. Janus Anderson

    Janus Anderson New Member

    Joined:
    Feb 13, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Ok, I figured it out. That wasn't it exactly but I did make a mistake with the directory structure because I'm a linux noob.

    Apparently my directory was named 'dashcore' and not '.dashcore' which are different :) Seems to be working now, thanks!
     
  27. camosoul

    camosoul Grizzled Member

    Joined:
    Sep 19, 2014
    Messages:
    2,266
    Likes Received:
    1,130
    Trophy Points:
    1,183
    Does dashd have an option similar to the banhammer that qt has? I monitor the peers list and give any 12.0 node a 1 week banhammer in qt...
     
  28. Bertrand256

    Bertrand256 Active Member

    Joined:
    Feb 13, 2017
    Messages:
    228
    Likes Received:
    272
    Trophy Points:
    123
    Dash Address:
    XwZzf7yqYoUBnDFqE7r3zuNmpwKo1CYLMC
  29. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Code:
    help setban
    Code:
    setban "ip(/netmask)" "add|remove" (bantime) (absolute)
    
    Attempts add or remove a IP/Subnet from the banned list.
    
    Arguments:
    1. "ip(/netmask)" (string, required) The IP/Subnet (see getpeerinfo for nodes ip) with a optional netmask (default is /32 = single ip)
    2. "command"      (string, required) 'add' to add a IP/Subnet to the list, 'remove' to remove a IP/Subnet from the list
    3. "bantime"      (numeric, optional) time in seconds how long (or until when if [absolute] is set) the ip is banned (0 or empty means using the default time of 24h which can also be overwritten by the -bantime startup argument)
    4. "absolute"     (boolean, optional) If set, the bantime must be a absolute timestamp in seconds since epoch (Jan 1 1970 GMT)
    
    Examples:
    
    > dash-cli setban "192.168.0.6" "add" 86400
    > dash-cli setban "192.168.0.0/24" "add"
    > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "setban", "params": ["192.168.0.6", "add" 86400] }' -H 'content-type: text/plain;' http://127.0.0.1:9998/
    
     
  30. johnambush

    johnambush New Member

    Joined:
    Feb 19, 2015
    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    3
    Hi guys. I had masternode set up on vultr till new version came up. There were some hardware requirments, minimun and recommended. So my question is: is that that minimal vultr server enough for masternode or do I need to rent bigger? And What about raspberry pi2?