<p>Can you please try replacing <code>bch-node.json</code> file with this:</p>

<pre><code>{
  "network": "testnet",
  "port": 3007,
  "services": [
    "@owstack/bch-explorer-api",
    "bitcoind",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/@owstack/bch-node/bin/bitcoind"
      }
    },
    "explorer-api": {
       "rateLimiterOptions": {
         "whitelist": ["::ffff:127.0.0.1"]
       }
    },
    "fee": {
      "rpc": {
        "user": "bitcoin",
        "pass": "local321",
        "host": "127.0.0.1",
        "protocol": "http",
        "port": 18332
      }
    }
  }
}
</code></pre>

<p>Because Bitcore won't be able to connect to your node without knowing your RPC username and password.</p>

CC BY-SA 3.0
2018-02-09T18:00:43.413Z
Can you explain what changes have been made to fix the problem?  It makes it easier for everyone to see what the problem was, and what the solution is.
Jestin
CC BY-SA 3.0
2018-02-12T04:49:13.493Z
@MCCCS  Facing same issue after editing bch-node.json file.
kiran malvi
CC BY-SA 3.0
2018-02-12T12:29:56.747Z
@kiranmalvi Try asking it here: https://github.com/bitpay/insight-api/issues
MCCCS
CC BY-SA 4.0
2018-05-03T13:47:17.747Z
@MCCCS: Solved issue as you suggested
kiran malvi
CC BY-SA 3.0
2018-02-09T14:58:53.817Z
2018-02-10T07:45:40.120Z
2018-02-10T07:45:40.120Z
MCCCS
<p>I have tried to setup bitcoin cash explorer in my Linux server and server start working for 5 minutes but after 5 minutes it is returning an error and I have configured explorer-API and it is not working properly in the background.</p>

<h2>Error Facing:</h2>

<pre><code>[2018-02-09T13:32:31.589Z] info: Using config: /home/kiran/bchnode/bch-node.json
[2018-02-09T13:32:31.590Z] info: Using network: testnet
[2018-02-09T13:32:31.591Z] info: Starting bitcoind
[2018-02-09T13:32:31.592Z] info: Using bitcoin config file: 
/home/kiran/bchnode/data/bitcoin.conf
[2018-02-09T13:37:26.959Z] error: Failed to start services
[2018-02-09T13:37:26.960Z] error: RPCError: Bitcoin JSON-RPC: Request 
Error: connect ECONNREFUSED 127.0.0.1:18332
    at Bitcoin._wrapRPCError (/usr/local/lib/node_modules/@owstack/bch-
node/lib/services/bitcoind.js:447:13)
    at /usr/local/lib/node_modules/@owstack/bch-
node/lib/services/bitcoind.js:779:28
    at newCallback (/usr/local/lib/node_modules/@owstack/bch-
node/node_modules/@owstack/bitcoind-rpc/lib/index.js:52:16)
    at ClientRequest.&lt;anonymous&gt; 
(/usr/local/lib/node_modules/@owstack/bch-
node/node_modules/@owstack/bitcoind-rpc/lib/index.js:136:7)
    at ClientRequest.emit (events.js:160:13)
    at TLSSocket.socketErrorListener (_http_client.js:389:9)
    at TLSSocket.emit (events.js:160:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:152:19)
[2018-02-09T13:37:26.961Z] info: Beginning shutdown
[2018-02-09T13:37:26.961Z] info: Stopping @owstack/bch-explorer-api 
(not started)
[2018-02-09T13:37:26.962Z] info: Stopping web (not started)
[2018-02-09T13:37:26.962Z] info: Stopping bitcoind
[2018-02-09T13:37:26.962Z] info: Halted
</code></pre>

<h2>bch-node.json file</h2>

<pre><code>{
  "network": "testnet",
  "port": 3007,
  "services": [
    "@owstack/bch-explorer-api",
    "bitcoind",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/@owstack/bchnode/bin/bitcoind"
      }
    },
    "explorer-api": {
       "rateLimiterOptions": {
         "whitelist": ["::ffff:127.0.0.1"]
       }
     }
  }
}
</code></pre>

<h2>bitcoin.conf file</h2>

<pre><code>server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.2:28332
zmqpubhashblock=tcp://127.0.0.2:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin
rpcpassword=local321
uacomment=bch
</code></pre>

<h2>Installation Process:</h2>

<pre><code>npm install -g @owstack/bch-node
bchnode create -d &lt;bitcoin-data-dir&gt; mynode
cd mynode
bchnode install https://github.com/owstack/bch-explorer-api.git
bchnode start
</code></pre>

<p>It should run "<a href="http://localhost:3007/bch-explorer-api/" rel="nofollow noreferrer">http://localhost:3007/bch-explorer-api/</a>" but it is not returning anything and it is getting error after 5 minutes in my linux terminal.</p>

<p>Please help me about this error related bitcoin cash block explorer.</p>

