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?

1 Answer 1

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.

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .