Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I cant see running nodes #328

Open
maroodb opened this issue Aug 9, 2018 · 11 comments
Open

I cant see running nodes #328

maroodb opened this issue Aug 9, 2018 · 11 comments

Comments

@maroodb
Copy link

maroodb commented Aug 9, 2018

How to make eth-netstats detect running nodes?

@maroodb maroodb changed the title I cant see running node I cant see running nodes Aug 9, 2018
@AyushyaChitransh
Copy link

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

@zscole
Copy link

zscole commented Aug 9, 2018

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:

  1. a primary node is running eth net stats, which parses data streams coming from the api nodes and serves that data on the netstats page
  2. all the other nodes are running eth net intelligence api and they push that data stream to the server node
  3. you need to format your 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
}
}
]

  1. when you start eth netstats on your server node, use command WS_SECRET=<password> npm start
  2. start api on other nodes with pm2 start app.json
  3. enjoy the sweet taste of precious data

@maroodb
Copy link
Author

maroodb commented Aug 14, 2018

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
    }
  }
]

@mikeyb
Copy link

mikeyb commented Aug 14, 2018

it cant connect to run web3 commands. Check your ports and make sure services are running. This is end user problem, not eth-netstats

@maroodb
Copy link
Author

maroodb commented Aug 14, 2018

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.

@mikeyb
Copy link

mikeyb commented Aug 14, 2018

okay 👍

@mikeyb
Copy link

mikeyb commented Aug 14, 2018

Did you happen to notice the part where you dont start the WS service? Probably gonne need that running to use websockets to geth

@maroodb
Copy link
Author

maroodb commented Aug 14, 2018

yeah isn't it enabled. but I am not sure "WS_SECRET" where to mention it in geth

@mikeyb
Copy link

mikeyb commented Aug 14, 2018

It is not enabled. No where in your geth command do you enable WS.
Try typing this and reading: geth --help | grep ws

@maroodb
Copy link
Author

maroodb commented Aug 14, 2018

sorry I made a typing mistake, I meant isn't enabled

@AyushyaChitransh
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants