2

我们使用搁浅(https://ipfs.io/docs/install/)创建了 2 个节点,它们都连接到公共网络并且工作正常。现在我们正在尝试使用这两个节点创建一个私有网络,如下所述,但是两个节点上的数据没有同步。 https://github.com/ipfs/go-ipfs/blob/master/docs/experimental-features.md#private-networks

下面是我们启动守护进程时的响应

$ipfs daemon --enable-pubsub-experiment

Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
Swarm is limited to private network of peers with the swarm key
Swarm key fingerprint: 5c9869c16230b2b24f66f89a519043d1
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip4/127.0.0.1/tcp/4001
Swarm listening on /ip6/::1/tcp/4001
API server listening on /ip4/127.0.0.1/tcp/5001
Gateway (readonly) server listening on /ip4/1127.0.0.1/tcp/8080
Daemon is ready
4

1 回答 1

0

当我尝试创建 ipfs 的专用网络时,我也遇到了与上述相同的问题

我的决议,在 First peers 中这样做: 1. 在 ipfs init 之后,删除所有存在的引导项

<code>ipfs bootstrap rm --all</code>
  1. ipfs daemon &

  2. 查身份证:</p>

    ipfs id

在“地址”会话中,地址在这里。

  1. 将地址复制到同伴命令中,如:</p>

    ipfs bootstrap add /ip4/127.0.0.1/tcp/4001/ipfs/QmXrDENoDrzn4pmGYUS4wbPvPhYUkxDCa9ij7dK1VAMqKP ipfs bootstrap add /ip4/192.168.3.98/tcp/4001/ipfs/QmXrDENoDrzn4pmGYUS4wbPvPhYUkxDCa9ij7dK1VAMqKP ipfs bootstrap add /ip6/::1/tcp/4001/ipfs/QmXrDENoDrzn4pmGYUS4wbPvPhYUkxDCa9ij7dK1VAMqKP ipfs bootstrap add /ip4/192.168.9.56/tcp/60824/ipfs/QmXrDENoDrzn4pmGYUS4wbPvPhYUkxDCa9ij7dK1VAMqKP

在其他同行中执行 4.step。一段时间后,它们连接起来。

ipfs swarm peers

希望能帮助更多的人少走弯路

于 2018-03-02T03:32:30.927 回答