prysmaticlabs / prysm

Go implementation of Ethereum proof of stake
https://www.offchainlabs.com
GNU General Public License v3.0
3.47k stars 1.01k forks source link

Unable to start beacon chain behind proxy #3864

Closed fooock closed 5 years ago

fooock commented 5 years ago

I want to start the beacon-chain container behind a proxy, but when I execute:

$  docker run --rm -v ./prysm-data:/data -p 4000:4000 \
      --name beacon-node \
      -e http_proxy=$MY_PROXY \
      -e https_proxy=$MY_PROXY \
      gcr.io/prysmaticlabs/prysm/beacon-chain:latest --datadir=/data

but, the result is:

time="2019-10-28T11:00:44Z" level=error msg="Failed to calculate roughtime offset" error="no valid responses" prefix=roughtime
2019/10/28 11:00:44 maxprocs: Leaving GOMAXPROCS=2: CPU quota undefined
time="2019-10-28 11:00:44" level=info msg="Using custom chain parameters" config=demo prefix=node
time="2019-10-28 11:00:44" level=info msg="Checking DB" database-path="/data/beaconchaindata" prefix=node
time="2019-10-28 11:00:44" level=info msg="Fetching testnet cluster address" endpoint="https://prylabs.net/contract" prefix=node
time="2019-10-28 11:01:48" level=fatal msg="Access to PoW chain is required for validator. Unable to connect to Geth node: dial tcp 3.213.172.47:443: connect: connection refused" prefix=node

I'm using the http_proxy and https_proxy environment variables but it seems that they are not used at all.

Should exist an option in the beacon chain to set up the connection using a proxy server?

fooock commented 5 years ago

I'm using this beacon-chain version: Git commit: 582c3827716436d879ea7cb80719b1fe18527b71. Built at: 2019-10-27 03:46:10+00:00

torfbolt commented 5 years ago

Eth2 uses a peer-to-peer network which is not based on HTTP, so I don't think connecting via an HTTP proxy will ever be possible.

prestonvanloon commented 5 years ago

Seems like an issue with the proxy? I'm not sure what code changes would help here.

fooock commented 5 years ago

@prestonvanloon I will check my proxy, without it, the beacon-chain works well, as expected

rauljordan commented 5 years ago

Agree this is an issue with the proxy not allowing the connection, not due to Prysm/Bazel itself. Closing unless there is more evidence of the root cause.