1

I am trying to create a private network of IPFS with two nodes. Each node is an EC2 instance running on AWS. I generated swarm key and configure my node as follow:

"API": "/ip4/0.0.0.0/tcp/5001",
"Announce": [],
"Gateway": "/ip4/0.0.0.0/tcp/8080",
"NoAnnounce": [],
"Swarm": [
  "/ip4/0.0.0.0/tcp/4001",
  "/ip6/::/tcp/4001"
]

"Bootstrap": [ "/ip4/172.31.25.195/tcp/4001/ipfs/QmaRpyg48RqdUwXVD84RSAd8hFvA2MNPvu3Z7yTxRFJKub" ]

Then I run "ipfs daemon" to start all nodes and "ipfs swarm peers" to list all connected peers. However, "ipfs swarm peers" doest list anything and I dont know what is the problem?

Louis
  • 11
  • 1
  • Can you share ipfs log entries? We should see the peers being added by bootstrap – craigmayhew Feb 11 '20 at 20:16
  • Here is the log detail {"error":"failed to bootstrap. dial to self attempted","event":"bootstrapError","peerID":"QmaRpyg48RqdUwXVD84RSAd8hFvA2MNPvu3Z7yTxRFJKub","system":"bootstrap","time":"2020-02-12T02:22:38.662775642Z"} – Louis Feb 12 '20 at 02:23
  • {"TraceID":8560678498726733911,"SpanID":6866367366277484649,"ParentSpanID":0,"Operation":"Provide","Start":"2020-02-12T02:23:15.868956846Z","Duration":91991,"Tags":{"system":"dht"},"Logs":[{"Timestamp":"2020-02-12T02:23:15.869011197Z","Fields":[{"Key":"cid","Value":"QmdL9t1YP99v4a2wyXFYAQJtbD9zKnPrugFLQWXBXb82sn"}]},{"Timestamp":"2020-02-12T02:23:15.869014096Z","Fields":[{"Key":"broadcast","Value":"true"}]},{"Timestamp":"2020-02-12T02:23:15.869047297Z","Fields":[{"Key":"error","Value":"failed to find any peer in table"}]}]} – Louis Feb 12 '20 at 02:23
  • Can you confirm your firewall rules? You need to add inbound TCP rules for ports 4001, 5001 and 8080 in your Security Groups from AWS Console. – craigmayhew Feb 12 '20 at 09:16
  • My configuration is: "Custom TCP TCP 4001 0.0.0.0/0" " Custom TCP TCP 5001 0.0.0.0/0" – Louis Feb 12 '20 at 13:24
  • Thank you so much for your help, actually it works now. This is problem with inbound TCP – Louis Feb 12 '20 at 13:42

1 Answers1

0

Its likely you need to add inbound TCP rules for ports 4001, 5001 and 8080 in your Security Groups from AWS Console.