Get the protocol parameters and save them to `protocol.json

At the create a simple transaction step.

Trying to " Get the protocol parameters and save them to protocol.json with:

cardano-cli query protocol-parameters
–mainnet
–out-file protocol.json

but I’m getting an error:

cardano-cli: HandshakeError (Refused NodeToClientV_10 “version data mismatch: NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 1097911063}} /= NodeToClientVersionData {networkMagic = NetworkMagic {unNetworkMagic = 764824073}}”)[ec2-user@ip-172-31-26-47 ~]$

My protocolMagicId folder is path is home/relay/db/protocolMagicId.

I have set the protocolMagicId to Testnet-1097911063 and I’m running my node in testnet.

What is the problem?

You use --mainnet, in your test nodes you should change always --mainnet by --testnet-magic 1097911063

Thanks, now I get this:

cardano-cli: Network.Socket.connect: <socket: 11>: does not exist (No such file or directory)

You need to create an environment variable export CARDANO_NODE_SOCKET_PATH=/home/… To the socket file