I have a Desktop and Laptop.I have configured private blockchain on my Desktop(node1) and able to sync with it from Node2 Laptop.But I am not able to get connected to the contract deployed on Node 1 via a web page i created.
web3.version.getNetwork((err, netId)
this function throws error Invalid JSON RPC response
.
I am able to access the contract from web page located on my Desktop.
First Node geth --identity "Node1" --rpc --rpcport "8545" --rpccorsdomain "*" --datadir <data-path-1> --port "<defaultport>" --rpcapi "db,eth,net,web3,personal,miner" --networkid 123 console 2>> logfile_1
Second Node geth --identity "Node2" --rpcport "8545" --rpcaddr "xxx.xxx.xx.xx" --rpccorsdomain "*" --datadir <data-path-2> --port "<defaultport>" --rpcapi "db,eth,net,web3,personal,miner" --networkid 123 console 2>> logfile_2