1

I have setup node in Azure VM (OS Windows) successfully. Below are the commands

geth  --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --datadir testprivareDir --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid XXXX   

In my code hosted in Azure websites

new Web3.providers.HttpProvider("http://publicIP:8545"));  **-- not working**

new Web3.providers.HttpProvider("http://dnsname:8545"));  **-- not working**

Note

  • I can access it in Remix web3Provider using localhost:8545 inside the VM with the node, but I can't access outside the VM using the public IP (publicIP:8545) or the DNSName:8545
  • I have port 30303, 8545, 22,8000, 8080 open in network security group of the VM
  • The node is currently mining successfully as well
  • rpccorsdomain "*", --rpcaddr 0.0.0.0, try also --rpcaddr StaticIP

I am thinking if I can access it in Remix outside the VM with node, it should probably work as well in Azure websites.

roytags
  • 99
  • 6

1 Answers1

0

Will answer my own question so others can see it also.

In the Azure Network Security Group - make sure port 22 is the first priority (priority 100).

  • Before - set up is 8545 priority 100, 22 priority 101 - did not work

  • After - set up is 22 priority 100, 8545 priority 101 - it worked :)

I am not really sure at moment why this ordering affects it.

halfer
  • 19,824
  • 17
  • 99
  • 186
roytags
  • 99
  • 6