dashman - linux masternode mangement made mootastic

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Thanks for your help. I did not think it was possible that dashman could have anything to do with it, either. I was just covering all my bases, as I thought dashman was the only variable that had changed from my previous setup (which was unaffected).

After looking into it more, I discovered that there is one more variable that is different from my previous setup. It seems the VPS I recently setup with dashman were also on a different server location than my earlier nodes. I've contacted VPS support to see if they can figure out what may have happened with that server. Auto-start script was active too, so a short downtime would not have kicked them out of the queue. 70+minutes downtime seems pretty unreasonable for a VPS.

EDIT

VPS provider got back to me. Apparently a new SSD was installed on the server with my MNs on it and the downtime did exceed one hour, so I guess you get what you pay for with cheaper VPS services! One missed payment when your MN is right about to get paid could easily make it worth a MN operator's while to pay for a higher quality service with no downtime.
 
Last edited by a moderator:

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Love the auto-update prompt, BTW.
Code:
dashman version 0.1.13 - Fri Nov 13 20:34:41 EST 2015
gathering info, please wait...

dashman requires updating. Latest version is: 0.1.14
Do 'dashman sync' manually, or choose yes below.

sync dashman to github now?  [y/N] y
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
so it turns out it's a distro thing. Debian I think. They distribute netcat as two different packages.

netcat - TCP/IP swiss army knife -- transitional package <-- "nc" only supports ipv4, doesn't have a -4 switch
netcat-traditional - TCP/IP swiss army knife
netcat6 - TCP/IP swiss army knife with IPv6 support <-- "nc6" only supports ipv6 (I think, he's installing it now for me to find out)

yay, platforms!
I'm trying dashman on fedora20 and although installing nc fixed the missing netcat error I had initially, i now get a missing netcat6 message.

installing nc6 supposedly should do the trick, but it doesn't. Any ideas, or should I just burn this old fedora and try debian?
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
I recommend using a different linux distribution for now.
There are too many little differences to patch out.

The pure-python version I'm working on will not have most of these dependencies.
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
I recommend using a different linux distribution for now.
There are too many little differences to patch out.

The pure-python version I'm working on will not have most of these dependencies.
Thanks a lot for checking it out, Moo. I'll try out the latest debian and let you know how it goes. Happy new year to you, too!
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Got multi-MN (randomized!) voting working perfectly on a debian distro.

I know you're busy on the soda machine now, but maybe you can help me with one more thing when you have a free moment.

How do I tell "dashman status" to use the masternode.conf, like vote does?
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Got multi-MN (randomized!) voting working perfectly on a debian distro.

I know you're busy on the soda machine now, but maybe you can help me with one more thing when you have a free moment.

How do I tell "dashman status" to use the masternode.conf, like vote does?
dashman status only works on a local instance in version 0.1.
version 0.2 will be complete in a few months and will be able to give you remote statuses.
(you'll run an instance of dashman on each masternode and you'll be able to query them remotely)
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Ah, I see. I knew something awesome was in the works! Looking forward to it.

For now, I guess I just wanted something quick and easy to check if multiple MN are online or not.

I remember you or udjinM6 or someone else once posted how to do this just by using the masternodelist command and some special characters to separate the IP addresses and filter results to show just the MN you want to check the basic status of, but I can't find it anymore.
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
It works like a charm!

Thanks for putting that together.

It's really impressive to see how fast you work. I'm glad you're on our side. :D
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
It works like a charm!

Thanks for putting that together.
Glad to hear it! You're welcome.
Get the github version if you haven't already, it shows the queue position too.

It's really impressive to see how fast you work. I'm glad you're on our side. :D
Thanks! The more I write, the faster I can. I love discrete projects like this.
 

nightowl

Member
Dec 30, 2015
67
105
73
Hey Guys

This looks great but I've run into some issues. I tried to find the problem myself but I'm not making progress. If I run dashman vote I get 1 red output saying "cannot". That's it.

I'm on Arch Linux and I know it uses python3 by default (breaking a few programs still on python2). I tried changing it to python2 manually, but that didn't work. I actually don't even think this is a python issue, the error seems to happen in the bash-startup script. I did check, I do have bash version 4

DashMan Screenshot at 2016-01-14 23:13:50.png


Any idea's where I could go dig next?
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
nightowl -- pushed a temporary patch onto the arch branch.

git remote update ; git checkout arch ; ./dashman status

The issues were a) not recognizing your package manager and b) gnu netcat has different switches.

I've got a pure python implementation in the works, but this branch should work for you for the time being.

Let me know if you run into any other trouble, I'll be happy to push quick fixes.
 
  • Like
Reactions: MangledBlue

nightowl

Member
Dec 30, 2015
67
105
73
Wow! Kudos to you for figuring it out that quickly! (I did a git diff master arch to see what you did).

I sent a donation as a small token of my appreciation (it's small in dollars but quite an amount in my local currency... sorry will send more soon!).

I can report that ./dashman version and ./dashman status is working 100% fine. Thank you for that!

I just have to check my config again because ./dashman vote just says "exiting", but I suspect it has something to do with my local masternode.conf file.
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
you're welcome -- vagrant makes it easy. And thanks!

---

nope, not your masternode.conf -- needed another compatibility patch.

python3 compat is turning out to be a pain. python2 is a dependency for now.

git pull the arch branch -- should work now!
 
Last edited by a moderator:

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Hey moo, I'm trying to use dashman vote and it keeps telling me I need to sync even though I'm on the latest version. Selecting No will not allow me to run dashman vote.

Code:
[email protected]:~/dashman$ ./dashman vote
dashman version 0.1.16 - Mon Feb  1 23:29:33 UTC 2016
gathering info, please wait...

dashman requires updating. Latest version is:
Do 'dashman sync' manually, or choose yes below.

sync dashman to github now?  [y/N] y
dashman version 0.1.16 - Mon Feb  1 23:29:48 UTC 2016
Fetching origin
No local changes to save
Already on 'master'
Your branch is up-to-date with 'origin/master'.
HEAD is now at 8308b15 version bump
--------------

--------------
dashman version 0.1.16 - Mon Feb  1 23:29:54 UTC 2016
gathering info, please wait...

dashman requires updating. Latest version is:
Do 'dashman sync' manually, or choose yes below.

sync dashman to github now?  [y/N] y
dashman version 0.1.16 - Mon Feb  1 23:30:03 UTC 2016
Fetching origin
No local changes to save
Already on 'master'
Your branch is up-to-date with 'origin/master'.
HEAD is now at 8308b15 version bump
--------------

--------------
dashman version 0.1.16 - Mon Feb  1 23:30:26 UTC 2016
gathering info, please wait...

dashman requires updating. Latest version is:
Do 'dashman sync' manually, or choose yes below.

sync dashman to github now?  [y/N] y
dashman version 0.1.16 - Mon Feb  1 23:31:01 UTC 2016
Fetching origin
No local changes to save
Already on 'master'
Your branch is up-to-date with 'origin/master'.
HEAD is now at 8308b15 version bump
--------------

--------------
dashman version 0.1.16 - Mon Feb  1 23:31:09 UTC 2016
gathering info, please wait...

dashman requires updating. Latest version is:
Do 'dashman sync' manually, or choose yes below.

sync dashman to github now?  [y/N]
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Strange. It's working now. I wonder why it did that? Maybe it was my internet connection or something. In any case, you might want to consider a modification to allow users to select "No" and run the program with their current version (which in my case was up to date anyway).
 

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
it couldn't get the version from github.
notice how it said "latest version is :"
but had no version?

I'll push a patch for a better error message later tonight. I agree that's confusing.

in this instance, it's good it didn't let you continue. if you can't contact github, you can't vote anyways. (99.9% of the time)

glad it's working for you now!
 
  • Like
Reactions: Bridgewater

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
Thanks bugeater, glad you like it.

When I first released dashman I saw over 300 clones from github. I haven't looked recently, but I'd guess it's around that many masternodes using it.

In a few months, I'm going to release version 0.2, which will do remote management too, but I'm busy on other projects right now.
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
Thanks! I've tried it a few times now after the update and it works every time.
 

Bridgewater

Well-known Member
Foundation Member
Dec 14, 2014
196
189
203
So I tried using Dashman over Tor, and it is not a happy combination.

At least one of the external sites that ./dashman status links to (looks like chainz.cryptoid.info) evokes a Cloudfare middle-man captcha input request when the site detects a known Tor exit node connecting to it with javascript disabled (curl does not use js, I assume?).

Maybe you could change the output for an unreachable site's data to simply fail and list in red text (unable to connect) instead of the current block height or whatever information it was supposed to display for it? Right now, connected through Tor, dashman status fails when it encounters that Cloudfare captcha page for chainz.cryptoid.info. If i keep trying new exit nodes, eventually I can find one that is not blacklisted by chainz and dashman status works.

Code:
sudo ./dashman status
dashman version 0.1.16 (1-gb306080) - Fri Feb 12 02:03:18 UTC 2016
gathering info, please wait.../home/user/dashman/lib/dashman_functions.sh: line 750: <!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | CloudFlare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>
<!--[if lte IE 9]><script type="text/javascript" src="/cdn-cgi/scripts/jquery.min.js"></script><![endif]-->
<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]-->
<script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script>


</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
        <h1 data-translate="challenge_headline">One more step</h1>
        <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> chainz.cryptoid.info</h2>
      </div><!-- /.header -->

      <div class="cf-section cf-highlight cf-captcha-container">
        <div class="cf-wrapper">
          <div class="cf-columns two">
            <div class="cf-column">
              <div class="cf-highlight-inverse cf-form-stacked">
                <form class="challenge-form" id="challenge-form" action="/cdn-cgi/l/chk_captcha" method="get">
  <script type="text/javascript" src="/cdn-cgi/scripts/cf.challenge.js" data-type="normal"  data-ray="2734b7d456dc35d8" async data-sitekey="6LfOYgoTAAAAAInWDVTLSc8Yibqp-c9DaLimzNGM" data-stoken="v2KH0siLxYitSGEGO-YPWBKKP90shkRAE2fdXbr6sjBwdPdFQL8LqPThD4t6Bl8RlsTlDwZChgY0DLmeKL7aGgv_x6ee1hxhSpVhCHQp3HU"></script>
  <div class="g-recaptcha"></div>
  <noscript id="cf-captcha-bookmark" class="cf-captcha-info">
    <div><div style="width: 302px">
      <div>
        <iframe src="https://www.google.com/recaptcha/api/fallback?k=6LfOYgoTAAAAAInWDVTLSc8Yibqp-c9DaLimzNGM&stoken=v2KH0siLxYitSGEGO-YPWBKKP90shkRAE2fdXbr6sjBwdPdFQL8LqPThD4t6Bl8RlsTlDwZChgY0DLmeKL7aGgv_x6ee1hxhSpVhCHQp3HU" frameborder="0" scrolling="no" style="width: 302px; height:422px; border-style: none;"></iframe>
      </div>
      <div style="width: 300px; border-style: none; bottom: 12px; left: 25px; margin: 0px; padding: 0px; right: 25px; background: #f9f9f9; border: 1px solid #c1c1c1; border-radius: 3px;">
        <textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 40px; border: 1px solid #c1c1c1; margin: 10px 25px; padding: 0px; resize: none;"></textarea>
        <input type="submit" value="Submit"></input>
      </div>
    </div></div>
  </noscript>
</form>

              </div>
            </div>

            <div class="cf-column">
              <div class="cf-screenshot-container">
            
                <span class="cf-no-screenshot"></span>
            
              </div>
            </div>
          </div><!-- /.columns -->
        </div>
      </div><!-- /.captcha-container -->

      <div class="cf-section cf-wrapper">
        <div class="cf-columns two">
          <div class="cf-column">
            <h2 data-translate="why_captcha_headline">Why do I have to complete a CAPTCHA?</h2>

            <p data-translate="why_captcha_detail">Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.</p>
          </div>

          <div class="cf-column">
            <h2 data-translate="resolve_captcha_headline">What can I do to prevent this in the future?</h2>

            <p data-translate="resolve_captcha_antivirus">If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.</p>

            <p data-translate="resolve_captcha_network">If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.</p>
          </div>
        </div>
      </div><!-- /.section -->

      <div class="cf-error-footer cf-wrapper">
  <p>
    <span class="cf-footer-item">CloudFlare Ray ID: <strong>2734b7d456dc35d8</strong></span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span data-translate="your_ip">Your IP</span>: 176.61.147.146</span>
    <span class="cf-footer-separator">&bull;</span>
    <span class="cf-footer-item"><span data-translate="performance_security_by">Performance &amp; security by</span> <a data-orig-proto="https" data-orig-ref="www.cloudflare.com/5xx-error-landing?utm_source=error_footer" id="brand_link" target="_blank">CloudFlare</a></span>
  
  </p>
</div><!-- /.error-footer -->


    </div><!-- /#cf-error-details -->
  </div><!-- /#cf-wrapper -->

  <script type="text/javascript">
  window._cf_translation = {};


</script>

</body>
</html> - 2: syntax error: operand expected (error token is "<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js ie6 oldie" lang="en-US"> <![endif]-->
<!--[if IE 7]>    <html class="no-js ie7 oldie" lang="en-US"> <![endif]-->
<!--[if IE 8]>    <html class="no-js ie8 oldie" lang="en-US"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en-US"> <!--<![endif]-->
<head>
<title>Attention Required! | CloudFlare</title>
<meta charset="UTF-8" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
<meta name="robots" content="noindex, nofollow" />
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1" />
<link rel="stylesheet" id="cf_styles-css" href="/cdn-cgi/styles/cf.errors.css" type="text/css" media="screen,projection" />
<!--[if lt IE 9]><link rel="stylesheet" id='cf_styles-ie-css' href="/cdn-cgi/styles/cf.errors.ie.css" type="text/css" media="screen,projection" /><![endif]-->
<style type="text/css">body{margin:0;padding:0}</style>
<!--[if lte IE 9]><script type="text/javascript" src="/cdn-cgi/scripts/jquery.min.js"></script><![endif]-->
<!--[if gte IE 10]><!--><script type="text/javascript" src="/cdn-cgi/scripts/zepto.min.js"></script><!--<![endif]-->
<script type="text/javascript" src="/cdn-cgi/scripts/cf.common.js"></script>


</head>
<body>
  <div id="cf-wrapper">
    <div class="cf-alert cf-alert-error cf-cookie-error" id="cookie-alert" data-translate="enable_cookies">Please enable cookies.</div>
    <div id="cf-error-details" class="cf-error-details-wrapper">
      <div class="cf-wrapper cf-header cf-error-overview">
        <h1 data-translate="challenge_headline">One more step</h1>
        <h2 class="cf-subheadline"><span data-translate="complete_sec_check">Please complete the security check to access</span> chainz.cryptoid.info</h2>

...
  </p>
</div><!-- /.error-footer -->


  </div><!-- /#cf-error-details -->
  </div><!-- /#cf-wrapper -->

  <script type="text/javascript">
  window._cf_translation = {};
 
 
</script>

</body>
</html> - 2")
Exiting.
 

qwizzie

Grizzled Member
Aug 6, 2014
2,112
1,290
1,183
i'm using dash currently in my home directory (home -> user -> .dash) and have dashman installed on root.
I noticed that it can not find dash from there, is there any way to make this work or do i have to move the .dash folder to root or something ?
(i kinda like where it is now as it easy to approach with Windows through WinSCP)
 
Last edited by a moderator:

moocowmoo

Bovine Bit-flipper
Foundation Member
Jun 15, 2014
483
603
263
masternode.me
Dash Address
XmoocowYfrPKUR6p6M5aJZdVntQe71irCX
i'm using dash currently in my home directory (home -> user -> .dash) and have dashman installed on root.
I noticed that it can not find dash from there, is there any way to make this work or do i have to move the .dash folder to root or something ?
(i kinda like where it is now as it easy to approach with Windows through WinSCP)
I'm surprised it's not finding it. Where do you have dash-cli?
this routine looks in three places for it: https://github.com/moocowmoo/dashman/blob/master/lib/dashman_functions.sh#L141-L212

Also, if you are running dashman as a different user than dashd you'll run into trouble because the HOME environ will be different.

The easiest fix is to just update your PATH environ to point to the directory containing dash-cli like:
Code:
export PATH=/path/to/dash-cli/directory:$PATH
and add that to the end of your ~/.bash_aliases or ~/.bashrc

you'll know it's working by being able to type 'dash-cli' from any directory and it'll work.
 

qwizzie

Grizzled Member
Aug 6, 2014
2,112
1,290
1,183
I'm surprised it's not finding it. Where do you have dash-cli?
this routine looks in three places for it: https://github.com/moocowmoo/dashman/blob/master/lib/dashman_functions.sh#L141-L212

Also, if you are running dashman as a different user than dashd you'll run into trouble because the HOME environ will be different.

The easiest fix is to just update your PATH environ to point to the directory containing dash-cli like:
Code:
export PATH=/path/to/dash-cli/directory:$PATH
and add that to the end of your ~/.bash_aliases or ~/.bashrc

you'll know it's working by being able to type 'dash-cli' from any directory and it'll work.
I'm using
I'm surprised it's not finding it. Where do you have dash-cli?
this routine looks in three places for it: https://github.com/moocowmoo/dashman/blob/master/lib/dashman_functions.sh#L141-L212

Also, if you are running dashman as a different user than dashd you'll run into trouble because the HOME environ will be different.

The easiest fix is to just update your PATH environ to point to the directory containing dash-cli like:
Code:
export PATH=/path/to/dash-cli/directory:$PATH
and add that to the end of your ~/.bash_aliases or ~/.bashrc

you'll know it's working by being able to type 'dash-cli' from any directory and it'll work.
got it to work .. thanks.
Looks great.