Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No relay with in aws and EnableAutoRelay. #5946

Closed
yonderblue opened this issue Jan 27, 2019 · 7 comments
Closed

No relay with in aws and EnableAutoRelay. #5946

yonderblue opened this issue Jan 27, 2019 · 7 comments

Comments

@yonderblue
Copy link

Version information:

Latest master build

Description:

I was trying to test relay and was running the node in ec2 with just port 80 and no other ports open in the security group. Using default config (so port 4001) plus EnableAutoRelay=true. After 20 minutes or so still no circuit address from ipfs id cmd.

Note when running on my home system behind a NAT with no upnp, I get a relay address, however it comes and goes.

Should I be doing anything else?

Is the expectation that relays come and go depending on what blocks are trying to be fetched?

@vyzo
Copy link
Contributor

vyzo commented Jan 27, 2019

Our infrastructure deployment is currently incomplete.

@vyzo
Copy link
Contributor

vyzo commented Jan 27, 2019

The reason it comes and goes is that we currently only have relays in the bootstrappers, which may easily close the connections.
This should go away as we deploy relay capacity outside the bootstrappers, with high connection quota.
Not sure why it doesn't work on ec2 though.

@yonderblue
Copy link
Author

yonderblue commented Jan 30, 2019

@vyzo I have a little private network (swarm key, all go-ipfs) now to test this on 3 boxes. Box (A) that is double nat, then two in aws, Relay with a port open and B with nothing open. A and B have Relay as the only bootstrap address like:

"Bootstrap": [
    "/ip4/THE IP/tcp/8443/ipfs/PeerID_Relay"
  ],

they both (A and B) have "EnableAutoRelay": true, otherwise default config.

Relay config beyond default looks like:

"Bootstrap": null,
"Addresses": {
   ...
  "Announce": [
      "/ip4/THE IP/tcp/8443"
  ],
  Swarm": [
      "/ip4/0.0.0.0/tcp/8443"
  ]
}
...
"Swarm": {
    "EnableRelayHop": true,
    "EnableAutoRelay": true,
    "EnableAutoNATService": true
    ...
}

When all three daemons are running I see both A and B have Relay as a peer, however I don't see any relay connection in ipfs swarm peer -v or ipfs id.

I'm running close to master (ca77ecc).

Anything I can check or certain logs to enable etc?

@yonderblue
Copy link
Author

@vyzo also I should note that if lets say a file is on A with hash HashA.
Then from B this fails ipfs cat HashA, but it works if I connect the circuit manually via discovery such as

ipfs dht findprovs HashA
  > PeerA
ipfs swarm connect '/p2p-circuit/ipfs/PeerA'
  > connect PeerA success
ipfs cat HashA

Is that circuit connection being made on demand depending on what is trying to be cat'd supposed to work just from ipfs cat blah?

@vyzo
Copy link
Contributor

vyzo commented Jan 31, 2019

Hrm, Is the DHT enabled? and even functional with just 3 nodes in the private network?
You need the DHT for autorelay to work.

@yonderblue
Copy link
Author

yonderblue commented Jan 31, 2019

@vyzo I switched the Relay to be on a box outside aws with an open port and moved B into aws (I also added a forth NATed box), then if I wait a bit I see a relay address ipfs id for B, and all seems to work normally.

So it seems something about having the relay within ec2 is causing an issue.

(side note, also trying to get js-ipfs to be able to see and use these boxes, to no avail ipfs/js-ipfs#1857)

@Stebalien
Copy link
Member

We've changed how relays and autonat work significantly since this issue was filed so I'm going to close this for now. If it becomes a problem in the future, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants