Javascript FTPS服务器提供错误:超时(控制套接字)
我正在尝试使用node js连接到ftps服务器。我正在使用“”模块。但它给了我以下的错误。我尝试了许多模块,但出现了相同的错误。请帮帮我 index.jsJavascript FTPS服务器提供错误:超时(控制套接字),javascript,node.js,ftps,ftp-server,Javascript,Node.js,Ftps,Ftp Server,我正在尝试使用node js连接到ftps服务器。我正在使用“”模块。但它给了我以下的错误。我尝试了许多模块,但出现了相同的错误。请帮帮我 index.js const ftp = require("basic-ftp") example(); async function example() { const client = new ftp.Client() client.ftp.verbose = true; try {
const ftp = require("basic-ftp")
example();
async function example() {
const client = new ftp.Client()
client.ftp.verbose = true;
try {
const secureOptions = {
rejectUnauthorized: false,
host: "xxx.xxx.com",
port:990
};
await client.access({
host: "xxx.xxx.com",
port:990,
user: "xxxx@xxxx.xxx",
secure:true,
password: "xxxxxx",
secureOptions : secureOptions
});
}
catch(err) {
console.log(err)
}
}
Error: Timeout (control socket)
at Socket.socket.once (D:\node\basicftp\node_modules\basic-ftp\dist\FtpConte
xt.js:310:58)
at Object.onceWrapper (events.js:286:20)
at Socket.emit (events.js:198:13)
at Socket._onTimeout (net.js:442:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)
使用client.ftp.verbose=true查看它卡在哪里。并将日志添加到问题中它已经是true client.ftp.verbose=true;我将粘贴我的整个codeuse client.ftp.verbose=true,以查看它粘贴在哪里。并将日志添加到问题中它已经是true client.ftp.verbose=true;我将粘贴我的全部代码