Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Neither MPOS nor NOMP can connect to Dash port. Please help.

Discussion in 'Questions and Help' started by Mark2701, Oct 12, 2016.

  1. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Hi there,

    I have dash coin daemon running on port 9998 but neither MPOS nor NOMP can connect to it. It seems to reject any access to the RPC port with the supplied username and password. Here's the error that SSH throws when I ran:
    cd nomp
    node init.js


    2016-10-12 02:55:03 [Pool] dash Unauthorized RPC access - invalid RPC username or password
    2016-10-12 02:55:03 [Pool] dash Unauthorized RPC access - invalid RPC username or password
    f25965e6-8f9f-11e6-97b8-3b98a42f2bca.png

    I'm positive that my dash.json & dash.conf are all good and have the right RPC username or password.

    PS: I'm using NOMP as the stratum server & MPOS as the front end.

    Please, any help will be appreciated.

    Best Regards,
    Mark
     
    #1 Mark2701, Oct 12, 2016
    Last edited: Oct 12, 2016
  2. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
  3. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Thank you for the response sir @UdjinM6 . Ok. So should I change my username & password on dash.conf and restart the daemon?
     
  4. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Try to change them both in dash.conf and dash.json, then restart daemon and try to start pool again.

    EDIT: fixed dash.js -> dash.json
     
    #4 UdjinM6, Oct 12, 2016
    Last edited: Oct 12, 2016
  5. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    when I search for dash.js, there are 3 files pops up. Am I going to apply the changes to all of the files? Here's the screenshot
    2016-10-12_1855.png
     
  6. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    oops, I meant dash.json, the one in pool_configs folder :)
     
  7. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    I got the same error @UdjinM6 :( This is what I did:
    1. I changed the rpcuser and rpcpassword on dash.conf, dash.json & global.inc.php
    2. I restarted the daemon by logging in to the root and run this command on ssh:
    service ssh restart

    2016-10-12 02:55:03 [Pool] dash Unauthorized RPC access - invalid RPC username or password
    2016-10-12 02:55:03 [Pool] dash Unauthorized RPC access - invalid RPC username or password
     
  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
    Errr.... That's not how you do that. You restarted ssh daemon which has nothing to do with dashd. You should run "dash-cli stop", wait few seconds and then run "dashd" (if you have them in /usr/local/bin or any other globally available place, otherwise "cd" into folder with dashd and dash-cli first and then "./dash-cli stop", wait, "./dashd").
     
  9. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Oh sorry. Yes,thank you for that @UdjinM6 . But I received the same error running that command. It's the same error I got from running the stratum:
    2016-10-13_2146.png

    I don't understand. I got the same rpcuser &rpcpassword on both dash.conf & dash.json :(
     
  10. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Ah, right, my bad! Should stop daemon first and THEN change username/password. Kill it via "killall dashd" and start again via "./dashd".
     
  11. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    It's totally fine :) Thank you. I will try it right now
     
  12. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    It says dashd (941): Operation not permitted. I also tried on dash/src but still no luck. :(
    2016-10-13_2254.png
     
  13. Balych

    Balych Active Member

    Joined:
    Sep 12, 2015
    Messages:
    365
    Likes Received:
    211
    Trophy Points:
    113
    Dash Address:
    Xba1ychX7CjgbRrCKE1LjHjT3jLUhcexs5
    You need root privileges, try sudo killall dashd.
     
  14. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    It worked! I love you man @Balych ! This is what I did for others who are having the same problem:
    1. Login to your root in ssh.
    2. run sudo killall dashd
    3. Then changed the rpc username and password on dash.conf, dash.json & global.inc.php.
    4. Then log back in to ssh. But this time, login as user.
    5. "cd" into folder with dashd and dash-cli and run "./dashd"
    6. Finally, "cd", then "cd nomp", then "node init.js".

    Cheers @UdjinM6 & @Balych !! You guys are the champion!
     
  15. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    I noticed that I still got this
    2016-10-14 02:39:06 [Pool] [dash] (Thread 2) Unauthorized XdyWJuriHVxDxk1KRNozbJzWgbKdLi6AoD:x [175.201.84.97]
    2016-10-14_1031.png

    And it says "No new blocks for 55 seconds - updating transactions & rebroadcasting". Did I miss something?
     
  16. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    You probably misconfigured this part
    Code:
    "mposMode": {
     
  17. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Here's that part on my dash.json @UdjinM6 :

    "mposMode": {
    "enabled": true,
    "host": "127.0.0.1",
    "port": 3306,
    "user": "root",
    "password": "mypassword",
    "database": "dashcoinpool",
    "checkPassword": true,
    "autoCreateWorker": false
    }


    Is the port correct for dash coin?
     
  18. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    That port is for mysql iirc and looks correct. Is "XdyW...." actually registered on your mpos as a user with password "x"? If not, there is no wonder he is rejected.

    Code:
            /* Checks for valid password in database when miners connect. */
            "checkPassword": true,
    
            /* Unregistered workers can automatically be registered (added to database) on stratum
               worker authentication if this is true. */
            "autoCreateWorker": false
    
     
  19. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Thank you for explaining that @UdjinM6 . But I'm confused on "XdyW..." part. I don't see the "XdyWJuriHVxDxk1KRNozbJzWgbKdLi6AoD" on mPOS directory. It's not on the global.inc.php either. But I found this on the net when I'm searching for the problem:
    https://bchain.info/DASH/addr/XdyWJuriHVxDxk1KRNozbJzWgbKdLi6AoD

    Maybe this will help explain the problem?
     
  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
    If I get it correctly, "XdyWJuriHVxDxk1KRNozbJzWgbKdLi6AoD" is some miner who is trying to mine on your pool and who probably assumes that he doesn't need to register to mine. This is true for nomp pools usually but it's not the case for your mpos-enabled pool given the settings you use.
     
  21. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Yeah. That's what I'm thinking too. Darn. Maybe this miner with "XdyWJuriHVxDxk1KRNozbJzWgbKdLi6AoD" is a leftover from the past user that I've created for uNOMP mining pool. I'm going to delete the other user directory that's trying to connect to the recent mining pool that is mpos-enabled pool. But check this out please:
    2016-10-15_0149.png

    This is mainly the problem I'm having with DASH. The "No new blocks for 55 seconds ". I have not encountered this with lite coin or bitcoin :( Somehow, I think that maybe I configured and connected to the wrong port or diff for DASH @UdjinM6 . Is that right? Please correct me if I'm wrong.

    Thanks @UdjinM6 !!
     
  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
    That's not an issue at all imo and works as designed:
    Code:
           /* Some miner apps will consider the pool dead/offline if it doesn't receive anything new jobs
           for around a minute, so every time we broadcast jobs, set a timeout to rebroadcast
           in this many seconds unless we find a new job. Set to zero or remove to disable this. */
        "jobRebroadcastTimeout": 55,
    
     
    • Like Like x 1
  23. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    Oh. are this "no new blocks for 55 seconds" didn't cause this error on MPOS Admin Panel > System > monitoring?
    2016-10-17_1923.png
    Please note that I didn't get this error with Lite coin and Bitcoin. Only with DASH. That's why I came into conclusion that I might listening to the wrong port @UdjinM6 :(
     
    #23 Mark2701, Oct 17, 2016
    Last edited: Oct 17, 2016
    • Like Like x 1
  24. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
    this is my dash.conf:
    rpcuser=myusername
    rpcpassword=mypassword
    rpcallowip=127.0.0.1
    rpcport=9998
    server=1
    daemon=1
    gen=0
    staking=0
    listen=0
     
  25. Erica

    Erica New Member

    Joined:
    Oct 17, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I have the same error:
    findblock, blockupdate & payout

    Did you guys solve this already please?
     
  26. Mark2701

    Mark2701 New Member

    Joined:
    Oct 12, 2016
    Messages:
    15
    Likes Received:
    1
    Trophy Points:
    3
  27. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,637
    Likes Received:
    3,536
    Trophy Points:
    1,183
    Sorry guys, but I have no idea how mpos works, I'm only familiar with nomp code because I contributed to it some time ago. So far I see that this part is working as it should and I doubt it's Dash specific issue with mpos, so it's probably a good idea to ask at mpos github repo or on general mpos related forums/threads somewhere. Sorry... :(