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

Relay is not working #3716

Closed
realdennis opened this issue Jun 13, 2021 · 2 comments
Closed

Relay is not working #3716

realdennis opened this issue Jun 13, 2021 · 2 comments
Assignees
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up

Comments

@realdennis
Copy link

realdennis commented Jun 13, 2021

  • 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

@realdennis realdennis added the need/triage Needs initial labeling and prioritization label Jun 13, 2021
@ipfs ipfs deleted a comment from welcome bot Jul 16, 2021
@lidel
Copy link
Member

lidel commented Jul 16, 2021

Triage note: perhaps default config is different (programmatic -core vs CLI use)?

@lidel lidel added effort/hours Estimated to take one or several hours need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up and removed need/triage Needs initial labeling and prioritization labels Jul 16, 2021
@lidel lidel added the kind/bug A bug in existing code (including security flaws) label Jul 16, 2021
@whizzzkid
Copy link

js-ipfs is being deprecated in favor of Helia. You can follow the migration plan here #4336 and read the migration guide.

Please feel to reopen with any comments before 2023-06-05. We will do a final pass on reopened issues afterward (see #4336).

This issue has been resolved in Helia, if not, please let us know!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
effort/hours Estimated to take one or several hours kind/bug A bug in existing code (including security flaws) kind/resolved-in-helia need/analysis Needs further analysis before proceeding P2 Medium: Good to have, but can wait until someone steps up
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants