Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Relay is not working #3716

Closed
Closed
@realdennis

Description

@realdennis
  • Version:

0.6.1

  • Platform:

(WSL) Microsoft x86_64 x86_64 x86_64 GNU/Linux
(MacOS) Darwin Kernel Version 20.4.0

  • Subsystem:

Guess it's about js-libp2p, ipfs-core

Severity:

Medium?

Description:

Relay is not working

Steps to reproduce the error:

according to this ipfs-core usage (https://github.com/ipfs/js-ipfs/tree/master/examples/circuit-relaying#so-what-just-happened)

  1. In ipfs-core and nodejs, ipfs.create with relay: { enable: true }, relay is not working either.
  2. log await ipfs.swarm.addrs()
  3. not seeing /p2p-circuit

Update

I found out that if the repo is created by $ jsipfs init, then it'll have the /p2p-circuit/ but if it's created by ipfs-core

const node = await ipfs.create({
  repo: '<repo_path>'
});
const addrs = await node.swarm.addrs();

// check all addrs, do not have the `/p2p-circuit/`

then the relay will not work, the relay.enabled seems not the point.

Update 2

Guess the root cause is the jsipfs get the p2p-circuit slowly, so only the daemon one has the p2p-circuit, and if I create the repo in app, then I'll not have the p2p-circuit address immediately...

Update 3

Also the $ jsipfs daemon not always get the /p2p-circuit

$ rm -rf ~/.jsipfs
$ jsipfs init
$ jsipfs daemon

// another session
$ jsipfs swarm addrs | grep p2p

Sometime attached circuit-relay in few seconds, sometimes still not have /p2p-circuit/ in few minutes

Metadata

Metadata

Assignees

Labels

P2Medium: Good to have, but can wait until someone steps upeffort/hoursEstimated to take one or several hourskind/bugA bug in existing code (including security flaws)kind/resolved-in-helianeed/analysisNeeds further analysis before proceeding

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions