System.InvalidOperationException: Failed to issue JSON-RPC request.

+1 vote

i am getting this error, when interfacing my application to connect to the Multichain using c# wrapper.

System.InvalidOperationException: Failed to issue JSON-RPC request.

System.Net.WebException: The underlying connection was closed: The connection was closed unexpectedly.

can anyone help me to get rid of this error.

Thanks

asked Aug 29, 2017 by Abdul

1 Answer

0 votes

This could be a port / firewall issue.
Ensure the correct port is being used to connect. You will find this in the params file. Remember its not the same port used for connecting your multichaind node.

Ensure multichaind.exe is in your firewall allowed list / or the port.

edit:

Ensure your multichain.conf contains

rpcuser=multichainrpc
rpcpassword= XYXYYXYXYYXYXYXYYXY
rpcallowip=192.168.1.1 

google MyIp and place your public IP if you wish an outside node from your local network to access. if you have a static IP, add the static IP. add you local 192.x address for your local network.

answered Aug 29, 2017 by MaSsv
edited Aug 30, 2017 by MaSsv
Nothing happened, still same error.
but when i changed the ipaddress to localhost, it works for me.
Do you have your IP in multichain.conf rpcallowip
Nope, that contains only
rpcuser=multichainrpc
rpcpassword= XYXYYXYXYYXYXYXYYXY
Do i need to provide the IP of the rpc connection ??
If your incoming RPC connection appears to MultiChain to be from anything other than 127.0.0.1, it will be rejected unless that IP address appears in an rpcallowip line.
...