首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >FEAT命令后出现Gulp Vinyl FTP ECONNRESET错误

FEAT命令后出现Gulp Vinyl FTP ECONNRESET错误
EN

Stack Overflow用户
提问于 2017-11-08 22:46:27
回答 1查看 147关注 0票数 1

我正在尝试使用gulp-vinyl ftp插件上传到远程站点。

代码语言:javascript
复制
gulp.task("deploy", ["default"], function () {

    var conn = ftp.create({
        host: "mywebsite",
        user: "****",
        password: "******",
       // secure: true,
      timeOffset: -301,
       parallel: 1,
       debug: gutil.log
    });    

    var globs = [
        "distr/**/*.php",
        "!out/vendor/**",
        "!out/config.php",
        "out/**/*.map",
        "out/**/*.css",
        "out/**/*.js"
    ];
    return gulp.src(globs)
        .pipe(conn.newer("/")).pipe(debug({ title: "Deploy New: " }))

});

但是,我收到以下错误:

代码语言:javascript
复制
events.js:182
  throw er; // Unhandled 'error' event
  ^

Error: read ECONNRESET
    at exports._errnoException (util.js:1016:11)
    at TCP.onread (net.js:609:25)

调试输出如下:

代码语言:javascript
复制
[08:37:28] [connection] < '220 Microsoft FTP Service\r\n'
[08:37:28] [parser] < '220 Microsoft FTP Service\r\n'
[08:37:28] [parser] Response: code=220, buffer='Microsoft FTP Service'
[08:37:28] [connection] > 'USER xxx'
[08:37:29] [connection] < '331 Password required\r\n'
[08:37:29] [parser] < '331 Password required\r\n'
[08:37:29] [parser] Response: code=331, buffer='Password required'
[08:37:29] [connection] > 'PASS xxxx'
[08:37:29] [connection] < '230 User logged in.\r\n'
[08:37:29] [parser] < '230 User logged in.\r\n'
[08:37:29] [parser] Response: code=230, buffer='User logged in.'
[08:37:29] [connection] > 'FEAT'

到此为止吧。

但是,我可以通过WinSCP连接得很好。

代码语言:javascript
复制
. 2017-11-08 08:36:24.161 Connecting to mywebsite ...
. 2017-11-08 08:36:24.192 Connected with  mywebsite. Waiting for welcome message...
< 2017-11-08 08:36:24.285 220 Microsoft FTP Service
> 2017-11-08 08:36:24.285 USER xxxx
< 2017-11-08 08:36:24.379 331 Password required
> 2017-11-08 08:36:25.861 PASS ********
< 2017-11-08 08:36:25.970 230 User logged in.
> 2017-11-08 08:36:25.970 SYST
. 2017-11-08 08:36:26.064 The server is probably running Windows, assuming that directory listing timestamps are affected by DST.
< 2017-11-08 08:36:26.064 215 Windows_NT
> 2017-11-08 08:36:26.064 FEAT
< 2017-11-08 08:36:26.157 211-Extended features supported:
< 2017-11-08 08:36:26.157  LANG EN*
< 2017-11-08 08:36:26.157  UTF8
< 2017-11-08 08:36:26.157  AUTH TLS;TLS-C;SSL;TLS-P;
< 2017-11-08 08:36:26.157  PBSZ
< 2017-11-08 08:36:26.157  PROT C;P;
< 2017-11-08 08:36:26.157  CCC
< 2017-11-08 08:36:26.157  HOST
< 2017-11-08 08:36:26.157  SIZE
< 2017-11-08 08:36:26.157  MDTM
< 2017-11-08 08:36:26.157  REST STREAM
< 2017-11-08 08:36:26.157 211 END
> 2017-11-08 08:36:26.157 OPTS UTF8 ON
< 2017-11-08 08:36:26.251 200 OPTS UTF8 command successful - UTF8 encoding now ON.
. 2017-11-08 08:36:26.298 Connected

我在主机字段中尝试了IP地址和域名,并注释掉了timeOffset和parallel选项。

老实说,我不知道从哪里开始;任何建议都将不胜感激。

谢谢。

EN

回答 1

Stack Overflow用户

发布于 2017-11-09 15:01:31

你会发现很多关于在收到FEAT命令后神秘地(并且不一致地)关闭连接的帖子。

我还没有找到任何明确的解决方案,但解决办法似乎是拒绝FEAT命令(如果Gulp可以处理的话)。

在IIS管理器中,转到FTP > FTP请求过滤>命令选项卡>操作>拒绝命令,然后键入FEAT

另请参见Microsoft FTP fails to connect after the client requests the list of features (FEAT)

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47182629

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档