【发布时间】:2018-05-10 13:37:03
【问题描述】:
我已成功在 Azure VM (OS Windows) 中设置节点。下面是命令
geth --rpc --rpcport 8545 --rpcaddr 0.0.0.0 --rpccorsdomain "*" --datadir testprivareDir --port "30303" --nodiscover --rpcapi "db,eth,net,web3" --networkid XXXX
在我托管在 Azure 网站上的代码中
new Web3.providers.HttpProvider("http://publicIP:8545")); **-- not working**
new Web3.providers.HttpProvider("http://dnsname:8545")); **-- not working**
注意
- 我可以在 Remix web3Provider 中使用 localhost:8545 在带有节点的 VM 内访问它,但我无法使用公共 IP (publicIP:8545) 或 DNSName 访问 VM 外部: 8545
- 我在 VM 的网络安全组中打开了 30303、8545、22,8000、8080 端口
- 节点当前也正在成功挖矿
rpccorsdomain "*", --rpcaddr 0.0.0.0, try also --rpcaddr StaticIP
我正在考虑是否可以在带有节点的 VM 之外的 Remix 中访问它,它应该在 Azure 网站中也能正常工作。
【问题讨论】:
-
应该
web3Porvider是web3Provider吗?如果是,请编辑。
标签: azure-web-app-service ethereum go-ethereum