node-ftp: ECONNRESET Error using ftp

Hello,

I am experiencing an issue on one windows machine trying to use node-ftp. The issue appears to be network related, as I can complete this on another machine without issue.

The script I am using is the following:

var FTP = require( 'ftp' );
var client = new FTP();

client.on( 'ready', onReady );

function onReady() {
    client.list( '/', onList );
}

function onList( err, list ) {
    if ( err ) console.log( err.stack );
    else console.log( list );
}

client.connect( {
    user: '',
    password: '',
    host: '',
    debug: console.log.bind( console )
} );

The error is shown here: nodeftperror

FileZilla on the same machine with the same setup seems to work without issue.

Is there anything that could be causing this?

Thanks

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Reactions: 6
  • Comments: 15

Commits related to this issue

Most upvoted comments

Seems this happening when node code behind certain firewall, such as dell’s sonicwall. Set socket keep alive to false should fix this problem.

connection.js line 106 socket.setKeepAlive(false);

Add an option would be nice.

I was having the same problem, but after this command every all its okay now :

npm install @ionic/app-scripts@nightly --save-dev

+1, same error, but sometimes it works

read ECONNRESET { Error: read ECONNRESET at _errnoException (util.js:1022:11) at TCP.onread (net.js:615:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }

+1 same error, it make the library unusable

+1 same error

+1

+1 for this, getting the same error