我有两台带windows 10的家用电脑。我想在2个节点之间创建测试ipfs专用网络。
我下载了go ipfs。
ipfs version 0.6.0
我执行
ipfs init
ipfs bootstrap rm --all
我制作了swam.key并将node添加到配置中。
ipfs bootstrap add /ip4/62.122.132.55/tcp/4001/ipfs/QmYY9U3JFuMykjRjKd1jg6aPCmcf2UYpbaS8fHpwkAVvia
我检查了端口4001是否在监听。
TCP [::]:4001 [::]:0 LISTENING
我在第二个节点上做了同样的事情。
我启动了节点
ipfs daemon
结果是
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
在第二个节点上,我尝试执行
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>
一段时间后,守护进程显示
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
我错过了什么?
您能运行以下命令吗?
ipfs id
https://docs.ipfs.io/reference/cli/#ipfs-id
ipfs群对等
https://docs.ipfs.io/reference/cli/#ipfs-群对等
ipfs助推段列表
https://docs.ipfs.io/reference/cli/#ipfs-引导