• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

Couldn't connect to server and dashd unexpectedly quit

reddy

New member
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?
 
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)
 
You have to add masternodeblsprivkey=xxx to your masternode server dash.conf, do not delete old masternodeprivkey=xxx.
Start dashd again.
 
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?
 
Last edited:
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
 
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?
 
Last edited:
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.
 
Ok, I have the same error here, so I post on the same thread, but I assume the problem may be different.

I psot my debug.log here:



2019-02-27 14:45:00 Dash Core version v0.13.1.0
2019-02-27 14:45:00 InitParameterInteraction: parameter interaction: -masternode=1 -> setting -listen=1
2019-02-27 14:45:00 InitParameterInteraction: parameter interaction: -masternode=1 -> setting -maxconnections=125
2019-02-27 14:45:00 InitParameterInteraction: parameter interaction: -externalip set -> setting -discover=0
2019-02-27 14:45:00 InitParameterInteraction: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1
2019-02-27 14:45:00 Assuming ancestors of block 0000000000000024e26c7df7e46d673724d223cf4ca2b2adc21297cc095600f4 have valid signatures.
2019-02-27 14:45:00 Default data directory /home/li/.dashcore
2019-02-27 14:45:00 Using data directory /home/li/.dashcore
2019-02-27 14:45:00 Using config file /home/li/.dashcore/dash.conf
2019-02-27 14:45:00 Using at most 125 automatic connections (1024 file descriptors available)
2019-02-27 14:45:00 Using 32 MiB out of 32 requested for signature cache, able to store 1048576 elements
2019-02-27 14:45:00 Using 0 threads for script verification
2019-02-27 14:45:00 Binding RPC on address 0.0.0.0 port 9998 failed.
2019-02-27 14:45:00 HTTP: creating work queue of depth 16
2019-02-27 14:45:00 Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or ma$
2019-02-27 14:45:00 HTTP: starting 4 worker threads
2019-02-27 14:45:00 scheduler thread start
2019-02-27 14:45:00 Creating backup of /home/li/.dashcore/wallet.dat -> /home/li/.dashcore/backups/wallet.dat.2019-02-27-14-45
2019-02-27 14:45:00 Old backup deleted: "/home/li/.dashcore/backups/wallet.dat.2019-02-27-13-50"
2019-02-27 14:45:00 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)
2019-02-27 14:45:00 Using wallet wallet.dat
2019-02-27 14:45:00 init message: Verifying wallet...
2019-02-27 14:45:00 CDBEnv::Open: LogDir=/home/li/.dashcore/database ErrorFile=/home/li/.dashcore/db.log
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)
2019-02-27 14:45:00 fLiteMode 0
2019-02-27 14:45:00 init message: Loading sporks cache...
2019-02-27 14:45:00 Reading info from sporks.dat...
2019-02-27 14:45:00 ERROR: Read: Failed to open file /home/li/.dashcore/sporks.dat
2019-02-27 14:45:00 Missing file sporks.dat, will try to recreate
2019-02-27 14:45:00 * Using 37.5MiB for block index database
2019-02-27 14:45:00 * Using 8.0MiB for chain state database
2019-02-27 14:45:00 * Using 254.5MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space)
2019-02-27 14:45:00 init message: Loading block index...
2019-02-27 14:45:00 Opening LevelDB in /home/li/.dashcore/evodb
2019-02-27 14:45:00 Opened LevelDB successfully
2019-02-27 14:45:00 Using obfuscation key for /home/li/.dashcore/evodb: 0000000000000000
2019-02-27 14:45:00 Opening LevelDB in /home/li/.dashcore/blocks/index
2019-02-27 14:45:00 Opened LevelDB successfully
2019-02-27 14:45:00 Using obfuscation key for /home/li/.dashcore/blocks/index: 0000000000000000
2019-02-27 14:45:00 Opening LevelDB in /home/li/.dashcore/chainstate
2019-02-27 14:45:00 Opened LevelDB successfully
2019-02-27 14:45:00 Using obfuscation key for /home/li/.dashcore/chainstate: 2f9e33fb6cde6452
2019-02-27 14:45:09 LoadBlockIndexDB: last block file = 62
2019-02-27 14:45:09 LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=5319, size=118854943, heights=1022866...1028180, time=2019-02-17...2019-02$
2019-02-27 14:45:09 Checking all blk files are present...
2019-02-27 14:45:10 LoadBlockIndexDB: transaction index enabled
2019-02-27 14:45:10 LoadBlockIndexDB: address index disabled
2019-02-27 14:45:10 LoadBlockIndexDB: timestamp index disabled
2019-02-27 14:45:10 LoadBlockIndexDB: spent index disabled
2019-02-27 14:45:10 LoadBlockIndexDB: hashBestChain=000000000000001cc1df155b4d1d428e7f04f604e17f9aa6e3944bdaef1e189f height=1028180 date=2019-02-27 07:47:08$
2019-02-27 14:45:10 init message: Verifying blocks...
2019-02-27 14:45:10 Verifying last 6 blocks at level 3
2019-02-27 14:45:10 [0%]...*** Found EvoDB inconsistency, you must reindex to continue
2019-02-27 14:45:10 Error: Error: A fatal internal error occurred, see debug.log for details
2019-02-27 14:45:10 Shutdown requested. Exiting.
2019-02-27 14:45:10 scheduler thread interrupt
2019-02-27 14:45:10 PrepareShutdown: In progress...
2019-02-27 14:45:10 Shutdown: done
2019-02-27 14:55:30

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.
 
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?
 
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?

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.
 
Last edited:
  • Like
Reactions: ac0
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": ""
 
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": ""

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.
 
Ok, I have the same error here, so I post on the same thread, but I assume the problem may be different.

I psot my debug.log here:


snip

Found this from your debug.log: 2019-02-27 14:45:00 Binding RPC on address 0.0.0.0 port 9998 failed.
 
  • Like
Reactions: ac0
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)
 
... 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.
Thanks, that worked, although I also had to delete instantsend.dat (another zero-length file). Now it's running smoothly.
 

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! :)
 
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! :)
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
 
It matches with DMT. But not sure, if the old masternodeprivkey is really the old one and not the one I used temporarily?
 
Back
Top