Multichain explorer 2 cant find multichain directory

+1 vote

I get the following error when trying to start multichain explorer 2. I checked and the multichain node is definitely running from the same dir. Please help.

 

python3 -m explorer example.ini start
MultiChain Explorer, version 2.0


Couldn't find MultiChain directory /home/geo/.multichain/chainnew

rpchost=0.0.0.0

rpcport=9732/
Couldn't retrieve RPC parameters for local chain chainnew

asked Dec 16, 2021 by gravyplaya

2 Answers

+1 vote
 
Best answer
Hey there,
I had similar problem, take a look if you have any spaces before parameters in the file :)
answered Jan 25, 2022 by szypul
selected Jan 28, 2022 by gravyplaya
0 votes

If you don't want to specify datadir explicitly in the Explorer 2 .ini file, MultiChain should not be running from the same directory as the Explorer. It should be running from a directory based on the specified blockchain name. In any event I recommend just specify the datadir explicitly.

answered Dec 16, 2021 by MultiChain
Tried that. Same issue :(
OK, please post the full .ini file from MultiChain Explorer 2, and a command line transcript showing the response from the MulitChain blockchain directory, showing the output from the commands pwd ; ls -l
[main]

# Who to accept connections from.
# You can only have one host entry in the config file otherwise the explorer will report an error.
# host=0.0.0.0         # to accept connections from anybody (including localhost) e.g. production
# host=localhost     # to only accept connections from your local machine e.g. testing

host=0.0.0.0

# Port to serve web pages

port=4444


[chains]

chainnew=on
chain2=off

[chainnew]

name=chainnew

# The host serving MultiChain RPC, including scheme (e.g. "http://123.45.67.89"), default localhost ("http://127.0.0.1")
 rpchost=10.211.55.21

# The RPC port MultiChain node listens to. Required for remote nodes.
# Optional for local nodes, default is taken from multichain.conf. If not found there - 'default-rpc-port' from params.dat
 rpcport=9732

# The username for RPC calls. Required for remote nodes.
# Optional for local nodes, default is taken from multichain.conf.
rpcuser=multichainrpc

# The password for RPC calls. Required for remote nodes.
# Optional for local nodes, default is taken from multichain.conf.
rpcpassword=removed

# For chains running on local machine, datadir parameter, default ~/.multichain
datadir=~/.multichain


[chain2]

name=chain1
pwd; ls -l
/home/geo/.multichain
total 8
drwx------ 8 geo geo 4096 Dec 13 15:52 chain1
drwx------ 8 geo geo 4096 Dec 19 23:57 chainnew
-rw------- 1 geo geo    0 Jul 29 17:20 multichain.conf
multichain explorer 2 is in the ~/Downloads folder
So here's the problem – in the .ini file for MultiChain Explorer 2, the datadir should be something like this: /home/geo/.multichain/chainnew (see the example within the file)
Same problem.. Running in a virtual Ubuntu machine.

python3 -m explorer example.ini start
MultiChain Explorer, version 2.0


Couldn't find MultiChain directory /home/geo/.multichain/chainnew

rpchost=http://10.211.55.21

rpcport=9732/
Couldn't retrieve RPC parameters for local chain chainnew
Are you saying it's now a different machine?
no no its all on the same VM.
And if you run this what do you get?

ls -l /home/geo/.multichain/chainnew
ls -l /home/geo/.multichain/chainnew
total 156
drwx------ 3 geo geo  4096 Dec 13 16:12 blocks
drwx------ 2 geo geo  4096 Dec 20 00:10 chainstate
drwx------ 5 geo geo  4096 Dec 13 16:12 chunks
-rw------- 1 geo geo 44781 Dec 20 11:37 debug.log
-rw------- 1 geo geo   480 Dec 20 00:10 entities.dat
drwx------ 2 geo geo  4096 Dec 20 00:10 entities.db
-rw------- 1 geo geo    70 Dec 20 00:08 fee_estimates.dat
-rw------- 1 geo geo    98 Dec 17 09:56 multichain.conf
-rw------- 1 geo geo     8 Dec 20 00:10 multichain.pid
-rw------- 1 geo geo  9225 Dec 13 16:12 params.dat
-rw------- 1 geo geo  8988 Dec 13 16:12 params.dat.bak
-rw------- 1 geo geo  1106 Dec 20 15:07 peers.dat
-rw------- 1 geo geo 17152 Dec 20 00:10 permissions.dat
drwx------ 2 geo geo  4096 Dec 20 00:10 permissions.db
-rw------- 1 geo geo 10288 Dec 20 00:10 permissions.log
drwx------ 3 geo geo  4096 Dec 13 16:26 wallet
-rw------- 1 geo geo  1083 Dec 13 16:12 wallet.dat
Thanks, and the Explorer is also running as the "geo" user?
yes. I tried with sudo in front and same error.
OK, I'm not sure what's happening with the datadir setting under sudo on your VM. So I suggest just bypassing it, it's only used to read some configuration settings. Instead, just make sure you set these values correctly in your Explorer .ini file:

name=chainnew
rpchost=http://10.211.55.21
rpcport=9732
rpcuser=multichainrpc
rpcpassword=[whatever is set in multichain.conf]
looks like its responding with a 403 Forbidden

telnet 10.211.55.21 9732
Trying 10.211.55.21...
Connected to 10.211.55.21.
Escape character is '^]'.
HTTP/1.1 403 Forbidden
Date: Tue, 21 Dec 2021 04:32:20 +0000
Connection: close
Content-Length: 9
Content-Type: text/plain
Server: multichain-json-rpc/2.2

ForbiddenConnection closed by foreign host.
This is because of the rpcallowip setting for MultiChain. Assuming both the Explorer and node are running on the same (virtual) host, just change this in the Explorer .ini file:

rpchost=http://127.0.0.1
Still no luck. I give up.
Sorry to hear that. If you want more help, let us know. I can tell you for sure that we've had no problem with Explorer 2 in our testing here, so the problem is probably something quite simple in a configuration somewhere.
...