<p>I am trying to configure <a href="https://bch-insight.bitpay.com" rel="nofollow noreferrer">https://bch-insight.bitpay.com</a> this explorer in my local server If you have any reference github link then please share with me because I m not able to find it.</p>

<bitcoind><bitcoin-cash><bitcoin-core-development>
Bitcoin Cash - Trying to implement Explorer in Linux server but getting error
kiran malvi
# Bitcoin Cash - Trying to implement Explorer in Linux server but getting error

(Asked by: username_0 on 2018-02-09)

I have tried to setup bitcoin cash explorer in my Linux server and server start working for 5 minutes but after 5 minutes it is returning an error and I have configured explorer-API and it is not working properly in the background.
Error Facing:
[2018-02-09T13:32:31.589Z] info: Using config: /home/kiran/bchnode/bch-node.json
[2018-02-09T13:32:31.590Z] info: Using network: testnet
[2018-02-09T13:32:31.591Z] info: Starting bitcoind
[2018-02-09T13:32:31.592Z] info: Using bitcoin config file: 
/home/kiran/bchnode/data/bitcoin.conf
[2018-02-09T13:37:26.959Z] error: Failed to start services
[2018-02-09T13:37:26.960Z] error: RPCError: Bitcoin JSON-RPC: Request 
Error: connect ECONNREFUSED 127.0.0.1:18332
    at Bitcoin._wrapRPCError (/usr/local/lib/node_modules/@owstack/bch-
node/lib/services/bitcoind.js:447:13)
    at /usr/local/lib/node_modules/@owstack/bch-
node/lib/services/bitcoind.js:779:28
    at newCallback (/usr/local/lib/node_modules/@owstack/bch-
node/node_modules/@owstack/bitcoind-rpc/lib/index.js:52:16)
    at ClientRequest. 
(/usr/local/lib/node_modules/@owstack/bch-
node/node_modules/@owstack/bitcoind-rpc/lib/index.js:136:7)
    at ClientRequest.emit (events.js:160:13)
    at TLSSocket.socketErrorListener (_http_client.js:389:9)
    at TLSSocket.emit (events.js:160:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:152:19)
[2018-02-09T13:37:26.961Z] info: Beginning shutdown
[2018-02-09T13:37:26.961Z] info: Stopping @owstack/bch-explorer-api 
(not started)
[2018-02-09T13:37:26.962Z] info: Stopping web (not started)
[2018-02-09T13:37:26.962Z] info: Stopping bitcoind
[2018-02-09T13:37:26.962Z] info: Halted

bch-node.json file
{
  "network": "testnet",
  "port": 3007,
  "services": [
    "@owstack/bch-explorer-api",
    "bitcoind",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/@owstack/bchnode/bin/bitcoind"
      }
    },
    "explorer-api": {
       "rateLimiterOptions": {
         "whitelist": ["::ffff:127.0.0.1"]
       }
     }
  }
}

bitcoin.conf file
server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.2:28332
zmqpubhashblock=tcp://127.0.0.2:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin
rpcpassword=local321
uacomment=bch

Installation Process:
npm install -g @owstack/bch-node
bchnode create -d  mynode
cd mynode
bchnode install https://github.com/owstack/bch-explorer-api.git
bchnode start

It should run "http://localhost:3007/bch-explorer-api/" but it is not returning anything and it is getting error after 5 minutes in my linux terminal.
Please help me about this error related bitcoin cash block explorer.
I am trying to configure https://bch-insight.bitpay.com this explorer in my local server If you have any reference github link then please share with me because I m not able to find it.

**Tags:** bitcoind, bitcoin-cash, bitcoin-core-development


---

## 1 answers

### Answer by username_1 on 2018-02-09. Score: 0 | Accepted answer

Can you please try replacing bch-node.json file with this:
{
  "network": "testnet",
  "port": 3007,
  "services": [
    "@owstack/bch-explorer-api",
    "bitcoind",
    "web"
  ],
  "servicesConfig": {
    "bitcoind": {
      "spawn": {
        "datadir": "./data",
        "exec": "/usr/local/lib/node_modules/@owstack/bch-node/bin/bitcoind"
      }
    },
    "explorer-api": {
       "rateLimiterOptions": {
         "whitelist": ["::ffff:127.0.0.1"]
       }
    },
    "fee": {
      "rpc": {
        "user": "bitcoin",
        "pass": "local321",
        "host": "127.0.0.1",
        "protocol": "http",
        "port": 18332
      }
    }
  }
}

Because Bitcore won't be able to connect to your node without knowing your RPC username and password.

> **Comments:**
> **username_2**: Can you explain what changes have been made to fix the problem?  It makes it easier for everyone to see what the problem was, and what the solution is.  
> **username_0**: @username_1  Facing same issue after editing bch-node.json file.  
> **username_1**: @kiranmalvi Try asking it here: https://github.com/bitpay/insight-api/issues  
> **username_0**: @username_1: Solved issue as you suggested  

---

