Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ready And Greeting Event not triggered while connecting #269

Open
adishupadhyay opened this issue Oct 7, 2020 · 0 comments
Open

Ready And Greeting Event not triggered while connecting #269

adishupadhyay opened this issue Oct 7, 2020 · 0 comments

Comments

@adishupadhyay
Copy link

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) {

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")

});
ftpClient.connect({
"host": 'hostname',
"port": 22,
"user": "user",
"password": "password",
"keepalive": 500,
// "pasvTimeout": 50000,
"connTimeout": 5500000
});
Plz help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant