1

Before Parity I used Geth, and made requests like:

echo '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' | nc -NU geth.ipc

and It worked! In Parity v2.7.2 and Ubuntu 18.06 i tried to do it in the same way:

echo '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' | nc -NU jsonrpc.ipc

But has no stdout. I tried several methods, but no one was success. in config.toml I has this:

[ipc]
disable = false
path = "$HOME/.local/share/io.parity.ethereum/jsonrpc.ipc"
apis = ["web3", "eth", "pubsub", "net", "parity", "parity_pubsub", "parity_accounts", "traces", "rpc", "shh", "shh_pubsub"]

Why I have silent stdout?

4
+50

It seems to be the -N parameter for the nc command

I was able to reproduce with the same request. According to man nc, -N shuts down the connection after input EOF. That's likely the reason why no output.

Removing -N (i.e. nc -U jsonrpc.ipc)gives the correct result in my test.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.