Open maroodb opened 5 years ago
You are required to run https://github.com/cubedro/eth-net-intelligence-api
This API will collect information of your RPC and send that information to eth-netstats site.
Remember to update the config.json
file and start using pm2 start app.json
and be sure to prepend WS_SECRET=<pw>
to the eth netstats command on the or you'll get an error. the topology is like this:
app.json
file properly:{ "NODE_ENV" : "production", "RPC_HOST" : "localhost", "RPC_PORT" : "8545", "LISTENING_PORT" : "30303", "INSTANCE_NAME" : "", // this is arbitrary value that just indicates the name of the node on the net stats page "CONTACT_DETAILS" : "", "WS_SERVER" : "192.168.168.201:3000", // this should be set to the IP address of the node that's running eth net stats "WS_SECRET" : "password", // add whatever password you want. needs to be the same on every node though "VERBOSITY" : 2 } } ]
WS_SECRET=<password> npm start
pm2 start app.json
I always got the error: "[eth] =✘= Web3 connection attempt #0 failed" this my app.json :
[
{
"name" : "node-app",
"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" : "8502",
"LISTENING_PORT" : "30312",
"INSTANCE_NAME" : "",
"CONTACT_DETAILS" : "",
"WS_SERVER" : "localhost:3000",
"WS_SECRET" : "7/7use94",
"VERBOSITY" : 2
}
}
]
it cant connect to run web3 commands. Check your ports and make sure services are running. This is end user problem, not eth-netstats
I run geth using this command line:
geth --datadir innofactory1/ --syncmode 'full' --port 30312 --rpc --rpcaddr 'localhost' --rpcport 8502 --rpcapi 'personal,db,eth,net,web3,txpool,miner' --bootnodes 'enode://20c47b4a7bd6d8383f87c1c988e601c7aa27ba7177b25d57e00794d1917c0c992dc37b93dfdf54741633179fd9a96a34fc2687d606ad48e2015ef2d958f3f0fb@10.2.1.124:30310' --networkid 1515 --gasprice '0' --unlock '0x40ee4953da28c4db0f15d671cefc29724ce2b87a' --password innofactory1/password.txt --mine
and I can send transaction using nodejs console.
okay :+1:
Did you happen to notice the part where you dont start the WS service? Probably gonne need that running to use websockets to geth
yeah isn't it enabled. but I am not sure "WS_SECRET" where to mention it in geth
It is not enabled. No where in your geth command do you enable WS.
Try typing this and reading: geth --help | grep ws
sorry I made a typing mistake, I meant isn't enabled
There is another issue with your app.json It should have an instance name, or else, pm2 won't start properly.
The errors about web3 indicate that pm2 service is unable to communicate with RPC.
WS_SECRET is a password which is set when eth-netstat is started and same password is supplied when pm2 is started.
How to make eth-netstats detect running nodes?