mscdex / node-ftp

An FTP client module for node.js
MIT License
1.13k stars 243 forks source link

ECONNRESET Error using ftp #126

Open StuartMorris0 opened 9 years ago

StuartMorris0 commented 9 years ago

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

PinkPandaAU commented 9 years ago

+1 for this, getting the same error

igabesz commented 9 years ago

+1, got similar issues from a Linux server. Our Node.js script is launched daily with cron, and I often got the same ECONNRESET error.

SubZane commented 9 years ago

+1 as I get the same error using any gulp, grunt plugins using the node-ftp module

leggomuhgreggo commented 8 years ago

+1

ruiwei commented 8 years ago

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.

michalhudecek commented 8 years ago

+1 same error, it make the library unusable

CcHard commented 8 years ago

+1

radiocold commented 8 years ago

+1 same error

lajlev commented 8 years ago

+1 same error

Only on specific networks. I was only able to solve it by using with my private VPN 😔

bllevy commented 7 years ago

I get this same error when downloading a large file via FTP.

gabrielCortesReyes commented 6 years ago

+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' }

matheusrolima commented 6 years ago

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

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

sagardere commented 6 years ago

I have a problem when I connect localhost using FTP server. Give me suggestions

err { Error: connect ECONNREFUSED 127.0.0.1:21 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14) errno: 'ECONNREFUSED', code: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 21 }

I am also changing port but it not work.

vestige06 commented 5 years ago

You have to put pass "pasv_url" value to its constructor :

const ftpServer = new FtpSrv({ url:'ftp://' + '127.0.0.1' + ':' + '21', pasv_url:'0.0.0.0', anonymous: true }); it's work for me .

Robguzi commented 5 years ago

My application connects to a filezilla server to perform a put method. The file appears on the server without issue, but I always see this error: read ECONNRESET. The server and my client application are on the same LAN. The keepalive false suggestion has no effect for me.