javascript - FTPS 服务器给出错误:超时(控制套接字)
问题描述
我正在尝试使用节点 js 连接到 ftps 服务器。我正在使用“ https://www.npmjs.com/package/basic-ftp ”模块。但它给了我以下错误。我尝试了许多模块,但发生了同样的错误。请帮帮我
index.js
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)
解决方案
推荐阅读
- android-studio - 如何在android studio中的textview上方显示提示toast
- autodesk-forge - Autodesk forge NOP_VIEWER.getSelection() 给出了一个空数组
- css - 如何在网格视图 CSS 中拉伸图像
- asp.net - UpldatePanel 中的 ASP.Net RadioButtonList 仅选择第一项
- animation - JavaFX。淡化过渡。单击后如何从组中删除对象?
- linux - 使用单个命令将所有 git 修改文件 scp 到另一台服务器
- ajax - ajax contentType false 导致错误:XML Parsing Error: not well-formed
- azure-devops - 将 zip 文件推送到 azure devops
- python-3.x - 由于 Mongoengine 连接未定义错误,使用 FastAPI、Mongoengine 和 Pytest 进行单元测试失败
- excel - 如何创建一个不是 ActiveX 控件的“两列”下拉框,我可以在其中以编程方式填充此框并在 Excel VBA 中使用它?