MultiChain / multichain-explorer

Web-based explorer for MultiChain blockchains
GNU Affero General Public License v3.0
177 stars 140 forks source link

Support for alpha 29? #20

Closed mgeeforce closed 7 years ago

mgeeforce commented 7 years ago

Hi - just upgraded to build 1.0 alpha 29 and pulled the newest multichain-explorer code and now when I try to start multichain-explorer I get the following error:

Failed to catch up {'blkfile_offset': 0, 'blkfile_number': 1, 'chain_id': 1, 'loader': u'default', 'conf': None, 'dirname': u'/home/synergy/.multichain/guild1', 'id': 10}

Traceback (most recent call last):
  File "Mce/DataStore.py", line 2892, in catch_up
    if not store.catch_up_rpc(dircfg):
  File "Mce/DataStore.py", line 3117, in catch_up_rpc
    tx = get_tx(rpc_tx_hash)
  File "Mce/DataStore.py", line 2974, in get_tx
    rpc_tx_hex = rpc("getrawtransaction", rpc_tx_hash)
  File "Mce/DataStore.py", line 2949, in rpc
    ret = util.jsonrpc(chain_name, url, func, *params)
  File "Mce/util.py", line 246, in jsonrpc
    raise JsonrpcException(resp['error'], method, params)
JsonrpcException: getrawtransaction: No information available about transaction (code -710)
Abe initialized.
Listening on http://0.0.0.0         # to accept connections from anybody (including localhost) e.g. production:2750
Launched background thread to catch up tx every 60.0 seconds

The chain debug log looks good. The CLI gives me this:

synergy@beechbone:~/multichain-explorer$ multichain-cli guild1

MultiChain Core RPC client build 1.0 alpha 29 protocol 10008

Interactive mode

guild1: getinfo
{"method":"getinfo","params":[],"id":1,"chain_name":"guild1"}

{
    "version" : "1.0 alpha 29",
    "nodeversion" : 10000129,
    "protocolversion" : 10006,
    "chainname" : "guild1",
    "description" : "MultiChain guild1",
    "protocol" : "multichain",
    "port" : 4291,
    "setupblocks" : 60,
    "nodeaddress" : "guild1@192.168.0.32:4291",
    "burnaddress" : "1XXXXXXWX1XXXXXXcBXXXXXXV5XXXXXXaUYtcV",
    "incomingpaused" : false,
    "miningpaused" : false,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "walletdbversion" : 2,
    "reindex" : false,
    "blocks" : 814336,
    "timeoffset" : 0,
    "connections" : 3,
    "proxy" : "",
    "difficulty" : 0.00001526,
    "testnet" : false,
    "keypoololdest" : 1478620018,
    "keypoolsize" : 2,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00000000,
    "errors" : ""
}

Thoughts?

Thanks

Mike

gidgreen commented 7 years ago

Can you post the output of getruntimeparams?

mgeeforce commented 7 years ago

hmmmm

guild1: getruntimeparams
{"method":"getruntimeparams","params":[],"id":1,"chain_name":"guild1"}

{
    "port" : 4291,
    "reindex" : false,
    "rescan" : false,
    "txindex" : true,
    "autocombineminconf" : 1,
    "autocombinemininputs" : 50,
    "autocombinemaxinputs" : 100,
    "autocombinedelay" : 1,
    "autocombinesuspend" : 15,
    "autosubscribe" : "",
    "handshakelocal" : "1BGp32TEHtXqXDvsjztNqzMWZqTCanKEMPtReS",
    "bantx" : "",
    "lockblock" : "",
    "hideknownopdrops" : false,
    "maxshowndata" : 16384,
    "miningrequirespeers" : true,
    "mineemptyrounds" : 10.00000000,
    "miningturnover" : 0.50000000,
    "lockadminminerounds" : 10,
    "gen" : true,
    "genproclimit" : 1,
    "mineblocksondemand" : false
}

So when I change the rpcport in multichain.conf to be 4291 multichain-explorer works.

gidgreen commented 7 years ago

OK, great, so I'm closing this issue.

mgeeforce commented 7 years ago

Sorry forget the last line of my last post. This problem still exists when trying to rebuild the explorer sqlite db. Strangely, if you change the rpcport in multichain.conf to 4291 without restarting multichain - it will rebuild the db by connecting over port 4291. So it looks like explorer can only connect vi IPv4?

synergy@beechbone:~/multichain-explorer$ netstat -lp | grep multichain
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:4291            0.0.0.0:*               LISTEN      13900/multichaind   
tcp6       0      0 [::]:4290               [::]:*                  LISTEN      13900/multichaind   
tcp6       0      0 [::]:4291               [::]:*                  LISTEN      13900/multichaind   

I was reading this old thread regarding similar issues for clues: https://bitcointalk.org/index.php?topic=165336.0

mgeeforce commented 7 years ago
synergy@beechbone:~$ uname -a
Linux beechbone 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Digging a little deeper this does seem to be related: maybe the Python client is defaulting to IPv4 - where no one is actually listening.

synergy@beechbone:~$ netstat -lp4 | grep multichain
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:4291            0.0.0.0:*               LISTEN      13900/multichaind   
synergy@beechbone:~$ netstat -lp6 | grep multichain
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp6       0      0 [::]:4290               [::]:*                  LISTEN      13900/multichaind   
tcp6       0      0 [::]:4291               [::]:*                  LISTEN      13900/multichaind   

I tried adding rpcallowip=127.0.0.1 (and restarting multichain) but it didn't make any difference.

mgeeforce commented 7 years ago

Forget all of the above. Sorry for wasting space. Regardless of what netstat says, "telnet -4 localhost 4290" which forces the connection on IPv4 totally works and proves that someone is listening on port 4290.

synergy@beechbone:~$ netstat -an | grep 4290
tcp        0      0 127.0.0.1:49884         127.0.0.1:4290          ESTABLISHED
tcp        0      0 127.0.0.1:49880         127.0.0.1:4290          TIME_WAIT  
tcp6       0      0 :::4290                 :::*                    LISTEN     
tcp6       0      0 127.0.0.1:4290          127.0.0.1:49884         ESTABLISHED
tcp6       0      0 127.0.0.1:4290          127.0.0.1:49882         TIME_WAIT  

Back to the drawing board.