5

I have set up an ethereum node on an ubuntu server. I'm running a geth instance with a miner in a private test net.

For the life of me I cant get eth-net-intelligence-api to monitor the eth-network.

So I've edited my app.json to reflect the correct servers and secret. And I've followed the install instructions on both githubs.

Additional question: will "WS_SECRET=abc npm start" to start the net-intelligence frontend be enough for the secret to work properly?

I think the problem is with the WS server. What exactly should I set the WS server to be?

2

I haven't found a good guide for this on the web, so I'll try to make this answer be one

enter image description here

How to setup eth-netstats and eth-net-intelligence-api

Installation

You need something to run a local blockchain (Ganache is great)

Install the beautifully named eth-net-intelligence-api (it sits between the chain & eth-netstats)
(also need to install pm2 for running eth-net-intelligence-api)

Install eth-netstats (the actual lovely web interface to the chain data)

Configuration

There actually is very little configuration required to get this started

In eth-net-intelligence-api edit the app.json file :

[   {
    "name"              : "aName",
    "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"        : "7545",
      "LISTENING_PORT"  : "30303",
      "INSTANCE_NAME"   : "anInstanceNameIsRequired",
      "CONTACT_DETAILS" : "",
      "WS_SERVER"       : "http://localhost:3000",
      "WS_SECRET"       : "aSecret",
      "VERBOSITY"       : 2
    }   } ]

Note :
the RPC_PORT changed to 7545 for my Ganache chain
the WS_SECRET value is needed below

To run

1) Start your chain (with Ganache this is a GUI)

2) eth-net-intelligence-api

pm2 start app.json

3) eth-netstats

WS_SECRET=aSecret npm start

4) Go to http://localhost:3000

| improve this answer | |
0

I just started experimenting myself. I've got one node on my private network running eth-netstats (private IP 192.168.40.100 running on default port 3000). On all nodes I have eth-net-intelligence-api running and I point WS_SERVER to "http://192.168.40.100:3000",

One thing I found confusing: in the example the WS_SERVER had prefix "wss://...". Turns out it needs to be "http://..."

My app.json has:

  "NODE_ENV"        : "production",
  "RPC_HOST"        : "localhost",
  "RPC_PORT"        : "8545",
  "LISTENING_PORT"  : "30303",
  "INSTANCE_NAME"   : "ethereum_pi_0",
  "CONTACT_DETAILS" : "Joe",
  "WS_SERVER"       : "http://192.168.40.100:3000",
  "WS_SECRET"       : "mysecret",
  "VERBOSITY"       : 2
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.