helia-examples icon indicating copy to clipboard operation
helia-examples copied to clipboard

Can't connect to IPFS network (with port forwarding)

Open PedroBarcha opened this issue 2 years ago • 0 comments

Hi everyone! I've been trying to connect to the IPFS network using Helia, but haven't been sucessful :(

Could you plese help me?

I have just made a port forwarding (4001) and tried connecting to the IPFS using kubo. With that, I have succesfully served content to the network. Now I am trying to do the same with Helia. From what I've understood, I don't need kubo anymore, since Helia should create a node for me right? So I have killed the kubo instance and tried the following code:

image

The output is:

Peer ID:  PeerId(12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG)
getPeers:  []
Multiaddrs: [
  Multiaddr(/ip4/127.0.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/192.168.15.19/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/172.26.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG),
  Multiaddr(/ip4/172.27.0.1/tcp/4001/p2p/12D3KooWQrrNc6wmWwCZQRtsTtPiaAXyM8B8wxgDh8mzn84CdUiG)
]

As you can see, I am not getting anything with helia.libp2p.getPeers(). Also, my peer isn't found when trying to use https://pl-diagnose.on.fleek.com:

image

Moreover, if if try to add some content, it doesn't get published to the IPFS network.

I suspect that my configuration isn't correct, could anyone check it, please? Also, am I right to assume that Helia will create a node that can connect to the IPFS network?

Finally, I'd like to say that Helia rocks 🤘. I managed to do all I need locally (publish, pin, MFS, IPNS...), the only thing I need now is to fix this. Thanks in advance!

PedroBarcha avatar Oct 23 '23 15:10 PedroBarcha