Cardano-cli on client cannot connect to cardano-node socket

Hi all,
I installed a cardano-node testnet successfully, on cardano-node I can

cardano-cli query tip --testnet-magic 1
{
    "block": 1395829,
    "epoch": 95,
    "era": "Babbage",
    "hash": "f90ed1418e86550f294f47d38e81bd290cbd8ea495291e66c2f3b30d005ce378",
    "slot": 39434174,
    "syncProgress": "100.00"
}

My cardano-node public port 3001
On my client machine (Ubuntu) I created a forwarded socket to cardano-node by socat
socat UNIX-LISTEN:/ipc/node.socket,fork,reuseaddr,unlink-early, TCP:my-cardano-node-public-ip:3001
I added env CARDANO_NODE_SOCKET_PATH=“/ipc/node.socket” on client machine
When I try on my client machine

cardano-cli query tip --testnet-magic 1
cardano-cli: HandshakeError (VersionMismatch [] [7,8,9,10])

client machine’s cardano-cli is same as cardano-node’s .
How can I troubleshoot it ? Please give me some advice, thank you very much.

Did you find that somewhere?

I’m not sure that the protocol used at the IP port is the same that is used on the local socket. Thinking about it, my strong suspicion would be that it is not. Then, connecting a Unix domain socket to the IP port of the node will not work at all.

You should be able to forward the socket itself through ssh by something like: https://serverfault.com/a/753733

1 Like

Hi @HeptaSean , thank you very much for your reply
I follow this guide How to communicate with the cardano node on a remote host - DEV Community
I used socat to Exposing Cardano Node socket over TCP on cardano node testnet
I used socat to map node.socket file on my client machine to cardano node tcp port
and it works fine now.
I have another question about running cardano node testnet on docker and public TCP port at How to install tcp cardano node testnet on docker
Would you please take a look and give me advice ?