You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I setup an FTP server in my js script using ftp-srv, I noticed that there's an errors on the transfert (it was working before)
If I use my FTP client, with a public FTP server, it works well.
}
});
ftpServer.listen().then(() => {
console.log('Ftp server is starting...')
});
The error message:
{"name":"ftp-srv","hostname":"2fda095d0724","pid":125592,"id":"a0fe1dfd-2d6f-4bb2-8c60-850158af3799","ip":"127.0.0.1","level":50,"err":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n
at TCP.onStreamRead (internal/stream_base_commons.js:209:20)","code":"ECONNRESET"},"msg":"Client error","time":"2022-12-13T16:44:30.489Z","v":0}
Here's the transfert logs
220-Hello, I'm FTP server
220 Ready
USER user
331 Username okay, awaiting password
PASS password
230 User logged in, proceed
PWD
257 "/"
EPSV
229 EPSV OK (|||5054|)
TYPE I
200 Switch to "binary" transfer mode.
SIZE test.xml
213 10779
RETR test.xml
150 File status okay; about to open data connection
226 /test.xml
QUIT
221 Client called QUIT
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello
I setup an FTP server in my js script using ftp-srv, I noticed that there's an errors on the transfert (it was working before)
If I use my FTP client, with a public FTP server, it works well.
Here's my code:
const port = 21;
const ftpServer = new FtpSrv({
url: "ftp://127.0.0.1:" + port,
pasv_url:'ftp://127.0.0.1' ,
anonymous: false,
});
ftpServer.on('login', (auth, resolve, reject) => {
if(auth.username === 'user' && auth.password === 'password'){
const rootFolder = ((__dirname)+"/../../data/test_cases/");
log.info('Authentication successful, FTP running under:'+rootFolder);
return resolve({ root:rootFolder });
The error message:
{"name":"ftp-srv","hostname":"2fda095d0724","pid":125592,"id":"a0fe1dfd-2d6f-4bb2-8c60-850158af3799","ip":"127.0.0.1","level":50,"err":{"message":"read ECONNRESET","name":"Error","stack":"Error: read ECONNRESET\n
at TCP.onStreamRead (internal/stream_base_commons.js:209:20)","code":"ECONNRESET"},"msg":"Client error","time":"2022-12-13T16:44:30.489Z","v":0}
Here's the transfert logs
220-Hello, I'm FTP server
220 Ready
USER user
331 Username okay, awaiting password
PASS password
230 User logged in, proceed
PWD
257 "/"
EPSV
229 EPSV OK (|||5054|)
TYPE I
200 Switch to "binary" transfer mode.
SIZE test.xml
213 10779
RETR test.xml
150 File status okay; about to open data connection
226 /test.xml
QUIT
221 Client called QUIT
Beta Was this translation helpful? Give feedback.
All reactions