Multiple nodes on the same machine. KMD still uses the default data folder - General - Algorand

Multiple nodes on the same machine. KMD still uses the default data folder

post by Post_Singularity on Apr 19, 2021

Hi there!

So I recently installed algorand node and algorand devtools through the Debian install. I managed to correctly create two nodes (MainNet and TestNet). However even though for TestNet everything seems to be in order, kmd folder is in

$ALGORAND_DATA/.algorand/testnet-v1.0/kmd-v0.5

Commands like “goal wallet list” seems to be working fine on both nodes however the actual data for both is on the MainNet folder.

Is this supposed to happen?

post by fabrice on Apr 19, 2021

All goal commands use the data folder $ALGORAND_DATA by default, unless a different folder is specified using the -d flag.

post by Post_Singularity on Apr 19, 2021

Right. Maybe I can be more specific hold on.

My directory structure is like this:

MainNet data folder is /var/lib/algorand

TestNet data folder is /var/lib/algorand-testnet

The former contains the structure .algorand/ → testnet-v1.0/kmd-v0.5/ and mainnet-v1.0/kmd-v0.5/ while the latter doesn’t even contain .algorand/.

What I’m saying is that the information for wallets on the TestNet node still lives inside MainNet data folder which I think it’s weird.

post by fabrice on Apr 19, 2021

It is a bit strange that you have a subfolder .algorand inside /var/lib/algorand.

The fact that is contains both mainnet-v1.0 and testnet-v1.0 seems to indicate that at some point your started a node on /var/lib/algorand/.algorand both for testnet and mainnet (and you changed the genesis in between).

Does /var/lib/algorand-testnet contain genesis.json? If not, this means it is not a real data directory for Algorand?

What I would do is the following, check the list of wallets and the status for each folder, i.e., something like:


goal node status -d /var/lib/algorand
ggoal node status -d /var/lib/algorand/.algorand
...
goal wallet list -d /var/lib/algorand
goal wallet list -d /var/lib/algorand/.algorand
...

and for each wallet listed above, check the list of accounts:

goal account list -d /var/lib/algorand -w WALLET_NAME
...

post by Post_Singularity on Apr 21, 2021

I’ll uninstall everything, do a fresh install and keep you posted.

EDIT: Everything is working as expected now. I created the folder for the second node and then started both and created wallets for both. Every node folder has its own kmd folder correctly separated.

I must have messed up something the first time. Thank you very much for your help!