I’m trying something similar, but running into an error about “failed to negotiate security protocol”.
First I tried using a GCP LoadBalancer service in order to preserve the 4001 port.
I update the Announce address with the LoadBalancer address:
/ # ipfs swarm addrs local
/ip4/35.223.117.213/tcp/4001
Then, from another node:
$ ipfs dht findpeer Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau
/ip4/35.223.117.213/tcp/4001
$ ipfs swarm connect /ip4/35.223.117.213/tcp/4001/ipfs/Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau
Error: connect Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau failure: failed to dial : all dials failed
- [/ip4/35.223.117.213/tcp/4001] failed to negotiate security protocol: read tcp4 165.22.38.112:4001->35.223.117.213:4001: read: connection reset by peer
So, I switched to a NodePort, and updated the Announce config
/ # ipfs swarm addrs local
/ip4/104.197.190.12/tcp/30641
Then, from another node:
$ ipfs dht findpeer Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau
/ip4/104.197.190.12/tcp/30641
$ ipfs swarm connect /ip4/104.197.190.12/tcp/30641/ipfs/Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau
Error: connect Qmb4n3WteiFydckcw8bCpgmi7xXU6F8hweDddUaxwJXeau failure: failed to dial : all dials failed
- [/ip4/104.197.190.12/tcp/30641] failed to negotiate security protocol: read tcp4 165.22.38.112:4001->
104.197.190.12:30641: read: connection reset by peer
Any idea what’s failing to negotiate and why my kubernetes node is resetting the connection?
Thanks!
Ben