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
While connecting to FTP server ready and greeting event did not trigger. after few second end and close event is called
below is my code
var mime = require('mime-types')
var Client = require('ftp');
var fs = require('fs')
var ftpClient = new Client();
ftpClient.on('greeting', function (msg) {
console.log("FTP connected*")
});
ftpClient.on('ready', function () {
console.log("FTP connected*")
});
ftpClient.on('close', function (hadErr) {
console.log("******FTP Connection has been closed", hadErr)
});
ftpClient.on('error', function (error) {
console.log("****************Error in connecting to FTP", error)
});
ftpClient.on('end', function () {
console.log("****************Connection has been ended")
Hi All,
While connecting to FTP server ready and greeting event did not trigger. after few second end and close event is called
below is my code
var mime = require('mime-types')
var Client = require('ftp');
var fs = require('fs')
var ftpClient = new Client();
ftpClient.on('greeting', function (msg) {
console.log("FTP connected*")
});
ftpClient.on('ready', function () {
console.log("FTP connected*")
});
ftpClient.on('close', function (hadErr) {
});
ftpClient.on('error', function (error) {
console.log("****************Error in connecting to FTP", error)
});
ftpClient.on('end', function () {
console.log("****************Connection has been ended")
});
ftpClient.connect({
"host": 'hostname',
"port": 22,
"user": "user",
"password": "password",
"keepalive": 500,
// "pasvTimeout": 50000,
"connTimeout": 5500000
});
Plz help
The text was updated successfully, but these errors were encountered: