eth-netstats
eth-netstats copied to clipboard
Private chains
Any docs on how would I use it for private chain?
Hi i would like to now if it possible to use eth-netstats in a testnet if so there's any step or documentation in this context. Thanks
These instructions helped me. I have eth-netstats running locally and displaying stats for my private network of 4 nodes (3 remote). However I'm struggling to deploy eth-netstats to heroku..
I followed mattvick's instruction link but still can't get eth-netstats to report anything about my private network. I only see "ATTENTION!This page does not represent the entire state of the ethereum network - listing a node on this page is a voluntary process." and nothing else.
Shouldn't be that hard. I'm totally new to Ethereum (less than 1 week), and I can setup eth-netstats for my private network.
-
when starting eth-netstats, you need to give it the WS_SECRET, like this:
WS_SECRET=Hello npm start
-
in eth-net-intelligence-api, app.json settings should look like this:
"env":
{
"NODE_ENV" : "test", //I changed it from production, but I guess it doesn't matter.
"RPC_HOST" : "localhost",
"RPC_PORT" : "8545",
"LISTENING_PORT" : "30303",
"INSTANCE_NAME" : "node1", // give it a name
"CONTACT_DETAILS" : "",
"WS_SERVER" : "http://localhost:3000", // if running on same machine, other change the localhost to real ip.
"WS_SECRET" : "Hello", //same as WS_SECRET setting on eth-netstats.
"VERBOSITY" : 2
}
then you can try npm start
, so that you can see logs.
That's it.
@aphilsmith
If you inspect the page, you will discover that netstat.min.* files are not loaded (returns 404). This is because the Gruntfile.js has not been executed to create the various resources declared in that file. If you do not have Grunt installed, run:
npm install -g grunt-cli
Then execute the grunt script in the directory where you have eth-stats source code:
grunt
Restart eth-stats app:
WS_SECRET=<your-secret> npm start
You should now see the stats displayed.
@ocheja I'm grateful for your instruction. It works like charm
Most of my confusion was solved when I realized that ethstats require two different processes. One is the node server(aka websockets server) which hosts the website, and another is the pm2 process which transmits the data from ethereum client to website.
@thomasyuan I did the same thing as you mentioned
- In eth-net-intelligence-api, app.json settings it looks like this "env": { "NODE_ENV" : "production", "RPC_HOST" : "localhost", "RPC_PORT" : "8454", "LISTENING_PORT" : "30303", "INSTANCE_NAME" : "node 1", "CONTACT_DETAILS" : "", "WS_SERVER" : "http://localhost:3000", "WS_SECRET" : "Hello", "VERBOSITY" : 2 }
- when starting eth-netstats, i gave WS_SECRET, like this: WS_SECRET=Hello npm start It gives a error that says "'WS_SECRET' is not recognized as an internal or external command, operable program or batch file."
If i give WS_SECRET as: npm start WS_SECRET=Hello It gives an erroe that says:
[email protected] start C:\Users\nikhita.nimbalkar\Monitoring_Privatenet\eth- netstats node ./bin/www "WS_SECRET=Hello"
2018-02-19 12:18:00.234 [API] WS_SECRET NOT SET!!!
Here is the image of the error
Can you please help me out on how to solve this error.
in Windows, you should : set WS_SECRET="Hello" npm start
There are better blogs available on this documentation:
- https://ayushyachitransh.wordpress.com/2018/04/21/setting-up-monitoring-for-ethereum-network/
- https://blog.ippon.tech/monitoring-the-ethereum-blockchain/
No matter which of these tutorials I follow, I always get the same error:
Anybody had the same issue?
Error says:
Closed - wrong auth
This means that in the config to start the eth-net-intelligence-api service, you entered incorrect information of WS_SECRET
I had the same idea and repeated it with various keys, always with the same result.
Setting it with:
set WS_SECRET=secret && npm start
... is the correct way to do it?
Seems like the client(geth) is using secret like “ secret”, many spaces before “secret”. How did you start the geth?
The space is there because i painted black over the rest of the WS_SECRET.
I am starting geth with:
geth --identity "miner1" --rpccorsdomain "*" --rpcapi "db,eth,net,web3,personal,miner,admin" --nat "any" --networkid 500 --datadir "miner1" --nodiscover --mine --rpc --rpcport "8042" --port "30303" --unlock 0 --password miner1\password.sec
And my app.json:
[
{
"name" : "Test-Blockchain",
"script" : "app.js",
"log_date_format" : "YYYY-MM-DD HH:mm Z",
"merge_logs" : false,
"watch" : false,
"max_restarts" : 10,
"exec_interpreter" : "node",
"exec_mode" : "fork_mode",
"env":
{
"NODE_ENV" : "Test",
"RPC_HOST" : "localhost",
"RPC_PORT" : "8042",
"LISTENING_PORT" : "30303",
"INSTANCE_NAME" : "miner1",
"CONTACT_DETAILS" : "",
"WS_SERVER" : "http://localhost:3000",
"WS_SECRET" : "Secret",
"VERBOSITY" : 3
}
}
]
Try add option ‘--ethstats value’ Reporting URL of a ethstats service (nodename:secret@host:port)
Thanks for the hint. I found that it is an issue with the syntax I used:
You can see in the screenshot above, that it works, when I leave out the whitespace in front of the &&. Thank you for your help. Maybe this helps the next Windows user.
created a dashboard for non-pow networks https://github.com/goerli/netstats-server/
i have a question about node nethermind. What settings need to be made?
#. I need help.
eth-netstats setup on private blockchain is only accessible thru HTTP://localhost:3000 but not HTTP://{{ipaddress}}:3000. ports are open, netstat -tupln shows app is listening on 3000 port. what has to be done in production environment ?
eth-netstats setup on private blockchain is only accessible thru HTTP://localhost:3000 but not HTTP://{{ipaddress}}:3000. ports are open, netstat -tupln shows app is listening on 3000 port. what has to be done in production environment ?
What is the output of netstat? Is your web server running on localhost or 0.0.0.0 (all interfaces)? This is most likely the issue
eth-netstats setup on private blockchain is only accessible thru HTTP://localhost:3000 but not HTTP://{{ipaddress}}:3000. ports are open, netstat -tupln shows app is listening on 3000 port. what has to be done in production environment ?
What is the output of netstat? Is your web server running on localhost or 0.0.0.0 (all interfaces)? This is most likely the issue
root@scale-geth-2:/home/ubuntu# netstat -tupln |grep 3000 tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 232804/node
My node.json looks like this. --eth.netstats flag is added to the geth command [ { "name" : "spu-miner", "script" : "app.js", "log_date_format" : "YYYY-MM-DD HH:mm Z", "merge_logs" : false, "watch" : false, "max_restarts" : 10, "exec_interpreter" : "node", "exec_mode" : "fork_mode", "env": { "NODE_ENV" : "production", "RPC_HOST" : "localhost", "RPC_PORT" : "8545", "LISTENING_PORT" : "30311", "INSTANCE_NAME" : "sp-1", "CONTACT_DETAILS" : "12345", "WS_SERVER": "http://192.168.x.x:3000", "WS_SECRET": "spuggg", "VERBOSITY" : 1 } } ]