<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>MultiChain Developer Q&amp;A - Recent questions tagged rpc</title>
<link>https://www.multichain.com/qa/tag/rpc</link>
<description>Powered by Question2Answer</description>
<item>
<title>Can't connect two nodes on different networks</title>
<link>https://www.multichain.com/qa/11065/cant-connect-two-nodes-on-different-networks</link>
<description>&lt;p&gt;I'm creating a chain using multichain-util, setting a username and password in multichain.conf, and&amp;nbsp;then starting the daemon using &lt;span style=&quot;background-color:#D3D3D3&quot;&gt;multichaind chainname -rpcallowip=0.0.0.0/0 -daemon.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;I receive the following output:&lt;/p&gt;&lt;p&gt;Starting up node...&lt;/p&gt;&lt;p&gt;Other nodes can connect to this node using:&lt;/p&gt;&lt;p&gt;multichaind chainname@172.20.10.0:7217&lt;/p&gt;&lt;p&gt;Node ready.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;When trying to use&amp;nbsp;&lt;span style=&quot;background-color:#D3D3D3&quot;&gt;multichaind chainname@172.20.10.0:7217 -rpcport=7216 -rpcuser=multichainrpc -multichainpass=pass&lt;/span&gt; from another computer I receive:&lt;/p&gt;&lt;p&gt;Error: Couldn't connect to the seed node&amp;nbsp;172.20.10.0 on port 7217 - please check multichaind is running at that address and that your firewall settings allow incoming connections.&lt;/p&gt;&lt;p&gt;I have tried turning firewalls off to no success. I can create two nodes and connect them successfully when they are using the same internet connection, but can't find what the problem is here.&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/11065/cant-connect-two-nodes-on-different-networks</guid>
<pubDate>Fri, 14 Sep 2018 14:46:38 +0000</pubDate>
</item>
<item>
<title>Multiprocessing and streams</title>
<link>https://www.multichain.com/qa/10947/multiprocessing-and-streams</link>
<description>I've a stream of n items. Instead of retrieving all of them with a single api call, I wanted to make use of multiprocessing. So, I wrote a little code that fetches first n/2 items on a core and fetches the remaining n/2 items on another core. However, I did not obtain any speed-up. So, is interacting with streams not compatible with multiprocessing?&lt;br /&gt;
&lt;br /&gt;
You can see my attempt here: &lt;a href=&quot;https://gist.github.com/TinfoilHat0/c509deb1219c268b9b2e8aa8e5e6cee5#file-streams_in_parallel-py&quot; rel=&quot;nofollow&quot;&gt;https://gist.github.com/TinfoilHat0/c509deb1219c268b9b2e8aa8e5e6cee5#file-streams_in_parallel-py&lt;/a&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10947/multiprocessing-and-streams</guid>
<pubDate>Thu, 06 Sep 2018 07:21:02 +0000</pubDate>
</item>
<item>
<title>JSON RPC command</title>
<link>https://www.multichain.com/qa/10782/json-rpc-command</link>
<description>I want to create an asset with multiple input parameter.&lt;br /&gt;
&lt;br /&gt;
(BODY) {&amp;quot;method&amp;quot;: &amp;quot;issue&amp;quot;, &amp;quot;params&amp;quot;: [&amp;quot;1PeM6q5ZSbne5SuLPFLD3zcPWcKke9MBiKT1Ln&amp;quot;, &amp;nbsp;&amp;quot;SAPCoins&amp;quot;, 1000]}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
like :- order no, order date,order type, value, etc etc&lt;br /&gt;
&lt;br /&gt;
It may have some more para meter</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10782/json-rpc-command</guid>
<pubDate>Mon, 27 Aug 2018 08:37:25 +0000</pubDate>
</item>
<item>
<title>Multichain-Explorer RPC failed: ('http_protocol_error', 0, 'got a bad status line', None)</title>
<link>https://www.multichain.com/qa/10709/multichain-explorer-failed-http_protocol_error-status-none</link>
<description>&lt;p&gt;Hello, i'm developing blockchain for my final project.&lt;br&gt;and i've kinda problem about multichain-explorer that I deployed on a server.&lt;/p&gt;&lt;p&gt;I've done any tutorial for multichain-explorer installation&amp;nbsp;on &lt;a href=&quot;https://github.com/MultiChain/multichain-explorer&quot; rel=&quot;nofollow&quot;&gt;https://github.com/MultiChain/multichain-explorer&lt;/a&gt;&lt;br&gt;But i have an error about RPC connection.&lt;br&gt;The status on multichain-explorer webpages shows '&lt;strong&gt;No Connection' (red labeled)&lt;/strong&gt;&lt;br&gt;and the bottom of the web shows an error '&lt;span style=&quot;background-color:rgb(242, 222, 222); color:rgb(169, 68, 66); font-family:helvetica neue,helvetica,arial,sans-serif; font-size:14px&quot;&gt;('http protocol error', 0, 'got a bad status line', None)'&lt;/span&gt;&lt;br&gt;The console also keep showing this error:&amp;nbsp;&lt;/p&gt;&lt;p&gt;RPC failed:&amp;nbsp;('http_protocol_error', 0, 'got a bad status line', None)&lt;br&gt;catch_up_rpc: abort&lt;br&gt;Opened /home/cryptnode/.multichain/chain1/blocks/blk00000.dat&lt;br&gt;203.189.120.14 - - [20/Aug/2018 08:15:22] &quot;GET /MultiChain%20chain1/recent?random=0.54325423451574368 HTTP/1.1&quot; 200 110&lt;br&gt;RPC failed:&amp;nbsp;('http_protocol_error', 0, 'got a bad status line', None)&lt;br&gt;catch_up_rpc: abort&lt;br&gt;Opened /home/cryptnode/.multichain/chain1/blocks/blk00000.dat&lt;br&gt;203.189.120.14 - - [20/Aug/2018 08:15:27] &quot;GET /MultiChain%20chain1/recent?random=0.75434146783456789 HTTP/1.1&quot; 200 110&lt;br&gt;RPC failed:&amp;nbsp;('http_protocol_error', 0, 'got a bad status line', None)&lt;br&gt;catch_up_rpc: abort&lt;br&gt;Opened /home/cryptnode/.multichain/chain1/blocks/blk00000.dat&lt;br&gt;203.189.120.14 - - [20/Aug/2018 08:15:32] &quot;GET /MultiChain%20chain1/recent?random=0.2345346278964646 HTTP/1.1&quot; 200 110&lt;br&gt;RPC failed:&amp;nbsp;('http_protocol_error', 0, 'got a bad status line', None)&lt;br&gt;catch_up_rpc: abort&lt;br&gt;Opened /home/cryptnode/.multichain/chain1/blocks/blk00000.dat&lt;br&gt;203.189.120.14 - - [20/Aug/2018 08:15:37] &quot;GET /MultiChain%20chain1/recent?random=0.2351678468493025 HTTP/1.1&quot; 200 110&lt;/p&gt;&lt;p&gt;Can someone help me, please ?&lt;br&gt;thanks alot.&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/10709/multichain-explorer-failed-http_protocol_error-status-none</guid>
<pubDate>Mon, 20 Aug 2018 08:19:31 +0000</pubDate>
</item>
<item>
<title>Rpc calls in same chain but different servers nodes</title>
<link>https://www.multichain.com/qa/9637/rpc-calls-in-same-chain-but-different-servers-nodes</link>
<description>Hi team,&lt;br /&gt;
&lt;br /&gt;
The question is simple: how i make rpc calls to different&lt;br /&gt;
&amp;nbsp;Node servers of the same chain?&lt;br /&gt;
&lt;br /&gt;
Today i only make rpc calls to Master node.&lt;br /&gt;
&lt;br /&gt;
Best regards !</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9637/rpc-calls-in-same-chain-but-different-servers-nodes</guid>
<pubDate>Tue, 15 May 2018 01:00:56 +0000</pubDate>
</item>
<item>
<title>Error Code -1 value is type obj, expected real</title>
<link>https://www.multichain.com/qa/9625/error-code-1-value-is-type-obj-expected-real</link>
<description>&lt;p&gt;Hello,&lt;/p&gt;&lt;p&gt;I am trying to use a command issuemore and passing the parameter in json-api as :&lt;/p&gt;&lt;pre&gt;{&quot;id&quot;:1526293256,&quot;method&quot;:&quot;issuemore&quot;,&quot;params&quot;:&lt;/pre&gt;&lt;pre&gt;[&quot;1C6ZGuhbKsbjKNG6K8YvTS43x7fdqZiRLowm2&quot;,&quot;01&quot;,&quot;0&quot;,&lt;/pre&gt;&lt;pre&gt;{&quot;empName&quot;:&quot;121&quot;,&quot;empSalary&quot;:&quot;2121&quot;,&quot;empDept&quot;:&quot;21&quot;,&quot;empDesgn&quot;:&quot;21&quot;}]}&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;I am getting the following error:&lt;/pre&gt;&lt;pre&gt;Error Code -1 value is type obj, expected real
&lt;/pre&gt;&lt;pre&gt;Can you help me what I am doing wrong here. Thanks&lt;/pre&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9625/error-code-1-value-is-type-obj-expected-real</guid>
<pubDate>Mon, 14 May 2018 10:33:48 +0000</pubDate>
</item>
<item>
<title>Specify rpc user and password at runtime</title>
<link>https://www.multichain.com/qa/9216/specify-rpc-user-and-password-at-runtime</link>
<description>&lt;p&gt;I know that the RPC username and password for the node are generated upon runtime of the blockchain in the specific node, but is it not possible to provide them as runtime parameters or something?&lt;/p&gt;&lt;p&gt;I haven't seen the user and password as runtime params in the official docs. I also tried specifying&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;-rpcuser=foo&lt;/strong&gt;&amp;nbsp;and&amp;nbsp;&lt;strong&gt;-rpcpassword=bar&amp;nbsp;&lt;/strong&gt;but it didn't work. Still random password was generated.&lt;/p&gt;&lt;p&gt;My last try would be to manually replace the content of the&amp;nbsp;&lt;strong&gt;multichain.conf&lt;/strong&gt;&amp;nbsp;file, but if I want to connect a service to the node, that means that I have to start the blockchain (in order to generate the file), then stop it, replace the content with my username and password and then start it again?&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9216/specify-rpc-user-and-password-at-runtime</guid>
<pubDate>Wed, 04 Apr 2018 14:30:11 +0000</pubDate>
</item>
<item>
<title>RPC &quot;code&quot;:-32700 - running on Windows 8.1 / curl version 7.41.0</title>
<link>https://www.multichain.com/qa/9066/rpc-code-32700-running-on-windows-8-1-curl-version-7-41-0</link>
<description>&lt;p&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;I have started a &quot;chain0&quot; multichain. Completed many examples all running from command line (Windows 8.1). I am on machine_1 the one that started the -daemon and i can successfully connect on this from another machine_2.&lt;br&gt;The problem is when i try to use curl from machine_1. Every time the same error:&lt;/span&gt;&lt;/p&gt;&lt;p&gt;{&quot;result&quot;:null,&quot;error&quot;:{&quot;code&quot;:-32700,&quot;message&quot;:&quot;Parse error&quot;},&quot;id&quot;:null}&lt;/p&gt;&lt;p&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Tried many commands:&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Example 1:&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;curl -u multichainrpc:&amp;lt;&lt;strong&gt;my_pass_here&lt;/strong&gt;&amp;gt; -d {&quot;method&quot;:&quot;getinfo&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;&lt;strong&gt;chain_name&lt;/strong&gt;&quot;:&quot;&lt;strong&gt;chain0&lt;/strong&gt;&quot;} -H &quot;Content-Type: text/plain;&quot; -X POST http://127.0.0.1:9710&lt;/span&gt;

&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Example 2:&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;curl -u multichainrpc:&amp;lt;&lt;strong&gt;my_pass_here&lt;/strong&gt;&amp;gt; -d {&quot;method&quot;:&quot;getinfo&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;&lt;strong&gt;jsonrpc&lt;/strong&gt;&quot;:&quot;&lt;strong&gt;1.0&lt;/strong&gt;&quot;} -H &quot;Content-Type: text/plain;&quot; -X POST http://127.0.0.1:9710&lt;/span&gt;&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;text-decoration: underline;&quot;&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Example 3:&lt;/span&gt;&lt;/span&gt;
&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;curl -u multichainrpc:&amp;lt;&lt;strong&gt;my_pass_here&lt;/strong&gt;&amp;gt; -d &lt;strong&gt;'&lt;/strong&gt;{&quot;method&quot;:&quot;getinfo&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;1.0&quot;}&lt;strong&gt;'&lt;/strong&gt; -H &quot;Content-Type: text/plain;&quot; -X POST http://127.0.0.1:9710&lt;/span&gt;

&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;And many more. &lt;/span&gt;

&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Inside folder:&lt;/span&gt;
C:\Users\&amp;lt;&lt;strong&gt;user_name&lt;/strong&gt;&amp;gt;\AppData\Roaming\MultiChain
&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;i have multichain.conf file and inside that file i have the &lt;strong&gt;rpcpassword&lt;/strong&gt; property set.
&lt;/span&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;As stated here in another message i have already used the help getinfo command.&lt;/span&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Trace in case that helps:&lt;/span&gt;
&lt;/pre&gt;&lt;pre&gt;&amp;gt; curl -u multichainrpc:&amp;lt;&lt;strong&gt;password_here&lt;/strong&gt;&amp;gt; -d {&quot;method&quot;:&quot;getinfo&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;jsonrpc&quot;:&quot;1.0&quot;} -H &quot;Content-Type: text/plain;&quot; -X POST http://127.0.0.1:9710 -vvvv
* Rebuilt URL to: http://127.0.0.1:9710/
*&amp;nbsp; &amp;nbsp;Trying 127.0.0.1...
* Connected to 127.0.0.1 (127.0.0.1) port 9710 (#0)
* Server auth using Basic with user 'multichainrpc'
&amp;gt; POST / HTTP/1.1
&amp;gt; Authorization: Basic bXVsdGljaGFpbnJwYzpHTDhVS3E1N0JMRE5iOVV3SG5HVXl1VXR6UEdkZVc4aEZpTFlmOXlTcG12dA==
&amp;gt; User-Agent: curl/7.41.0
&amp;gt; Host: 127.0.0.1:9710
&amp;gt; Accept: */*
&amp;gt; Content-Type: text/plain;
&amp;gt; Content-Length: 43
&amp;gt;
* upload completely sent off: 43 out of 43 bytes
&amp;lt; HTTP/1.1 500 Internal Server Error
&amp;lt; Date: Fri, 23 Mar 2018 14:04:11 +0000
&amp;lt; Connection: close
&amp;lt; Content-Length: 74
&amp;lt; Content-Type: application/json
&amp;lt; Server: bitcoin-json-rpc/v0.10.0.0-unk
&amp;lt;
{&quot;result&quot;:null,&quot;error&quot;:{&quot;code&quot;:-32700,&quot;message&quot;:&quot;Parse error&quot;},&quot;id&quot;:null}
* Closing connection 0
&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;font-family:arial,helvetica,sans-serif&quot;&gt;Maybe i have misunderstood a lot, i am new to blockchain. &lt;/span&gt;
&lt;/pre&gt;&lt;pre&gt;&lt;span style=&quot;font-family: arial, helvetica, sans-serif;&quot;&gt;What i try to do is test it with curl and then create a java app in order to call it.&lt;/span&gt;&lt;/pre&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/9066/rpc-code-32700-running-on-windows-8-1-curl-version-7-41-0</guid>
<pubDate>Fri, 23 Mar 2018 14:09:45 +0000</pubDate>
</item>
<item>
<title>rpckeepalive: performance drops vs port freeze</title>
<link>https://www.multichain.com/qa/8948/rpckeepalive-performance-drops-vs-port-freeze</link>
<description>Hi,&lt;br /&gt;
&lt;br /&gt;
is there any news on the rpc freeze problem?&lt;br /&gt;
&lt;a href=&quot;https://www.multichain.com/qa/7006/node-rpc-completely-freezes-rpcssl?show=7178#a7178&quot; rel=&quot;nofollow&quot;&gt;https://www.multichain.com/qa/7006/node-rpc-completely-freezes-rpcssl?show=7178#a7178&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
What I still experience (v1.0.4):&lt;br /&gt;
Everything works fine using rpckeepalive=0 but there is another problem:&lt;br /&gt;
&lt;br /&gt;
The performance (tx/s) decreases a lot when using rpckeepalive=0&lt;br /&gt;
I only get ~ 100 tx/s throughput when using rpckeepalive=0 (and rpcssl).&lt;br /&gt;
&lt;br /&gt;
If I enable rpckeepalive I get ~800 tx/s (!)&lt;br /&gt;
But still the rpc api freezes after some time.&lt;br /&gt;
&lt;br /&gt;
I think the problem only appears when using it together with rpcssl because every new requests has to open a new connection and has to do the ssl handshake all over again.&lt;br /&gt;
&lt;br /&gt;
So:&lt;br /&gt;
keepalive=0 has a really bad performance (at least when using rpcssl?)&lt;br /&gt;
keepalive=1 freezes the node on high load after no more than 30 seconds.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/8948/rpckeepalive-performance-drops-vs-port-freeze</guid>
<pubDate>Wed, 14 Mar 2018 09:20:58 +0000</pubDate>
</item>
<item>
<title>Multichain RPC options</title>
<link>https://www.multichain.com/qa/8892/multichain-rpc-options</link>
<description>Hi&lt;br /&gt;
&lt;br /&gt;
I wanted to know if whats exactly the meaning of the rpc server options, &amp;quot;rpckeepalive&amp;quot; and &amp;quot;rpcthreads&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Are they interdependent in any way? (ie. is rpcthreads applied if rpckeepalive=0 and so on)&lt;br /&gt;
&lt;br /&gt;
Another question is, is there an upper limit on rpcthreads in multichain? or is it dependent on my system hardware?&lt;br /&gt;
&lt;br /&gt;
thanks!</description>
<guid isPermaLink="true">https://www.multichain.com/qa/8892/multichain-rpc-options</guid>
<pubDate>Mon, 12 Mar 2018 04:49:34 +0000</pubDate>
</item>
<item>
<title>error parsing JSON</title>
<link>https://www.multichain.com/qa/8123/error-parsing-json</link>
<description>I installed multichain-2.0 but I receive the &amp;nbsp;same error:&lt;br /&gt;
&lt;br /&gt;
root@luis-vm:# multichain-cli chain1 issue 1U8RTVq9F8qWZdJApenwwBoK9661GeKAsKw34g try &amp;quot;Hello word&amp;quot;&lt;br /&gt;
&lt;br /&gt;
error: Error parsing JSON: Hello word&lt;br /&gt;
&lt;br /&gt;
Sorry if the qeustion is trivial, but I'm at the beginning.&lt;br /&gt;
&lt;br /&gt;
The format of the command I use is wrong? Which one should &amp;nbsp;I use?&lt;br /&gt;
&lt;br /&gt;
Thanks</description>
<guid isPermaLink="true">https://www.multichain.com/qa/8123/error-parsing-json</guid>
<pubDate>Fri, 05 Jan 2018 18:43:29 +0000</pubDate>
</item>
<item>
<title>rpc server gives empty response after staying idle for few hours</title>
<link>https://www.multichain.com/qa/7402/rpc-server-gives-empty-response-after-staying-idle-few-hours</link>
<description>I have hosted blockchain on CentOs server. It gives rpc json responses too and works perfectly fine. BUT AFTER FEW HOURS the rpc server gives empty json response with the chain still running. To get json response i have to kill the multichain on the port and start again by multichaind command and then i start getting response. Please help.&lt;br /&gt;
I dont want the blockchain to give empty responses even after few HOURS.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/7402/rpc-server-gives-empty-response-after-staying-idle-few-hours</guid>
<pubDate>Fri, 03 Nov 2017 17:50:48 +0000</pubDate>
</item>
<item>
<title>which is best solution for local currency decentralized or centralized multichain?</title>
<link>https://www.multichain.com/qa/7022/solution-currency-decentralized-centralized-multichain</link>
<description>I am going to develop a multichain base application to develop a local currency where user can create there wallets and can make transaction using web app ? So what is best way to develop this app. I am little bit confuse about decentralized architecture that how a single web app connect with multiple nodes dynamically? I am appreciate if Any one can suggest me best solution for it ?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/7022/solution-currency-decentralized-centralized-multichain</guid>
<pubDate>Tue, 10 Oct 2017 07:02:19 +0000</pubDate>
</item>
<item>
<title>Multichain rpc server connection question (performance)</title>
<link>https://www.multichain.com/qa/6798/multichain-rpc-server-connection-question-performance</link>
<description>At the moment I am evaluating multichain performance measuring stuff like, network sync times, Max tx/s in a multi-node network ~ 20 Nodes, also on different locations.&lt;br /&gt;
&lt;br /&gt;
A first step was to check the performance of a single node over the internet in regards to [tx/sec].&lt;br /&gt;
&lt;br /&gt;
When there is a high load I observed an error on the operating system level (Ubuntu) that says too many open files. So it seems, that on high rpc request load the ulimit is fully used up, but this should not happen in my opinion.&lt;br /&gt;
&lt;br /&gt;
How are connections handled on the internal rpc server? Is there some keep-alive or a too high connection timeout? It seems that rpc requests that opened a connection don't get closed immediately and at some point use up all the resources. Of course I could increase the &amp;quot;ulimit -n&amp;quot; but I just wanted to check if this could be a possible optimization on multichain side.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Would it help if the client that send the rpc-requests set the header &amp;quot;Connection: close&amp;quot;?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/6798/multichain-rpc-server-connection-question-performance</guid>
<pubDate>Thu, 21 Sep 2017 19:05:05 +0000</pubDate>
</item>
<item>
<title>C# RPC API Unexpected character encountered while parsing value: &lt;. Path '', line 0, position 0.</title>
<link>https://www.multichain.com/qa/6627/unexpected-character-encountered-parsing-value-position</link>
<description>I am trying to build an application with LucidOcean C# API, in the command line the mulitichain node is active.&lt;br /&gt;
&lt;br /&gt;
I am not sure if I am doing it in the right way, I create a C# applicationi and try to connect to this multichain node by using methods from API.&lt;br /&gt;
&lt;br /&gt;
Here is my code,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;MultiChainConnection connection = new MultiChainConnection()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Hostname = &amp;quot;127.0.0.1&amp;quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Port = 4336,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Username = &amp;quot;multichainrpc&amp;quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Password = &amp;quot;password&amp;quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ChainName = &amp;quot;chain1&amp;quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;BurnAddress = &amp;quot;1XXXXXXXZXXXXXXXZMXXXXXXXqXXXXXXbYgmzH&amp;quot;,&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;RootNodeAddress = &amp;quot;1TXfbuQzKGpDbTsAEAxdi7ZK5aUYTEVicUKWYT&amp;quot;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;};&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;_Client = new MultiChainClient(connection);&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;public JsonRpcResponse&amp;lt;List&amp;lt;string&amp;gt;&amp;gt; GetAddressesAsync()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;JsonRpcResponse&amp;lt;List&amp;lt;string&amp;gt;&amp;gt; response = null;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Task.Run(async () =&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response = await _Client.Wallet.GetAddressesAsync();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}).GetAwaiter().GetResult();&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ResponseLogger&amp;lt;List&amp;lt;string&amp;gt;&amp;gt;.Log(response);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;return response;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
First question is, am I doing it in a right way?&lt;br /&gt;
&lt;br /&gt;
2nd, How do I know if RPC is connected to the node?&lt;br /&gt;
&lt;br /&gt;
3rd, &amp;nbsp;how to solve &amp;quot;Unexpected character encountered while parsing value: &amp;lt;. Path '', line 0, position 0.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Thanks a lot if anybody could help me a little.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/6627/unexpected-character-encountered-parsing-value-position</guid>
<pubDate>Tue, 12 Sep 2017 09:43:27 +0000</pubDate>
</item>
<item>
<title>Connect via RPC to multichain node</title>
<link>https://www.multichain.com/qa/6265/connect-via-rpc-to-multichain-node</link>
<description>&lt;p&gt;Hello&lt;/p&gt;&lt;p&gt;I'm having trouble connecting to multichain-node for RPC request. &amp;nbsp;Terminal&amp;nbsp;requests work&amp;nbsp;just fine :&amp;nbsp;&lt;/p&gt;&lt;p&gt;multichain-cli PecheMLC -rpcport=4790 -rpcuser=multichainrpc -rpcpassword=3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK // get me all access&amp;nbsp;&lt;/p&gt;&lt;p&gt;Yet, &amp;nbsp;from node file embeded in firebase function file, I keep having :&lt;/p&gt;&lt;pre&gt;{ Error: connect ECONNREFUSED 127.0.0.1:4790
    at Object.exports._errnoException (util.js:1018:11)
    at exports._exceptionWithHostPort (util.js:1041:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 4790 }&lt;/pre&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;here is my code :&amp;nbsp;&lt;/p&gt;&lt;p&gt;//&lt;/p&gt;&lt;p&gt;exports.initMultiChain = functions.https.onRequest((req,res) =&amp;gt; {&lt;/p&gt;&lt;p&gt;&amp;nbsp; let multichain = require(&quot;multichain-node&quot;)({&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; port: 4790, // got this from params.dat&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; host: '127.0.0.1', // local&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; user: 'multichainrpc',&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; pass: '3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK'&lt;br&gt;&amp;nbsp; });&lt;br&gt;&amp;nbsp; multichain.getInfo(function(e, info){&lt;br&gt;&amp;nbsp; if(e){ console.log(e);}&lt;br&gt;&amp;nbsp; res.send(info)&lt;br&gt;&amp;nbsp; res.end(&quot;done&quot;)&lt;br&gt;&amp;nbsp; });&lt;/p&gt;&lt;p&gt;})&lt;/p&gt;&lt;p&gt;and multichain.conf :&amp;nbsp;&lt;/p&gt;&lt;p&gt;rpcuser=multichainrpc&lt;br&gt;rpcpassword=3ZnqXHcc3LZ9Q9CZo3xpGB4ppNg8nvS4HtifT7oZfsyK&lt;/p&gt;&lt;p&gt;&amp;nbsp;Many thanks in advance if you &amp;nbsp;have clue on this :)&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/6265/connect-via-rpc-to-multichain-node</guid>
<pubDate>Wed, 16 Aug 2017 15:01:43 +0000</pubDate>
</item>
<item>
<title>Curl RPC : Empty response from server. CLI works</title>
<link>https://www.multichain.com/qa/5804/curl-rpc-empty-response-from-server-cli-works</link>
<description>Hi, am trying to issue a simple RPC command using curl:&lt;br /&gt;
&lt;br /&gt;
curl --user rpc:rpc --data '{&amp;quot;jsonrpc&amp;quot;:&amp;quot;1.0&amp;quot;, &amp;quot;method&amp;quot;:&amp;quot;getinfo&amp;quot;, &amp;quot;params&amp;quot;:[], &amp;quot;id&amp;quot;:&amp;quot;4&amp;quot;}' -H 'content-type: text/plain;' http://10.0.7.4:9701/&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
That results in:&lt;br /&gt;
&lt;br /&gt;
curl: (52) Empty reply from server&lt;br /&gt;
&lt;br /&gt;
multichain-cli for this chain works fine and i can issue commands in interactive mode. What am i missing here? I've tried various combinations of using --data &amp;nbsp;and --data-binary, tried different methods and also tried using localhost . &lt;br /&gt;
&lt;br /&gt;
My command to start the chain is: &lt;br /&gt;
&lt;br /&gt;
multichaind pd2 -rpcallowip=10.0.7.4</description>
<guid isPermaLink="true">https://www.multichain.com/qa/5804/curl-rpc-empty-response-from-server-cli-works</guid>
<pubDate>Tue, 18 Jul 2017 20:54:48 +0000</pubDate>
</item>
<item>
<title>Multichain Demo not working for me, It loads but none of my nodes load</title>
<link>https://www.multichain.com/qa/5184/multichain-demo-not-working-for-loads-but-none-my-nodes-load</link>
<description>&lt;p&gt;I saw a similar question asked here, I looked at the answers and was not able to get my web-demo working from looking at the answers from the other question.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Essentially I have a bare bones build of Multichain, and wish to get the Multichain demo working.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Currently the demo loads, but has an error retrieving the names of nodes:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br&gt;Choose an available node to get started:&lt;/p&gt;&lt;p&gt;$rpc) if (isset($rpc['rpchost'])) echo '&lt;/p&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;http://34.211.23.145/?chain=%27.html%28$chain%29.%27&quot;&gt;'.html($rpc['name']).'&lt;/a&gt;&lt;br&gt;'; ?&amp;gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can view it here: http://34.211.23.145/&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I looked at the php logs and could not see any errors.&amp;nbsp; I am sure its something small and silly, can anyone advise please&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/5184/multichain-demo-not-working-for-loads-but-none-my-nodes-load</guid>
<pubDate>Sun, 28 May 2017 04:54:03 +0000</pubDate>
</item>
<item>
<title>How Do I Troubleshoot RPC API Remote Connectivity?</title>
<link>https://www.multichain.com/qa/4162/how-do-i-troubleshoot-rpc-api-remote-connectivity</link>
<description>&lt;p&gt;I'm trying to connect to the multichain server public IP with Postman. &amp;nbsp;I'm using Basic Authentication with the username and password and port from&amp;nbsp;multichain.conf and sending raw JSON in the request body. &amp;nbsp;Postman says, &quot;Could not get any response&quot;.&lt;/p&gt;&lt;p&gt;I can however connect to localhost loopback from the multichain server itself, so the credentials and port are correct:&lt;/p&gt;&lt;div&gt;&amp;gt; curl --user &amp;lt;userame&amp;gt; --data-binary '{&quot;method&quot;:&quot;listassets&quot;,&quot;params&quot;:[],&quot;id&quot;:1,&quot;chain_name&quot;:&quot;testchain1&quot;}' -H 'content-type: text/plain;' http://127.0.0.1:6834&lt;/div&gt;&lt;div&gt;&lt;p&gt;Enter host password for user '&amp;lt;username&amp;gt;':&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;p&gt;{&quot;result&quot;:[{&quot;name&quot;:&quot;asset1&quot;,&quot;issuetxid&quot;:&quot;05c4a6a4f7fdc2bfc358debcd79830d8c9576eaf8183f2f0519f952505a90dae&quot;,&quot;assetref&quot;:&quot;170-267-50181&quot;,&quot;multiple&quot;:100,&quot;units&quot;:0.01000000,&quot;open&quot;:false,&quot;details&quot;:{},&quot;issueqty&quot;:1000.00000000,&quot;issueraw&quot;:100000,&quot;subscribed&quot;:false},{&quot;name&quot;:&quot;asset2&quot;,&quot;issuetxid&quot;:&quot;7c1b4650ee014180aaf0ec058f8504ea84aec92127bc6a441e98976072a653ab&quot;,&quot;assetref&quot;:&quot;667-266-7036&quot;,&quot;multiple&quot;:10,&quot;units&quot;:0.10000000,&quot;open&quot;:false,&quot;details&quot;:{},&quot;issueqty&quot;:100.00000000,&quot;issueraw&quot;:1000,&quot;subscribed&quot;:false},{&quot;name&quot;:&quot;asset3&quot;,&quot;issuetxid&quot;:&quot;57ccfb8e6ecf408211bbfff32de854fa7379945c804eea02a5720d3c7af92833&quot;,&quot;assetref&quot;:&quot;668-267-52311&quot;,&quot;multiple&quot;:10,&quot;units&quot;:0.10000000,&quot;open&quot;:false,&quot;details&quot;:{},&quot;issueqty&quot;:100.00000000,&quot;issueraw&quot;:1000,&quot;subscribed&quot;:false}],&quot;error&quot;:null,&quot;id&quot;:1}&lt;/p&gt;&lt;p&gt;How do I troubleshoot this? &amp;nbsp;Is there a configuration option I'm missing?&lt;/p&gt;&lt;/div&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/4162/how-do-i-troubleshoot-rpc-api-remote-connectivity</guid>
<pubDate>Wed, 01 Mar 2017 00:47:02 +0000</pubDate>
</item>
<item>
<title>How Do I Use the JSON RPC API?</title>
<link>https://www.multichain.com/qa/4159/how-do-i-use-the-json-rpc-api</link>
<description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;I'm trying to figure out how to use the RPC API and have a few questions:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;How do I create an RPC user/password?&lt;/li&gt;&lt;li&gt;Is there a documentation web page?&lt;/li&gt;&lt;li&gt;How do I know which port to use?&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Thanks in advance for your help.&lt;/p&gt;</description>
<guid isPermaLink="true">https://www.multichain.com/qa/4159/how-do-i-use-the-json-rpc-api</guid>
<pubDate>Wed, 01 Mar 2017 00:03:26 +0000</pubDate>
</item>
<item>
<title>How do i log rpc connections?</title>
<link>https://www.multichain.com/qa/3072/how-do-i-log-rpc-connections</link>
<description>I'd like to log rpc connections to the multichain for audit purposes. is this possible?</description>
<guid isPermaLink="true">https://www.multichain.com/qa/3072/how-do-i-log-rpc-connections</guid>
<pubDate>Fri, 04 Nov 2016 02:39:11 +0000</pubDate>
</item>
<item>
<title>Think I found a bug</title>
<link>https://www.multichain.com/qa/599/think-i-found-a-bug</link>
<description>Using getinfo via rpc api returns difficulty correctly for a non-test server (e.g. &amp;quot;difficulty&amp;quot; : 0.000223370) but when tried on a testnet it returns a wrong number: &amp;quot;difficulty&amp;quot; : 1.526000000000000e-05 (should be .0001526).&lt;br /&gt;
&lt;br /&gt;
'multichain-cli &amp;lt;name&amp;gt; getinfo' from command line returns the correct value however.</description>
<guid isPermaLink="true">https://www.multichain.com/qa/599/think-i-found-a-bug</guid>
<pubDate>Fri, 18 Dec 2015 18:47:58 +0000</pubDate>
</item>
</channel>
</rss>