Litecoin:尝试与NodeJS连接时出现错误ECONNRESET

时间:2019-05-27 10:57:29

标签: node.js express litecoin

我正在开始使用莱特币,所以请忍受我的问题。因此,我在本地系统中运行了一个本地litecoin节点。 因此,我计划使用NodeJS与Litecoin服务器进行通信。

我尝试使用以下两个包装器:

https://litecoin.info/index.php/Node-litecoin

https://www.npmjs.com/package/litecoin

但是,尝试调用任何rpc方法时出现以下错误:

/usr/bin/node --inspect-brk=35916 server.js 

Debugger listening on ws://127.0.0.1:35916/71ccef6f-eac8-4bf5-9d07-b0a8b4e93528
For help, see: https://nodejs.org/en/docs/inspector

Debugger attached.

null: Object {host: "localhost", port: 19335, user: "paras", pass: "paras", network: "testnet", …}
null: Client {rpc: Client}
RESTful API server started on: 3005

null: Error: socket hang up
[[StableObjectId]]: 52
code: "ECONNRESET"
message: "socket hang up"
stack: "Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketOnEnd (_http_client.js:426:23)
    at Socket.emit (events.js:194:15)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)"
__proto__: Object {constructor: , name: "Error", message: "", …}
[[StableObjectId]]: 53
constructor: function Error() { … }
message: ""
name: "Error"
toString: function toString() { … }
__proto__: Object {constructor: , __defineGetter__: , __defineSetter__: , …}

包装器都给了我同样的错误。

litecoin.conf
server=1
testnet=1
rpcuser=paras
rpcpassword=paras

有人可以帮我吗?

0 个答案:

没有答案