3

After succesfully setting up a POA network on azure (hurray for 1 click deployment), i wanted to set up a private Swarm cluster (well , 1 node will do for testing).

I took an AWS EC2 instance to save a little on my azure free credits (hue).

I've got the following ports opened for both IN and OUTbound traffic:

  • HTTP (8080) TCP
  • HTTPS (443) TCP
  • SSH (22) TCP
  • BZZ: (8500) TCP
  • BZZ: (8500) UDP

I've also opened up the port to ping the instance and can succesfully ping the public IP.

This is the command I'm using to start the instance. Please do note I've tried setting bzzapi to default, 0.0.0.0:8500 and the public IP.

ubuntu@ip-172-31-35-99:~$ 
swarm --bzzaccount b84c12c07f155d4ca0e1d0178367f426943eb056  --datadir swarm --keystore swarm/keystore --bzzapi http://18.221.205.37:8500 --ens-api "" --bzzport 8500 -corsdomain "*"

I can't connect to the endpoint

I can ping the instance however:

ping 18.221.205.37

Pinging 18.221.205.37 with 32 bytes of data:
Reply from 18.221.205.37: bytes=32 time=108ms TTL=41
Reply from 18.221.205.37: bytes=32 time=109ms TTL=41
Reply from 18.221.205.37: bytes=32 time=108ms TTL=41
Reply from 18.221.205.37: bytes=32 time=108ms TTL=41

Any ideas? I feel like it's similar to this issue: Connection Error - Couldn't connect to ethereum node on AWS at http://xx.xxx.xx.xxx:8545

1

So apparently you have to put in two settings.

You have to set

--bzzapi to the AWS public IP

And

--listenaddr to 0.0.0.0 instead of the default 127.0.0.1

Now it works !

  • So is the bzzapi value supposed to be pointing at a different machine? I can't seem to get this to work, I'm running in docker but cant curl into port 8500 from the host machine. – justin.m.chase Dec 7 '18 at 2:25
  • I'm specifying --httpaddr 0.0.0.0 yet doing lsof -i TCP on the machine shows me this: swarm 195 root 31u IPv6 3641828 0t0 TCP *:8500 (LISTEN). So it looks like its binding to an IPv6 address instead of the main IPv4 adapter, very weird. – justin.m.chase Dec 7 '18 at 3:01
  • The bzzapi is the reverse http proxy to expose RPC Methods. This is where you send your requests. the bzzport is the external port you set. Here's an example which we use on aws in production (albeit a kubernetes version of it for secure keys).. – Nico Vergauwen Dec 7 '18 at 10:58
  • "Here's an example", what do you mean? Also I think in the latest version --listenaddr isn't even an arg anymore :( – justin.m.chase Dec 7 '18 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.