gps-tracking-nodejs icon indicating copy to clipboard operation
gps-tracking-nodejs copied to clipboard

Error: read ECONNRESET

Open DynWebService opened this issue 8 years ago • 5 comments

Hello,

I recently implemented an adapter for a device, but eventually the node stops the error below: ` events.js:160 throw er; // Unhandled 'error' event ^

Error: read ECONNRESET at exports._errnoException (util.js:1020:11) at TCP.onread (net.js:568:26) `

Can you help me?

DynWebService avatar Nov 09 '17 13:11 DynWebService

Hello, I have the same problem, did you solve it ???

vcianaya avatar Jan 18 '18 01:01 vcianaya

Hello,

Yes, i just add the follow lines in my server.js:

    connection.on('error', function (data) {
       //error handling here 
    })

in my case i just ignore this.

connection.on('error', function (data) {
        console.log("Connection Error: ");
        console.log(data);
       // device.error(data, 'Connection error');
    });

my server.js

var server = gps.server(options,function(device, connection){

    device.on("login_request",function(device_id, msg_parts){
        if (device_id < 0) {
            this.login_authorized(false);
        } else {
            this.login_authorized(true);
        }

    });

    //PING -> When the gps sends their position  
    device.on("ping",function(data){
        return data;
    });

    connection.on('error', function (data) {
        console.log("Connection Error: ");
        console.log(data);
       // device.error(data, 'Connection error');
    });

});

maykonmultilig avatar Jan 18 '18 09:01 maykonmultilig

Do you have some code example so I can test the problem?

gdespirito avatar Apr 03 '18 14:04 gdespirito

image

That error comes out

vcianaya avatar May 11 '18 19:05 vcianaya

What is the best way to resolve this than just ignoring?

GokulanJayaram avatar Jun 26 '18 11:06 GokulanJayaram