【问题标题】:Private Network with IPFS not working带有 IPFS 的专用网络无法正常工作
【发布时间】:2018-03-02 11:38:05
【问题描述】:

我们使用搁浅 (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

【问题讨论】:

  • 通过在守护进程启动期间将其他节点添加为 Bootstrap 节点解决了问题。
  • 将此添加为一个不错的答案。回答您自己的问题是完全可以接受的!

标签: distributed-system ipfs


【解决方案1】:

当我尝试创建 ipfs 的私有网络时,我也遇到了同样的问题

我的决议,在第一个同行中这样做: 1. ipfs init 后,删除所有存在的引导项

<code>ipfs bootstrap rm --all</code>
  1. 运行

    ipfs daemon &amp;

  2. 查看自己的身份证:

    ipfs id

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

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

    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

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

【讨论】:

    猜你喜欢
    • 2014-10-04
    • 1970-01-01
    • 2013-05-13
    • 1970-01-01
    • 2021-10-24
    • 1970-01-01
    • 2016-12-05
    • 2017-08-20
    • 2021-07-04
    相关资源
    最近更新 更多