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

read ECONNRESET error #100

Open
bitsinside opened this issue May 18, 2020 · 1 comment
Open

read ECONNRESET error #100

bitsinside opened this issue May 18, 2020 · 1 comment

Comments

@bitsinside
Copy link

bitsinside commented May 18, 2020

i want to print interface

try {
  var connection = MikroNode.getConnection("192.168.1.168", "admin", "admin");

  connection.connect(function (conn) {
    conn.closeOnDone = true;
    var chan2 = conn.openChannel(2);
    chan2.write("/interface/print", function (chan) {
      chan.on("read", function (data) {
        packet = MikroNode.parseItems(data);
        console.log("Interface change: " + JSON.stringify(packet));
      });
    });
  });
} catch (error) {}```
**Getting this error**
```Error: read ECONNRESET
    at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
Emitted 'error' event on Channel instance at:
    at Channel.errorListener (D:\mikrotik\node_modules\mikronode-ng\lib\channel.js:205:8)
    at Connection.madeListener (D:\mikrotik\node_modules\mikronode-ng\lib\utils.js:173:8)
    at Object.onceWrapper (events.js:417:26)
    at Connection.emit (events.js:310:20)
    at Socket.<anonymous> (D:\mikrotik\node_modules\mikronode-ng\lib\connection.js:503:10)
    at Socket.emit (events.js:310:20)
    at emitErrorNT (internal/streams/destroy.js:92:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
    at processTicksAndRejections (internal/process/task_queues.js:84:21) {
  errno: 'ECONNRESET',
  code: 'ECONNRESET',
  syscall: 'read'
}```
@0x133337
Copy link

same problem, you have resolved the issue?

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

2 participants