[Ethereum] Azure Ethereum cannot connect

go-ethereummicrosoft-azure

I created a VM instance on Microsoft Azure using its Go Ethereum template. The node is running and syncing. However it does not allow me to access remotely. I ran geth attach on my local computer and got the following error:

Fatal: Failed to start the JavaScript console: api modules: Post http://104.201.38.85:8545: dial tcp 104.201.38.85:8545: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

My parameters are geth --rpc --rpcaddr 0.0.0.0 --rpcport 8545. This should allow external access. I also checked security group and the inbound port 8545 is open. What is the reason that I cannot connect?

Best Answer

make sure you have attached the network interface rules for port 8545 under inbound port rules

check your ubuntu how did you run your geth console- mine is some thing like this as shown below

geth --identity "node1" --rpc --rpcport "8545" --rpccorsdomain "*" --fast --rpc --rpcaddr "10.0.0.4" --datadir "node1" --port "30303" --rpcapi "db,eth,net,web3,personal,miner,admin" --mine --minerthreads "1" --ws --wsaddr "10.0.0.4" --wsorigins "*" --networkid 1900 --nat "any"

check the terminal output: it should show like this' INFO [05-19|08:40:11] HTTP endpoint opened url=http://10.0.0.4:8545

then open another ssh to your vm and connect: geth attach http://10.0.0.4:8545 if it works. then go back to your pc terminal geth attach http://Azurevmip.add.re.ss:8545. it will work as i just tried this out

Related Topic