I am working on private Ethereum Network. I run Ethereum boot-node and Ethereum Block Explorer
app ( https://github.com/etherparty/explorer (A lightweight ethereum block explorer.) ) on the main server.
Inside the main server where I run Ethereum node, at the browser I could connect into the Ethereum Block Explorer
from localhost:8000
:
But from an external node on the browser, when I try to connect from main server's ip address < ip-address >:8000
I have faced with the following error message. The main reason of this error message was "web3
is not connected"
var eth_node_url = 'http://localhost:8545'; // TODO: remote URL
web3.setProvider(new web3.providers.HttpProvider(eth_node_url));
if(!web3.isConnected()) {
$('#connectwarning').modal({keyboard:false,backdrop:'static'}) //enters here
$('#connectwarning').modal('show') //enters here
}
On the external node, if I run geth
app on the background that is already connected to the private Ethereum network, it solves the problem.
[Q] On the external node without running the geth
app on the background, is it possible for Ethereum Block Explorer
to connect into the geth
app that is already running on the main server? If yes, is there a secure approach as running geth
with --rpcaddr="localhost" --rpccorsdomain="*"
on the main server?
Thank you for your valuable time and help.
Note:
=> The way I run the Ethereum Node:
geth --port 3000 --networkid 23422 --nodiscover --datadir="/home/MyEthereumEbloc"
--rpc --rpcaddr="localhost" --rpccorsdomain="*" --maxpeers=6 --ipcapi
"admin,eth,web3" --autodag
=> In order to install Ethereum Block Explorer
, I have followed the installation guide on https://github.com/etherparty/explorer.
[~$] git clone https://github.com/etherparty/explorer [~$] cd explorer [~/explorer$] npm start > [email protected] prestart /home/netlab/explorer > npm install > [email protected] postinstall /home/netlab/explorer > bower install > [email protected] start /home/netlab/explorer > http-server ./app -a 79.123.177.145 -p 8000 -c-1 Starting up http-server, serving ./app on port: 8000
=> Inside package.json file that is located under explorer folder: app started as follows:
"start": "http-server ./app -a localhost -p 8000 -c-1"
Please know that when I have changed localhost to node'a ip-address it didn't help:
"start": "http-server ./app -a <ip-address> -p 8000 -c-1"
Ethereum Block Explorer
. I know this is an indirect solution, but what about using your own VPN and let them think there are in the same network? Or maybe just an ssh tunnel may be enough?geth
for theETH
on my local machine and still can see all the information on the website.