ipfsprivate-network

IPFS private network connect timeout


I have 2 home PCs with windows 10. I want to create test ipfs private network between 2 nodes.

I downloaded go-ipfs.

ipfs version 0.6.0

I executed

ipfs init
ipfs bootstrap rm --all

I made swarm.key and added node to config.

ipfs bootstrap add /ip4/62.122.132.55/tcp/4001/ipfs/QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia

I checked if port 4001 is listening.

TCP    [::]:4001              [::]:0                 LISTENING

The same I made on the second node.

I started nodes

ipfs daemon

The result was

Initializing daemon...
go-ipfs version: 0.6.0
Repo version: 10
System version: amd64/windows
Golang version: go1.14.4
Swarm is limited to private network of peers with the swarm key
Swarm key fingerprint: 4c11fea5d8ab67ccf08b22a4ee220db3
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/192.168.1.102/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
Swarm listening on /p2p-circuit
Swarm announcing /ip4/127.0.0.1/tcp/4001
Swarm announcing /ip4/192.168.1.102/tcp/4001
Swarm announcing /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway (readonly) server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

On second node I tried execute

    c:\ipfs>ipfs swarm connect /ip4/62.122.132.55/tcp/4001/ipfs/QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia
    Error: connect QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia failure: \
failed to dial QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia: all dials failed
      * [/ip4/62.122.132.55/tcp/4001] dial tcp4 0.0.0.0:4001->62.122.132.55:4001: i/o timeout
    c:\ipfs>

After some time daemon showed

    Daemon is ready
    2020-07-19T08:43:50.560+0300 [31mERROR[0m  reprovider.simple simple/reprovide.go:108 \ 
failed to reprovide: failed to find any peer in table

What I missed?


Solution

  • can you run the following commands?

    ipfs id

    https://docs.ipfs.io/reference/cli/#ipfs-id

    ipfs swarm peers

    https://docs.ipfs.io/reference/cli/#ipfs-swarm-peers

    ipfs boostrap list

    https://docs.ipfs.io/reference/cli/#ipfs-bootstrap