<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged datadir</title>
<link>https://www.multichain.com/qa/tag/datadir</link>
<description>Powered by Question2Answer</description>
<item>
<title>multichain-util clone is ignoring -datadir option</title>
<link>https://www.multichain.com/qa/83629/multichain-util-clone-is-ignoring-datadir-option</link>
<description>&lt;p&gt;After creating a chain &amp;nbsp;like so:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;&amp;nbsp;multichain-util create test-test_3 -datadir=/mnt/disks/data/multichain_data/&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;MultiChain 2.3 Utilities (latest protocol 20013)&lt;/p&gt;&lt;p&gt;Blockchain parameter set was successfully generated.&lt;br&gt;You can edit it in /mnt/disks/data/multichain_data/test-test_3/params.dat before running multichaind for the first time.&lt;/p&gt;&lt;p&gt;To generate blockchain please run &quot;multichaind test-test_3 -daemon&quot;.&lt;/p&gt;&lt;p&gt;Cannot create chain parameter set, file /home/test/.multichain/public_access_3/params.dat does not exist&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;nbsp;I start the chain&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;multichaind test-test_3 -daemon&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;MultiChain 2.3 Daemon (Community Edition, latest protocol 20013)&lt;/p&gt;&lt;p&gt;Starting up node...&lt;/p&gt;&lt;p&gt;ERROR: Parameter set for blockchain test-test_3 is not complete.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;If you want to create new blockchain please run one of the following:&lt;/p&gt;&lt;p&gt;&amp;nbsp; multichain-util create test-test_3&lt;br&gt;&amp;nbsp; multichain-util clone &amp;lt;old-blockchain-name&amp;gt; test-test_3&lt;/p&gt;&lt;p&gt;And rerun multichaind test-test_3&lt;/p&gt;&lt;p&gt;&lt;br&gt;If you want to connect to existing blockchain please specify seed node:&lt;/p&gt;&lt;p&gt;&amp;nbsp; multichaind test-test_3@&amp;lt;seed-node-ip&amp;gt;&lt;br&gt;&amp;nbsp; multichaind test-test_3@&amp;lt;seed-node-ip&amp;gt;:&amp;lt;seed-node-port&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;And when I try to clone an existing chain, -datadir is ignored and instead the multichain-util thinks I am pointing to elsewhere.&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;multichain-util clone public_access_3 test-test_3 -datadir=/mnt/disks/data/multichain_data/&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;MultiChain 2.3 Utilities (latest protocol 20013)&lt;/p&gt;&lt;p&gt;Cannot create chain parameter set, file /home/test/.multichain/public_access_3/params.dat does not exist&lt;br&gt;ERROR: Blockchain parameter set was not generated.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/83629/multichain-util-clone-is-ignoring-datadir-option</guid>
<pubDate>Wed, 08 Nov 2023 14:05:35 +0000</pubDate>
</item>
<item>
<title>Use persistent data dir as failover mechanism</title>
<link>https://www.multichain.com/qa/12441/use-persistent-data-dir-as-failover-mechanism</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I'm running Multichain as master in a docker container with a volume mapped to a permanent storage so if the container dies, it can be restarted using the same data dir.&lt;/p&gt;&lt;p&gt;However this is not working as expected, as on restart, I get the following error:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;/data/chain1 folder already exists...&lt;br&gt;Starting the chain with multichaind -txindex -printtoconsole -shrinkdebugfilesize -datadir=/data chain1...&lt;/p&gt;&lt;p&gt;MultiChain 2.0 beta 1 Daemon (latest protocol 20006)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;MultiChain version build 2.0 beta 1 protocol 20006 (Nov 21 2018, 10:39:54)&lt;br&gt;Using OpenSSL version OpenSSL 1.0.1h 5 Jun 2014&lt;br&gt;Using BerkeleyDB version Berkeley DB 4.8.30: (April&amp;nbsp; 9, 2010)&lt;br&gt;Default data directory /data/chain1&lt;br&gt;Using data directory /data/chain1&lt;br&gt;Using config file /data/chain1/chain1.conf&lt;br&gt;Using at most 125 connections (65536 file descriptors available)&lt;br&gt;Using 16 threads for script verification&lt;br&gt;Using wallet wallet.dat&lt;br&gt;init message: Verifying wallet...&lt;br&gt;CDBEnv::Open : LogDir=/data/chain1/database ErrorFile=/data/chain1/db.log&lt;br&gt;init message: Initializing multichain...&lt;br&gt;mchn: Parameter set is valid - initializing blockchain parameters...&lt;br&gt;Wallet mode: 00000003&lt;br&gt;nFileVersion = 100000&lt;br&gt;Keys: 2 plaintext, 0 encrypted, 2 w/ metadata, 2 total&lt;br&gt;Node paused state is set to 00000000&lt;br&gt;Binding RPC on address :: port 8570 (IPv4+IPv6 bind any: 1)&lt;br&gt;Bound to [::]:8571&lt;br&gt;Bound to 0.0.0.0:8571&lt;br&gt;Filter initialization completed&lt;br&gt;Other nodes can connect to this node using:&lt;br&gt;multichaind chain1@174.16.212.240:8571&lt;/p&gt;&lt;p&gt;Setting banned transaction list:&amp;nbsp; &amp;nbsp; 0 transactions&lt;br&gt;init message: Loading block index...&lt;br&gt;Opening LevelDB in /data/chain1/blocks/index&lt;br&gt;Opened LevelDB successfully&lt;br&gt;Opening LevelDB in /data/chain1/chainstate&lt;br&gt;Opened LevelDB successfully&lt;br&gt;nFileVersion = 100000&lt;br&gt;Keys: 2 plaintext, 0 encrypted, 2 w/ metadata, 2 total&lt;br&gt;LoadBlockIndexDB: last block file = 0&lt;br&gt;LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=11, size=3000, heights=0...10, time=2019-01-18...2019-01-18)&lt;br&gt;Checking all blk files are present...&lt;br&gt;LoadBlockIndexDB(): transaction index enabled&lt;br&gt;LoadBlockIndexDB(): hashBestChain=006e9bbff1dd146a9cdff73d4bd8e1f729f4f75568650f0523f3e0b99e345229 height=10 date=2019-01-18 18:08:26 progress=1.000000&lt;br&gt;Error: Incorrect or no genesis block found. Wrong datadir for network?&lt;br&gt;Error: Incorrect or no genesis block found. Wrong datadir for network?&lt;br&gt;Shutdown: In progress...&lt;br&gt;StopNode()&lt;br&gt;Node stopped&lt;br&gt;Shutdown: done&lt;br&gt;CDBEnv::EnvShutdown : Error 22 shutting down database environment: Invalid argument&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Apparently, on restart, it's detecting that there is already an existing data dir, so it's just trying to spin up the master node again using it with:&lt;/p&gt;&lt;pre&gt;multichaind -txindex -printtoconsole -shrinkdebugfilesize -datadir=/data chain1&lt;/pre&gt;&lt;p&gt;But maybe I need to start it in a different way when the data dir is already there.&lt;/p&gt;&lt;p&gt;Can you please advice?&lt;/p&gt;&lt;p&gt;Thanks!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/12441/use-persistent-data-dir-as-failover-mechanism</guid>
<pubDate>Fri, 18 Jan 2019 18:52:02 +0000</pubDate>
</item>
<item>
<title>Why does using multichain-cli on the node thats running require datadir?</title>
<link>https://www.multichain.com/qa/5991/why-does-using-multichain-node-thats-running-require-datadir</link>
<description>It seems a little strange that the multichain-cli cannot find the datadir or that it even requires the datadir for that matter.&lt;br /&gt;
&lt;br /&gt;
Surely the node should know its own directory and not rely on cli passing this through?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/5991/why-does-using-multichain-node-thats-running-require-datadir</guid>
<pubDate>Tue, 01 Aug 2017 08:46:28 +0000</pubDate>
</item>
<item>
<title>Bug in Multichain-cli for datadir option?</title>
<link>https://www.multichain.com/qa/5989/bug-in-multichain-cli-for-datadir-option</link>
<description>I am granting a node after bringing up a new chain on our test server. We are using the -datadir=b:\&lt;br /&gt;
&lt;br /&gt;
I am getting error: Error parsing JSON:-datadir=b:\&lt;br /&gt;
&lt;br /&gt;
multichain-util and multichaind both accepted b:\ drive letter</description>
<guid isPermaLink="true">https://www.multichain.com/qa/5989/bug-in-multichain-cli-for-datadir-option</guid>
<pubDate>Tue, 01 Aug 2017 08:32:04 +0000</pubDate>
</item>
<item>
<title>Can I use any folder with the datadir parameter?</title>
<link>https://www.multichain.com/qa/3792/can-i-use-any-folder-with-the-datadir-parameter</link>
<description>Can I use any folder with the datadir parameter? Specifically &amp;quot;c:\MULTICHAIN\node0\chains\chain0\&amp;quot; &amp;nbsp;The reason I am asking is that when I try to run the chain with the multichaind in this case, it says &amp;quot;ERROR: Parameter set for blockchain chain0 is not complete.&amp;quot;&lt;br /&gt;
Do I always have to use %AppData%... ?&lt;br /&gt;
&lt;br /&gt;
And actually, what I want to achieve first of all is to run multiple nodes on one PS. How do I do this?&lt;br /&gt;
&lt;br /&gt;
Thanks.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/3792/can-i-use-any-folder-with-the-datadir-parameter</guid>
<pubDate>Thu, 26 Jan 2017 20:59:25 +0000</pubDate>
</item>
</channel>
</rss>