<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged fail</title>
<link>https://www.multichain.com/qa/tag/fail</link>
<description>Powered by Question2Answer</description>
<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>How to fix freezing of multichain?</title>
<link>https://www.multichain.com/qa/6645/how-to-fix-freezing-of-multichain</link>
<description>Hi, I have single node multichain on my server. A lot of times, during tests multichain is freezing. The only way to repair this is restart docker with it. What can be a reason? The server has enough power to handle docker with multichain.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/6645/how-to-fix-freezing-of-multichain</guid>
<pubDate>Wed, 13 Sep 2017 14:03:47 +0000</pubDate>
</item>
<item>
<title>List Assets returns a 500 status code when asset doesn't exist</title>
<link>https://www.multichain.com/qa/4910/list-assets-returns-500-status-code-when-asset-doesnt-exist</link>
<description>&lt;pre&gt;{&quot;method&quot;:&quot;listassets&quot;,&quot;params&quot;:[&quot;myAsset&quot;,false],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;test-chain&quot;}

&lt;/pre&gt;&lt;p&gt;I think this must be a recent change as I'm pretty sure listassets&amp;nbsp;didn't do this in previous versions. &amp;nbsp;By returning a 500 most clients (mine included) assume a fatal error of some kind and abort the request. &amp;nbsp;This isn't great since I was checking for the existence of an asset as part of my processing which now fails!&lt;br&gt;&lt;br&gt;This should return a 404 as not found&amp;nbsp;for http consistency or 200 and empty as I'm not techniucally going a &quot;GET&quot;, more a list with a filter, so 200 is probably more consistent.&lt;/p&gt;&lt;p&gt;Either way a 500 is a bit brutal :)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Marty&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/4910/list-assets-returns-500-status-code-when-asset-doesnt-exist</guid>
<pubDate>Thu, 27 Apr 2017 15:00:29 +0000</pubDate>
</item>
</channel>
</rss>