I'm new to ethereum/parity and trying to follow this PoA setup demo as part of a larger project.
I've done it locally on my laptop, accessing resources via
localhost. Now I'm trying to set up two separate nodes on two azure virtual machines and make them interact via internet.
Now my first question is - is this a sensible thing to do in the first place? Maybe I didn't grasp the architecture and these nodes shouldn't be exposed to the internet?
If this should work, I have the following problem - even a single node doesn't start properly.
I use docker container ethcore/parity:stable, this is my
[parity] chain = "demo-spec.json" base_path = "/tmp/parity0" [network] port = 30300 [rpc] interface = "172.17.0.2" hosts = ["172.17.0.2", "azure-vm-public-ip", "10.0.0.4"] port = 8540 apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"] [ui] interface = "172.17.0.2" port = 8180 [dapps] cors = "all" hosts = ["azure-vm-public-ip", "10.0.0.4", "172.17.0.2"] interface = "172.17.0.2" port = 8080
interfaces to the original file from demo (link above). Here
azure-vm-public-ip is the IP I use to connect to the vm from my laptop.
10.0.0.4 is vm's local IP from
$ ifconfig and
172.17.0.2 is IP that's seen from inside the docker container if you run
demo-spec.json is exactly the same as in demo.
I run docker via this command, exposing all ports:
sudo docker run -ti --rm -p 30300:30300 -p 8080:8080 -p 8180:8180 -p 8540:8540 -v ~/demo-spec.json:/build/demo-spec.json -v ~/node0.toml:/build/node0.toml 65de5e38cf4b --config node0.toml
after startup public node URL is returned:
which has docker's IP in it, not machine's IP and if I try to connect to http://azure-public-ip:8180/ from laptop I get
URL BLOCKED YOU ARE NOT ALLOWED TO ACCESS TRUSTED SIGNER USING THIS URL. Use: http://172.17.0.2:8180
Blocked connection to Signer API from untrusted origin is written in parity log.
If I make a second connection to the vm and run
$ curl http://172.17.0.2:8180 a proper html is returned, but
$ curl http://localhost:8180 gives the same error.
If I change interface to
azure-public-ip, parity doesn't start with the following error:
RPC io error: Cannot assign requested address (os error 99)
So there seems to be a network setup misconfiguration, but I can't figure out where it is. Please advise.