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

Error: write EPIPE while uploading #122

Open
rogerfar opened this issue Dec 27, 2018 · 1 comment
Open

Error: write EPIPE while uploading #122

rogerfar opened this issue Dec 27, 2018 · 1 comment

Comments

@rogerfar
Copy link

rogerfar commented Dec 27, 2018

I'm trying to upload with the following config:

  const conn = ftp.create({
    host: '',
    user: '',
    password: '',
    parallel: 1,
    log: gutil.log,
    debug: gutil.log,
    secure: true,
    secureOptions: { rejectUnauthorized: false }
  });

  return gulp.src("**", { base: './_site', cwd: './_site', buffer: false })
    .pipe(conn.dest('/public_html'));

But I'm getting the following error:

[23:03:39] Starting 'deploy'...
[23:03:39] CONN
[23:03:40] [connection] < '220 ProFTPD Server ready.\r\n'
[23:03:40] [parser] < '220 ProFTPD Server ready.\r\n'
[23:03:40] [parser] Response: code=220, buffer='ProFTPD Server ready.'
[23:03:40] [connection] > 'AUTH TLS'
[23:03:40] [connection] < '234 AUTH TLS successful\r\n'
[23:03:40] [parser] < '234 AUTH TLS successful\r\n'
[23:03:40] [parser] Response: code=234, buffer='AUTH TLS successful'
[23:03:40] [connection] > 'PBSZ 0'
[23:03:40] [connection] < '200 PBSZ 0 successful\r\n'
[23:03:40] [parser] < '200 PBSZ 0 successful\r\n'
[23:03:40] [parser] Response: code=200, buffer='PBSZ 0 successful'
[23:03:40] [connection] > 'PROT P'
[23:03:41] [connection] < '200 Protection set to Private\r\n'
[23:03:41] [parser] < '200 Protection set to Private\r\n'
[23:03:41] [parser] Response: code=200, buffer='Protection set to Private'
[23:03:41] [connection] > 'USER [email protected]'
[23:03:41] [connection] < '331 Password required for [email protected]\r\n'
[23:03:41] [parser] < '331 Password required for [email protected]\r\n'
[23:03:41] [parser] Response: code=331, buffer='Password required for [email protected]'
[23:03:41] [connection] > 'PASS pass'
[23:03:41] [connection] < '230 User [email protected] logged in\r\n'
[23:03:41] [parser] < '230 User [email protected] logged in\r\n'
[23:03:41] [parser] Response: code=230, buffer='User [email protected] logged in'
[23:03:41] [connection] > 'FEAT'
[23:03:41] [connection] < '211-Features:\r\n'
[23:03:41] [connection] < ' AUTH TLS\r\n'
[23:03:41] [connection] < ' CCC\r\n'
[23:03:41] [connection] < ' CLNT\r\n'
[23:03:41] [connection] < ' EPRT\r\n'
[23:03:41] [connection] < ' EPSV\r\n'
[23:03:41] [connection] < ' HOST\r\n'
[23:03:41] [connection] < ' LANG bg-BG;en-US;es-ES;fr-FR;it-IT;ja-JP;ko-KR;ru-RU;zh-CN;zh-TW\r\n'
[23:03:41] [connection] < ' MDTM\r\n'
[23:03:41] [connection] < ' MFF modify;UNIX.group;UNIX.mode;\r\n'
[23:03:41] [connection] < ' MFMT\r\n'
[23:03:41] [connection] < ' MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.groupname*;UNIX.mode*;UNIX.owner*;UNIX.ownername*;\r\n'
[23:03:41] [connection] < ' PBSZ\r\n'
[23:03:41] [connection] < ' PROT\r\n'
[23:03:41] [connection] < ' REST STREAM\r\n'
[23:03:41] [connection] < ' SIZE\r\n'
[23:03:41] [connection] < ' SSCN\r\n'
[23:03:41] [connection] < ' TVFS\r\n'
[23:03:41] [connection] < ' UTF8\r\n'
[23:03:41] [connection] < '211 End\r\n'
[23:03:41] [parser] < '211-Features:\r\n AUTH TLS\r\n CCC\r\n CLNT\r\n EPRT\r\n EPSV\r\n HOST\r\n LANG bg-BG;en-US;es-ES;fr-FR;it-IT;ja-JP;ko-KR;ru-RU;zh-CN;zh-TW\r\n MDTM\r\n MFF modify;UNIX.group;UNIX.mode;\r\n MFMT\r\n MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.groupname*;UNIX.mode*;UNIX.owner*;UNIX.ownername*;\r\n PBSZ\r\n PROT\r\n REST STREAM\r\n SIZE\r\n SSCN\r\n TVFS\r\n UTF8\r\n211 End\r\n'
[23:03:41] [parser] Response: code=211, buffer='Features:\r\n AUTH TLS\r\n CCC\r\n CLNT\r\n EPRT\r\n EPSV\r\n HOST\r\n LANG bg-BG;en-US;es-ES;fr-FR;it-IT;ja-JP;ko-KR;ru-RU;zh-CN;zh-TW\r\n MDTM\r\n MFF modify;UNIX.group;UNIX.mode;\r\n MFMT\r\n MLST modify*;perm*;size*;type*;unique*;UNIX.group*;UNIX.groupname*;UNIX.mode*;UNIX.owner*;UNIX.ownername*;\r\n PBSZ\r\n PROT\r\n REST STREAM\r\n SIZE\r\n SSCN\r\n TVFS\r\n UTF8\r\nEnd'
[23:03:41] [connection] > 'TYPE I'
[23:03:41] [connection] < '200 Type set to I\r\n'
[23:03:41] [parser] < '200 Type set to I\r\n'
[23:03:41] [parser] Response: code=200, buffer='Type set to I'
[23:03:41] READY
[23:03:41] MLSD  /
[23:03:41] [connection] > 'PASV'
[23:03:42] [connection] < '227 Entering Passive Mode (185,182,56,218,139,230).\r\n'
[23:03:42] [parser] < '227 Entering Passive Mode (185,182,56,218,139,230).\r\n'
[23:03:42] [parser] Response: code=227, buffer='Entering Passive Mode (185,182,56,218,139,230).'
[23:03:42] [connection] PASV socket connected
[23:03:42] [connection] > 'MLSD /'
[23:03:42] [connection] < '150 Opening BINARY mode data connection for MLSD\r\n'
[23:03:42] [parser] < '150 Opening BINARY mode data connection for MLSD\r\n'
[23:03:42] [parser] Response: code=150, buffer='Opening BINARY mode data connection for MLSD'
[23:03:42] [connection] < '226 Transfer complete\r\n'
[23:03:42] [parser] < '226 Transfer complete\r\n'
[23:03:42] [parser] Response: code=226, buffer='Transfer complete'
[23:03:42] MLSD  /public_html
[23:03:42] [connection] > 'PASV'
[23:03:42] [connection] < '227 Entering Passive Mode (185,182,56,218,140,56).\r\n'
[23:03:42] [parser] < '227 Entering Passive Mode (185,182,56,218,140,56).\r\n'
[23:03:42] [parser] Response: code=227, buffer='Entering Passive Mode (185,182,56,218,140,56).'
[23:03:42] [connection] PASV socket connected
[23:03:42] [connection] > 'MLSD /public_html'
[23:03:43] [connection] < '150 Opening BINARY mode data connection for MLSD\r\n'
[23:03:43] [parser] < '150 Opening BINARY mode data connection for MLSD\r\n'
[23:03:43] [parser] Response: code=150, buffer='Opening BINARY mode data connection for MLSD'
[23:03:43] [connection] < '226 Transfer complete\r\n'
[23:03:43] [parser] < '226 Transfer complete\r\n'
[23:03:43] [parser] Response: code=226, buffer='Transfer complete'
[23:03:43] MKDIR /public_html/2018
[23:03:43] [connection] > 'MKD /public_html/2018'
[23:03:43] [connection] < '257 "/public_html/2018" - Directory successfully created\r\n'
[23:03:43] [parser] < '257 "/public_html/2018" - Directory successfully created\r\n'
[23:03:43] [parser] Response: code=257, buffer='"/public_html/2018" - Directory successfully created'
[23:03:43] PUT   /public_html/about.html
[23:03:43] [connection] > 'PASV'
[23:03:43] [connection] < '227 Entering Passive Mode (185,182,56,218,139,132).\r\n'
[23:03:43] [parser] < '227 Entering Passive Mode (185,182,56,218,139,132).\r\n'
[23:03:43] [parser] Response: code=227, buffer='Entering Passive Mode (185,182,56,218,139,132).'
[23:03:43] [connection] PASV socket connected
[23:03:43] [connection] > 'STOR /public_html/about.html'
[23:03:43] [connection] < '150 Opening BINARY mode data connection for /public_html/about.html\r\n'
[23:03:43] [parser] < '150 Opening BINARY mode data connection for /public_html/about.html\r\n'
[23:03:43] [parser] Response: code=150, buffer='Opening BINARY mode data connection for /public_html/about.html'
[23:03:43] UP    100% /public_html/about.html
[23:03:44] [connection] < '226 Transfer complete\r\n'
[23:03:44] [parser] < '226 Transfer complete\r\n'
[23:03:44] [parser] Response: code=226, buffer='Transfer complete'
[23:03:44] MKDIR /public_html/assets
[23:03:44] [connection] > 'MKD /public_html/assets'
[23:03:44] [connection] < '257 "/public_html/assets" - Directory successfully created\r\n'
[23:03:44] [parser] < '257 "/public_html/assets" - Directory successfully created\r\n'
[23:03:44] [parser] Response: code=257, buffer='"/public_html/assets" - Directory successfully created'
[23:03:44] PUT   /public_html/blog.html
[23:03:44] [connection] > 'PASV'
[23:03:44] [connection] < '227 Entering Passive Mode (185,182,56,218,138,161).\r\n'
[23:03:44] [parser] < '227 Entering Passive Mode (185,182,56,218,138,161).\r\n'
[23:03:44] [parser] Response: code=227, buffer='Entering Passive Mode (185,182,56,218,138,161).'
[23:03:44] [connection] PASV socket connected
[23:03:44] [connection] > 'STOR /public_html/blog.html'
[23:03:44] [connection] < '150 Opening BINARY mode data connection for /public_html/blog.html\r\n'
[23:03:44] [parser] < '150 Opening BINARY mode data connection for /public_html/blog.html\r\n'
[23:03:44] [parser] Response: code=150, buffer='Opening BINARY mode data connection for /public_html/blog.html'
[23:03:44] UP    100% /public_html/blog.html
[23:03:44] [connection] < '425 Unable to build data connection: Operation not permitted\r\n'
[23:03:44] [parser] < '425 Unable to build data connection: Operation not permitted\r\n'
[23:03:44] [parser] Response: code=425, buffer='Unable to build data connection: Operation not permitted'
[23:03:44] 'deploy' errored after 4.85 s
[23:03:44] Error: write EPIPE
    at _errnoException (util.js:992:11)
    at WriteWrap.afterWrite [as oncomplete] (net.js:864:14)
[23:03:44] 'deploy' errored after 8.72 s

When I disable secure it uploads fine.

Is there an issue with ProFTPD and secure?

@xenogenesi
Copy link

I also saw this error using ProFTPD, but then on a second attempt it worked.

I had already set the option: TLSOptions NoSessionReuseRequired as mentioned in this post

After updating ProFTPd on a server running FreeBSD, certain clients (FireFTP specifically) were able to log in, but not transfer files or retrieve a directory listing. The following error was shown to the client user:

Sep 17 12:31:43 mod_tls/2.4.1[9592]: client did not reuse SSL session, rejecting data connection (see TLSOption NoSessionReuseRequired)

The fix is simple, add the following to proftpd.conf and restart ProFTPd:

TLSOptions NoSessionReuseRequired

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

No branches or pull requests

3 participants