What Iam trying to achieve is to run an ethereum/client-go on an aws EC2 instance and being able to access it from remote client side, for playing around with Rinkeby test network
I am trying to run an geth
docker image on ec2 instance on aws.
When I run the docker using the below command, I am getting the following error.
sudo docker run -it -p 8545:8545 -p 30303:30303 ethereum/client-go --rpc --rinkeby --syncmode "fast" --rpc --rpcapi 'db,eth,net,web3,personal' --rpcaddr XXX.XX.XXX.XXX --cache=1024
Where --rpcaddr XXX.XX.XXX.XXX is my Elastic IP
INFO [04-17|10:24:08] Maximum peer count ETH=25 LES=0 total=25
INFO [04-17|10:24:08] Starting peer-to-peer node instance=Geth/v1.8.4-unstable-92c6d130/linux-amd64/go1.10.1
INFO [04-17|10:24:08] Allocated cache and file handles database=/root/.ethereum/rinkeby/geth/chaindata cache=768 handles=1024
INFO [04-17|10:24:08] Writing custom genesis block
INFO [04-17|10:24:08] Persisted trie from memory database nodes=355 size=65.27kB time=1.082517ms gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [04-17|10:24:08] Initialised chain configuration config="{ChainID: 4 Homestead: 1 DAO: <nil> DAOSupport: true EIP150: 2 EIP155: 3 EIP158: 3 Byzantium: 1035301 Constantinople: <nil> Engine: clique}"
INFO [04-17|10:24:08] Initialising Ethereum protocol versions="[63 62]" network=4
INFO [04-17|10:24:08] Loaded most recent local header number=0 hash=6341fd…67e177 td=1
INFO [04-17|10:24:08] Loaded most recent local full block number=0 hash=6341fd…67e177 td=1
INFO [04-17|10:24:08] Loaded most recent local fast block number=0 hash=6341fd…67e177 td=1
INFO [04-17|10:24:08] Regenerated local transaction journal transactions=0 accounts=0
INFO [04-17|10:24:08] Starting P2P networking
INFO [04-17|10:24:10] UDP listener up self=enode://350e33a2680260f24bd1837e59610173769023f6cf609ab59b1aca63dc867cce5d7cb520343ed9a04b8a98d5a7d08f57f9e2ee258502312fafad42d005179aab@[::]:30303
INFO [04-17|10:24:10] IPC endpoint opened url=/root/.ethereum/rinkeby/geth.ipc
INFO [04-17|10:24:10] IPC endpoint closed endpoint=/root/.ethereum/rinkeby/geth.ipc
INFO [04-17|10:24:10] Blockchain manager stopped
INFO [04-17|10:24:10] Stopping Ethereum protocol
INFO [04-17|10:24:10] RLPx listener up self=enode://350e33a2680260f24bd1837e59610173769023f6cf609ab59b1aca63dc867cce5d7cb520343ed9a04b8a98d5a7d08f57f9e2ee258502312fafad42d005179aab@[::]:30303
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa6e76b]
goroutine 76 [running]:
github.com/ethereum/go-ethereum/eth/filters.(*EventSystem).eventLoop(0xc42c694d00)
/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:434 +0x2eb
created by github.com/ethereum/go-ethereum/eth/filters.NewEventSystem
/go-ethereum/build/_workspace/src/github.com/ethereum/go-ethereum/eth/filters/filter_system.go:113 +0x104
- Can anyone help, what is causing the above issue?
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xa6e76b]
When I run the same docker with --rpcaddr 127.0.0.1
it works fine, but cannot access from remote client,
sudo docker run -it -p 8545:8545 -p 30303:30303 ethereum/client-go --rpc --rinkeby --syncmode "fast" --rpc --rpcapi 'db,eth,net,web3,personal' --rpcaddr 127.0.0.1 --cache=1024
I have tried using,
- Public DNS (IPv4),
- IPv4 Public IP and
- Elastic IP
for the --rpcaddr values
Also I have given the security permission in aws TCP inbound and outbound ports.
Am i doing this right? Is this the right way to run web3 provider?