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

No peers and addresses #694

Closed
harshjv opened this issue Jan 1, 2017 · 3 comments
Closed

No peers and addresses #694

harshjv opened this issue Jan 1, 2017 · 3 comments
Labels
kind/support A question or request for support

Comments

@harshjv
Copy link
Contributor

harshjv commented Jan 1, 2017

ipfs.swarm.peers and ipfs.swarm.addrs return empty array.

ipfs.swarm.peers((err, peerInfos) => console.log(peerInfos)) // []
ipfs.swarm.addrs((err, peerInfos) => console.log(peerInfos)) // []

Tried to do NAT with UPNP random public port, but still didn't work.

{
  "Addresses": {
    "Swarm": [
      "/ip4/0.0.0.0/tcp/4002",
      "/ip4/192.168.0.3/tcp/4002",
      "/ip4/<my_public_ip>/tcp/4002"  // mapped 4002 -> some random public port
    ],
    // ...
@daviddias
Copy link
Member

@harshjv That is because js-ipfs doesn't pack libp2p-dht yet, you have to manually dial or use libp2p-webrtc-star which offers some discovery functionality.

@daviddias daviddias added kind/support A question or request for support status/deferred Conscious decision to pause or backlog labels Jan 2, 2017
@daviddias
Copy link
Member

Hope the answer was clear enough, let me know if you have any other question :)

Be sure to check out our latest examples:

@daviddias daviddias removed the status/deferred Conscious decision to pause or backlog label Jan 29, 2017
@ido-ran
Copy link

ido-ran commented Dec 24, 2017

From walking through the code it looks like js-ipfs still doesn't have DHT and support only WebSocket. If that is the case it means it cannot connect to command line daemon?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

No branches or pull requests

3 participants