thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Rpc(Transport(Error when opening the TCP socket: Connection refused (os error 111)))
This error is not very explicit… I’ll have to dig in subxt to find where it comes from.
Reraising the error or unwrapping it are the same, it is still a low level error that prevents me from opening the port. I suspect it is linked with TLS but I still have to dig ><
@HugoTrentesaux I’ve just investigated the code of subxt and tested, and in fact the lib used by gcli-v2s already handles tls natively without us having to do anything.
But you have to prefix the url with wss://, indicating the port is not enough.
Also, the system’s certificate store is used, so it’s possible that your problem is that the lib can’t find the certificates store on your system.
Pareil avec le port par ex --url 'wss://gdev.trentesaux.fr:443/ws'. C’est étrange. Tu arrives à reproduire la même erreur si tu ne mets pas le port mais en mettant le port elle disparaît ?
En attendant tu peux toujours le faire sans TLS, avec un nœud local ou un bridge SSH vers le nœud. Pour ça je me suis fait des alias dans mon .bashrc :
alias polux-rpc='ssh -L 9944:localhost:9944 pi@192.168.1.22'
alias polux-rpc-ext='ssh -L 9944:localhost:9944 pi@txmn.tk'
Edit: mes exams se terminent jeudi soir, après ça j’investiguerai…
@poka de toute façon pour rotate tes session keys, tu ne peux le faire que depuis l’api rpc de ton noeud validateur si tu as mis --rpc-methods=Unsafe, et tu n’exposes pas cette API sur internet, donc tu es obligé de faire un VPN ou un pont ssh. Mais si je me souviens bien ça n’avait pas marché non plus. Il faut réessayer :
# pont ssh vers l'API RPC du validateur (normalement sur 9945 si tu as mis la même chose que moi)
ssh -NL 9944:localhost:9945 poka@gdev.p2p.legal
# url gcli en ws (c'est la valeur par défaut de toute façon)
gcli --url ws://localhost:9944
Attention, l’exemple de @tuxmain semble être pour un nœud miroir.