I have created my private Ethereum blockchain network. From different servers I am able to connected and added into the network as peer without any problem.
The way I run my server:
geth --targetgaslimit "994712388" --port 3000 --networkid 23422 --identity node1 --verbosity 3 --nodiscover --nat none --datadir="/home/miner/MyEthereumEbloc" --rpccorsdomain '*' --rpc --rpcaddr "localhost" -- rpcport="8545" --nodiscover --maxpeers=6 --ipcapi "admin,eth,web3" --autodag
As you can see the RPC port is open:
$ telnet localhost 8545 Trying 127.0.0.1... Connected to localhost.
Inside my geth console:
> admin.startRPC("127.0.0.1", 8545, "*", "web3,net,eth") HTTP RPC already running on localhost:8545
http://localhost:8545 is the RPC port of my locally running Ethereum node software. But on my browser at
http://localhost:8545 I am seeing the following error:
Inside the geth console, where I run my bootstrap node; I am running the following code in order to communicate to my local node:
var Web3 = require("web3"); var web3 = new Web3(new Web3.providers.HttpProvider('http://localhost:8545')); web3.isConnected() //returns false
web3.isConnected() keeps return false.
[Q] I know there is many documentation related to web3 connection to the local node and I have followed all the suggestions. But I am not able the fix the web3 connection problem I am facing. How could I fix this problem? Thank you for your valuable time and help.
I have done the suggestions from following questions: How to connect a web site to a geth node?, https://forum.ethereum.org/discussion/3414/step-by-step-guide-to-connect-a-web-site-to-a-geth-node, https://gitter.im/ethereum/web3.js/archives/2015/12/31.