bitpay / bitcore-node

Extensible full node using Bitcore
https://bitcore.io/
Other
352 stars 644 forks source link

RPC Error, Socket Hang up #503

Open elichai opened 7 years ago

elichai commented 7 years ago

Hi, I sometimes get this error:

RPCError: Bitcoin JSON-RPC: Request Error: socket hang up
    at Bitcoin._wrapRPCError (/root/re2Node/node_modules/bitcore-node/lib/services/bitcoind.js:449:13)
    at /root/re2Node/node_modules/bitcore-node/lib/services/bitcoind.js:1958:28
    at ClientRequest.<anonymous> (/root/re2Node/node_modules/bitcore-node/node_modules/bitcoind-rpc/lib/index.js:116:7)
    at ClientRequest.emit (events.js:107:17)
    at Socket.socketOnEnd (_http_client.js:300:9)
    at Socket.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickCallback (node.js:355:11)

how can I fix it?

yinqianwu commented 7 years ago

Same issue here. The issue probably is caused by too many RPC requests since I am trying to loop through all transaction data by using client.getTX(txhash, 0). Anyone know how to solve it?

[debug] (http) Request for method=GET path=/tx/b7bb53c4783dc427a035577054bc24634191993a01b75f3b19a326920fc19535 (::ffff:127.0.0.1).
[debug] (http) Request for method=GET path=/tx/7dd384e95f291e658f77580d9b49f023acb670eec10fe55b038d0cd6ea582c84 (::ffff:127.0.0.1).
[debug] (http) Request for method=GET path=/tx/305a3300acfbbe158daf01d6cb35c8c75888f6984488942a94489315b2465f45 (::ffff:127.0.0.1).
[debug] (http) Request for method=GET path=/tx/2c406740a1de7f4a3c4a7b5ca4399aea7b43085159fbc462743953d005a4a1b3 (::ffff:127.0.0.1).
 Error: socket hang up
    at createHangUpError (_http_client.js:329:15)
    at Socket.socketOnEnd (_http_client.js:421:23)
    at emitNone (events.js:110:20)
    at Socket.emit (events.js:207:7)
    at endReadableNT (_stream_readable.js:1057:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9) code: 'ECONNRESET'
tangjielong commented 6 years ago

why ,help me?