Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Couldn't connect to server and dashd unexpectedly quit

Discussion in 'Masternode Questions and Help.' started by reddy, Feb 27, 2019.

  1. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Hi!
    I tried to update my MN for DIP003 following this:
    https://docs.dash.org/en/stable/masternodes/dip3-upgrade.html

    After entering the BLS private key I stopped and restarted the MN. Now this error came up:

    "couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)"
    I didn´t changed anything with the server.

    Reinstalling dashman gave me this:
    "- dashd unexpectedly quit. Exiting"

    What´s wrong with my MN?
     
  2. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    The results for this commands:

    ps aux | grep dashd
    name 1345 0.0 0.0 14540 940 pts/2 S+ 13:50 0:00 grep --color=auto dashd

    .dashcore/dashd
    Dash Core server starting

    .dashcore/dash-cli getinfo
    error: couldn't connect to server: unknown (code -1)
    (make sure server is running and you are connecting to the correct RPC port)
     
  3. AjM

    AjM Well-known Member
    Foundation Member

    Joined:
    Jun 23, 2014
    Messages:
    1,323
    Likes Received:
    568
    Trophy Points:
    283
    You have to add masternodeblsprivkey=xxx to your masternode server dash.conf, do not delete old masternodeprivkey=xxx.
    Start dashd again.
     
  4. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, AjM! Now it seems to work.

    Another question. When I don´t update my MN for DIP003 because its already close to get payed, can I wait until it got paid and then do the update?
     
    #4 reddy, Feb 27, 2019
    Last edited: Feb 27, 2019
  5. AjM

    AjM Well-known Member
    Foundation Member

    Joined:
    Jun 23, 2014
    Messages:
    1,323
    Likes Received:
    568
    Trophy Points:
    283
    You have 6 days left to register your masternode.
    Any one please correct me if i'm wrong on this.

    Edit: removed dip3 activation, its already active, and ping to @tungfa
     
    • Like Like x 2
  6. AjM

    AjM Well-known Member
    Foundation Member

    Joined:
    Jun 23, 2014
    Messages:
    1,323
    Likes Received:
    568
    Trophy Points:
    283
    • Like Like x 1
    • Winner Winner x 1
  7. Sven

    Sven Member
    Masternode Owner/Operator

    Joined:
    Aug 15, 2017
    Messages:
    44
    Likes Received:
    12
    Trophy Points:
    48
    I have the same problem (dashd unexpectedly quit). I followed the manual update procedure here https://docs.dash.org/en/stable/masternodes/dip3-upgrade.html#dashcore-dip3-upgrade and added the BLS key to dash.conf then restarted the server. For every restart attempt, my debug log shows in the last few lines:

    Code:
    2019-02-27 15:29:51 Reading info from sporks.dat...
    2019-02-27 15:29:51 ERROR: Read: Deserialize or I/O error - CAutoFile::read: end of file: iostream error
    2019-02-27 15:29:51 Error reading sporks.dat: Load: File format is unknown or invalid, please fix it manually
    2019-02-27 15:29:51 Error: Failed to load sporks cache from
    /home/drak/.dashcore/sporks.dat
    2019-02-27 15:29:51 scheduler thread interrupt
    2019-02-27 15:29:51 PrepareShutdown: In progress...
    2019-02-27 15:29:51 Shutdown: done
    It looks like the file sporks.dat has been newly created during restart. It's empty (length=0).

    My dash.conf:

    Code:
    rpcuser=[redacted]
    rpcpassword=[redacted]
    rpcallowip=127.0.0.1
    rpcport=9998
    listen=1
    server=1
    daemon=1
    logtimestamps=1
    maxconnections=24
    masternode=1
    masternodeprivkey=[redacted]
    masternodeblsprivkey=[redacted]
    I generated the BLS key pair twice in my local Dash Core wallet (that holds the collateral but doesn't run the actual MN server). I got two different outputs and used the last one in above dash.conf on my server. Can that have anything to do with it?

    BTW, the log also has this entry:
    Code:
    Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcuser for rpcauth auth generation.
    Should I remove the rpcuser/pwd entries from my config?
     
    #7 Sven, Feb 27, 2019
    Last edited: Feb 27, 2019
  8. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    837
    Likes Received:
    491
    Trophy Points:
    133
    You shouldn't need to remove them as far as I know, you can safely delete all the files ending in .dat from the dashcore folder to force it to re-download them (except for wallet.dat of course). It looks like there's something not right with sporks.dat, close the client, delete or rename it and restart and that error should be gone.
     
    • Agree Agree x 1
    • Useful Useful x 1
  9. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    837
    Likes Received:
    491
    Trophy Points:
    133
    Re-start with reindex (ie. dashd -reindex) but I think evodb need deleting first, checking.
    EDIT: Yes, delete or rename evodb folder and restart with reindex. It will probably take a long time btw, quite a few block explorers have had to reindex and it's taken several hours.
     
    • Agree Agree x 1
  10. ac0

    ac0 New Member

    Joined:
    May 25, 2017
    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    8
    Thanks, I use dashd-reindex and it started (dashd), of course it's not sync.
    I did not delete evodb folder before using the reindex command, you think it's a problem?

    EDIT: is there a command to track the sync progression?
     
  11. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    837
    Likes Received:
    491
    Trophy Points:
    133
    I think so, a few folks have had the same issue and needed to delete/rename it, reindexing failed otherwise. Not a big deal, it should only take a few seconds to re-download a copy, the reindexing is the time consuming part!

    EDIT: I beleive there is a way of tracking progress but I'll need to check, will edit if/when I find it.

    getinfo should show what block it's up to and checking against a block explorer should give how many blocks left to go. tail -f ~/.dashcore/debug.log should also output what block the client is currently working on.
     
    #11 stan.distortion, Feb 27, 2019
    Last edited: Feb 27, 2019
    • Like Like x 1
  12. ac0

    ac0 New Member

    Joined:
    May 25, 2017
    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    8
    Thanks a lot, so I'll rename it now, don't want to reindex for nothing ;)
     
    #12 ac0, Feb 27, 2019
    Last edited: Feb 27, 2019
    • Like Like x 1
  13. ac0

    ac0 New Member

    Joined:
    May 25, 2017
    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    8
    Considering the getinfo, I assume it's dash-cli getinfo?

    If so may be there is a problem again since the blocks is 0:

    "version": 130100,
    "protocolversion": 70213,
    "walletversion": 61000,
    "balance": 0.00000000,
    "privatesend_balance": 0.00000000,
    "blocks": 0,
    "timeoffset": 0,
    "connections": 8,
    "proxy": "",
    "difficulty": 0.000244140625,
    "testnet": false,
    "keypoololdest": 1505638212,
    "keypoolsize": 1001,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "errors": ""
     
  14. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    837
    Likes Received:
    491
    Trophy Points:
    133
    That's ok, it will get going soon. Balances will update as it progresses, it'll need to get up to date with your last transaction before they're accurate.
     
    • Agree Agree x 1
  15. AjM

    AjM Well-known Member
    Foundation Member

    Joined:
    Jun 23, 2014
    Messages:
    1,323
    Likes Received:
    568
    Trophy Points:
    283
    Found this from your debug.log: 2019-02-27 14:45:00 Binding RPC on address 0.0.0.0 port 9998 failed.
     
    • Like Like x 1
    • Informative Informative x 1
  16. ac0

    ac0 New Member

    Joined:
    May 25, 2017
    Messages:
    21
    Likes Received:
    3
    Trophy Points:
    8
    You're right, I think I Should remove this line from my dash.conf, even if it seems that the programm choose port 9999 himself:

    2019-02-27 14:45:00 Bound to [::]:9999
    2019-02-27 14:45:00 Bound to 0.0.0.0:9999
    2019-02-27 14:45:00 AddLocal(xxxx.xxx.xxx.xxx:9999,4)
     
  17. Sven

    Sven Member
    Masternode Owner/Operator

    Joined:
    Aug 15, 2017
    Messages:
    44
    Likes Received:
    12
    Trophy Points:
    48
    Thanks, that worked, although I also had to delete instantsend.dat (another zero-length file). Now it's running smoothly.
     
    • Like Like x 3
  18. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Now I got the same problem again! I wanted to update my mn with dasman and had to add a new masternodeprivkey. I did wanted to restart the server with "~/.dashcore/dash-cli stop" but just got "couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port)".
    Because of this I registered again with the current DMT and added a new masternodeprivkey. As before I did´t delete the old lines. Now I still get the error-message.

    Looking forward for your help! :)
     
  19. AjM

    AjM Well-known Member
    Foundation Member

    Joined:
    Jun 23, 2014
    Messages:
    1,323
    Likes Received:
    568
    Trophy Points:
    283
    That error mean dashd is NOT running.
    masternodeblsprivkey is critical, check that from your dash.conf, it should match with DMT.

    Full v0.13 setup guide:
    https://docs.dash.org/en/stable/masternodes/setup.html
     
  20. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    It matches with DMT. But not sure, if the old masternodeprivkey is really the old one and not the one I used temporarily?
     
  21. reddy

    reddy New Member

    Joined:
    Aug 27, 2017
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Can someone please help me? MN is down :/

    Edit: Now I just reinstalled everthing and it works :)
     
    #21 reddy, Jun 11, 2019
    Last edited: Jun 12, 2019
  22. strophy

    strophy Administrator
    Dash Core Team Dash Support Group Moderator

    Joined:
    Feb 13, 2016
    Messages:
    582
    Likes Received:
    328
    Trophy Points:
    133
    masternodeprivkey is no longer required for versions 0.14+ and no longer has any effect since DIP3 activated.
     

Share This Page