lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.12k stars 162 forks source link

lftp **** #227

Open jlmartinezm opened 8 years ago

jlmartinezm commented 8 years ago

we are specting a problema with a remote sftp , when we put a file, file arrive to the remote but dont finish the transmision in our side. thsi problem is before update the servers a lftp from 3.7 to 4.0.9 last version supported by redhat.

** Peer closed connection ** pty read: pseudo-tty: Input/output error ** pty read: pseudo-tty: Input/output error ** pty read: pseudo-tty: Input/output error ** pty read: pseudo-tty: Input/output error ** pty read: pseudo-tty: Input/output error ** Peer closed connection ** pty read: pseudo-tty: Input/output error **\ Peer closed connection

the same issue whith 2 difents server with same specifications Red Hat Enterprise Linux Server release 6.5 (Santiago) Red Hat Enterprise Linux Server release 6.5 (Santiago)

openssl version OpenSSL 1.0.1e-fips 11 Feb 2013

lftp -version LFTP | Version 4.0.9 | Copyright (c) 1996-2010 Alexander V. Lukyanov

rpm -aq |grep lftp lftp-4.0.9-6.el6.x86_64

a quick answer will be appreciated

thanks

zerthimon commented 8 years ago

This may be related: https://github.com/lavv17/lftp/issues/234 I'm also getting:

**** Peer closed connection

and

**** pty read: pseudo-tty: Input/output error

...... and the file arrives at the remote server ...... and the transfer never finishes

jlmartinezm commented 8 years ago

same problem tish command related, the send works fine with sftp -vvv comand

lftp :~> open sftp://cdp_bbva@riskmetrics; mirror -Rep --log=/tmp/lftp_mirror-cmd.log --delete-first --ignore-time --no-symlinks rm: Access failed: Permission denied (authorized_keys) rm: Access failed: Permission denied (authorized_keys_old) rm: Access failed: Permission denied (.ssh) rm: Access failed: No such file rm: Access failed: Permission denied (.key_backup) rm: Access failed: Permission denied (.sftp) rm: Access failed: Permission denied (README.txt) rm: Access failed: No such file rm: Access failed: Permission denied (incoming) rm: Access failed: No such file rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (alpha) rm: Access failed: No such file rm: Access failed: Permission denied (incoming) rm: Access failed: No such file rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (development) rm: Access failed: Permission denied (client_public_key) rm: Access failed: Permission denied (RMG.pub) rm: Access failed: Permission denied (rmg_public_key) rm: Access failed: Permission denied (fileidentifier.20061020.cntl) rm: Access failed: Permission denied (fileidentifier.20061020.positions.rm3d) rm: Access failed: Permission denied (incoming) rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (test_files) rm: Access failed: Permission denied (encryptionkeys) rm: Access failed: Permission denied (incoming) rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (prod) rm: Access failed: Permission denied (project_documentation) rm: Access failed: No such file rm: Access failed: Permission denied (incoming) rm: Access failed: No such file rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (qa) rm: Access failed: Permission denied (incoming) rm: Access failed: Permission denied (outgoing) rm: Access failed: Permission denied (uat) mirror: Access failed: Permission denied (.Xauthority) mirror: Access failed: Permission denied (.bash_history) mirror: Access failed: Permission denied (.bash_logout) mirror: Access failed: Permission denied (.bash_profile) mirror: Access failed: Permission denied (.bashrc) mirror: Access failed: Permission denied (.dvipsrc) mirror: Access failed: Permission denied (.emacs) mirror: Access failed: Permission denied (.exrc) mirror: Access failed: Permission denied (.inputrc) mirror: Access failed: Permission denied (.kermrc) mirror: Access failed: Permission denied (.kshrc_history) mirror: Access failed: Permission denied (.lesshst) mirror: Access failed: Permission denied (.muttrc) mirror: Access failed: Permission denied (.profile) mirror: Access failed: Permission denied (.sh_history) mirror: Access failed: Permission denied (.urlview) mirror: Access failed: Permission denied (.viminfo) mirror: Access failed: Permission denied (.xcoralrc) mirror: Access failed: Permission denied (.xtalkrc) mirror: Access failed: Permission denied (.zshrc) mirror: Access failed: Permission denied (BBVA_002_1042016.cntl_2) mirror: Access failed: Permission denied (FSpruebaH_PRU1) mirror: Access failed: Permission denied (Gnu) mirror: Access failed: Permission denied (URLS_NIMBLE_20150908.txt) mirror: Access failed: Permission denied (atras_vacios) mirror: Access failed: Permission denied (cambiar_vacios) mirror: Access failed: Permission denied (envio_jmr.sh) mirror: Access failed: Permission denied (envio_jmr.sh_23082013) mirror: Access failed: Permission denied (envio_jmr.sh_30072013) mirror: Access failed: Permission denied (environment21032014) mirror: Access failed: Permission denied (eurex_cre_ssh.pub) mirror: Access failed: Permission denied (eurex_rsa) mirror: Access failed: Permission denied (fspeed) mirror: Access failed: Permission denied (fspeed.awk) mirror: Access failed: Permission denied (gnupg) mirror: Access failed: Permission denied (lftp-4.0.9-1.el6.x86_64.rpm) mirror: Access failed: Permission denied (lftp-4.0.9-1.el6_5.1.x86_64.rpm) mirror: Access failed: Permission denied (lftp-4.0.9-6.el6.x86_64.rpm) mirror: Access failed: Permission denied (nohup.out) mirror: Access failed: Permission denied (prueba) mirror: Access failed: Permission denied (prueba.txt) mirror: Access failed: Permission denied (prueba_ñ_2.txt) mirror: Access failed: Permission denied (public_barcelo.asc) mirror: Access failed: Permission denied (qq) mirror: Access failed: Permission denied (rheqq) mirror: Access failed: Permission denied (rherate) mirror: Access failed: Permission denied (sedxcom) mirror: Access failed: Permission denied (ssh.tar) mirror: Access failed: Permission denied (telnet) mirror: Access failed: Permission denied (test_envio) mirror: Access failed: Permission denied (test_envio_se_puede_borrar.txt) mirror: Access failed: Permission denied (test_prueba.txt) mirror: Access failed: Permission denied (transfermin) mirror: Access failed: Permission denied (xcomrate) mirror: Access failed: Permission denied (xcoms.tar) mirror: Access failed: Permission denied (xcomstata) mirror: Access failed: No such file (/.fonts) mirror: Access failed: No such file (/.lftp) mirror: Access failed: No such file (/.mozilla) mirror: Access failed: No such file (/.ssh_old) mirror: Access failed: No such file (/.vim) mirror: Access failed: No such file (/.xemacs) mirror: Access failed: No such file (/Documents) mirror: Access failed: No such file (/Historico) mirror: Access failed: No such file (/bin) mirror: Access failed: No such file (/logs) mirror: Access failed: No such file (/public_html) Total: 1 directory, 56 files, 4 symlinks New: 56 files, 0 symlinks 1268623 bytes transferred Removed: 10 directories, 1 file, 0 symlinks 89 errors detected

any idea?

thanks

BBVA José Luis Martínez Mártínez

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-04-26 12:59 GMT+02:00 Lior Goikhburg notifications@github.com:

This may be related: #234 https://github.com/lavv17/lftp/issues/234 I'm also getting:

**\ Peer closed connection

and

**\ pty read: pseudo-tty: Input/output error

...... and the transfer never finishes

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-214702566

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."

lavv17 commented 8 years ago

does set sftp:use-full-path no change anything? Please turn on debug.

jlmartinezm commented 8 years ago

the same! any idea thanks for your answer

<--- cdp_bbva@riskmetrics's password: XXXX <--- got a packet, length=105, type=2(VERSION), id=0 ---- protocol version set to 4 ---> sending a packet, length=10, type=16(REALPATH), id=1 <--- got a packet, length=63, type=104(NAME), id=1 ---- home set to / ---- path on wire is /prod/incoming/TEST_BBVA_002_1042016.cntl_2' ---> sending a packet, length=61, type=3(OPEN), id=2 <--- got a packet, length=25, type=102(HANDLE), id=2 ---- got file handle 35306132613132363437626639313837 (16) ---> sending a packet, length=56, type=6(WRITE), id=3 ---> sending a packet, length=38, type=10(FSETSTAT), id=4 ---> sending a packet, length=25, type=4(CLOSE), id=5 <--- Connection to riskmetrics closed by remote host. <--- got a packet, length=24, type=101(STATUS), id=3 ---- status code=0(OK), message=OK **** pty read: pseudo-tty: Input/output error ---- Disconnecting BBVA_002_1042016.cntl_2' at 19 (100%) [Delaying before reconnect: 8]

we had take an strace and this is the debug

12:54:38 read(10, 0x9978c0, 65536) = -1 EIO (Input/output error) 12:54:38 read(8, "", 65536) = 0 12:54:38 ioctl(2, TIOCGPGRP, [22330]) = 0 12:54:38 getpgrp() = 22330 12:54:38 write(2, "**\ pty read: pseudo-tty: Input"..., 46) = 46

thanks

BBVA José Luis Martínez Mártínez

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-05-11 16:51 GMT+02:00 Alexander V. Lukyanov notifications@github.com:

does set sftp:use-full-path no change anything? Please turn on debug.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218483642

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."

lavv17 commented 8 years ago

It looks like the server side crashes. Can you check the server logs?

чт, 12 мая 2016, 9:34 jlmartinezm notifications@github.com:

the same! any idea thanks for your answer

<--- cdp_bbva@riskmetrics's password: XXXX <--- got a packet, length=105, type=2(VERSION), id=0 ---- protocol version set to 4 ---> sending a packet, length=10, type=16(REALPATH), id=1 <--- got a packet, length=63, type=104(NAME), id=1 ---- home set to / ---- path on wire is /prod/incoming/TEST_BBVA_002_1042016.cntl_2' ---> sending a packet, length=61, type=3(OPEN), id=2 <--- got a packet, length=25, type=102(HANDLE), id=2 ---- got file handle 35306132613132363437626639313837 (16) ---> sending a packet, length=56, type=6(WRITE), id=3 ---> sending a packet, length=38, type=10(FSETSTAT), id=4 ---> sending a packet, length=25, type=4(CLOSE), id=5 <--- Connection to riskmetrics closed by remote host. <--- got a packet, length=24, type=101(STATUS), id=3 ---- status code=0(OK), message=OK **** pty read: pseudo-tty: Input/output error ---- Disconnecting BBVA_002_1042016.cntl_2' at 19 (100%) [Delaying before reconnect: 8]

we had take an strace and this is the debug

12:54:38 read(10, 0x9978c0, 65536) = -1 EIO (Input/output error) 12:54:38 read(8, "", 65536) = 0 12:54:38 ioctl(2, TIOCGPGRP, [22330]) = 0 12:54:38 getpgrp() = 22330 12:54:38 write(2, "**\ pty read: pseudo-tty: Input"..., 46) = 46

thanks

BBVA José Luis Martínez Mártínez

  • SPT Middleware* Te.- +34 91 807 51 80 - Ext. 72180 - josel.martinezm.contractor@bbva.com josel.martinezm.contractor@bbva.com

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-05-11 16:51 GMT+02:00 Alexander V. Lukyanov <notifications@github.com

:

does set sftp:use-full-path no change anything? Please turn on debug.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218483642

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218672074

jlmartinezm commented 8 years ago

at the server logs appear arrive the file, if we do it with root user in our system, it looks like don´t appear the error.

thanks.

BBVA José Luis Martínez Mártínez

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-05-12 17:18 GMT+02:00 Alexander V. Lukyanov notifications@github.com:

It looks like the server side crashes. Can you check the server logs?

чт, 12 мая 2016, 9:34 jlmartinezm notifications@github.com:

the same! any idea thanks for your answer

<--- cdp_bbva@riskmetrics's password: XXXX <--- got a packet, length=105, type=2(VERSION), id=0 ---- protocol version set to 4 ---> sending a packet, length=10, type=16(REALPATH), id=1 <--- got a packet, length=63, type=104(NAME), id=1 ---- home set to / ---- path on wire is /prod/incoming/TEST_BBVA_002_1042016.cntl_2' ---> sending a packet, length=61, type=3(OPEN), id=2 <--- got a packet, length=25, type=102(HANDLE), id=2 ---- got file handle 35306132613132363437626639313837 (16) ---> sending a packet, length=56, type=6(WRITE), id=3 ---> sending a packet, length=38, type=10(FSETSTAT), id=4 ---> sending a packet, length=25, type=4(CLOSE), id=5 <--- Connection to riskmetrics closed by remote host. <--- got a packet, length=24, type=101(STATUS), id=3 ---- status code=0(OK), message=OK **** pty read: pseudo-tty: Input/output error ---- Disconnecting BBVA_002_1042016.cntl_2' at 19 (100%) [Delaying before reconnect: 8]

we had take an strace and this is the debug

12:54:38 read(10, 0x9978c0, 65536) = -1 EIO (Input/output error) 12:54:38 read(8, "", 65536) = 0 12:54:38 ioctl(2, TIOCGPGRP, [22330]) = 0 12:54:38 getpgrp() = 22330 12:54:38 write(2, "**\ pty read: pseudo-tty: Input"..., 46) = 46

thanks

BBVA José Luis Martínez Mártínez

  • SPT Middleware* Te.- +34 91 807 51 80 - Ext. 72180 - josel.martinezm.contractor@bbva.com josel.martinezm.contractor@bbva.com

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-05-11 16:51 GMT+02:00 Alexander V. Lukyanov < notifications@github.com

:

does set sftp:use-full-path no change anything? Please turn on debug.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218483642

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."

— You are receiving this because you commented.

Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218672074

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/lavv17/lftp/issues/227#issuecomment-218790299

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."

pcpa commented 8 years ago

This might be relevant. An user has reported a related issue, frequently receiving a message like:

<--- got a packet, length=24, type=101(STATUS), id=3
---- status code=0(OK), message=OK
**** pty read: pseudo-tty: Input/output error
---- Disconnecting

Running ssh -vvv and saving log, I noticed this:

debug1: Remote protocol version 2.0, remote software version mod_sftp/0.9.9
debug1: no match: mod_sftp/0.9.9
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.3
[...]
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 fd 4/5 cfd -1)

debug3: channel 0: close_fds r 4 w 5 e 6 c -1
debug1: fd 2 clearing O_NONBLOCK
Killed by signal 2.

Doing a quick look in profptd mod_sftp code, it should be caused by the SFTPClientAlive COUNT INTERVAL option, that when handling a packet, will check every INTERVAL seconds if there are more than COUNT connections. That was the only condition I could follow in proftpd code where it would cause the condition described above.

From proftpd documentation:

For example, using:

  SFTPClientAlive 3 15

will cause an unresponsive client to be disconnected after approximately 45 seconds.

I am waiting feedback from the user, about checking the SFTPClientAlive configuration in the server side.

pcpa commented 8 years ago

User just said the problem was resolved (unsure if changed parameters or disabled it).

jlmartinezm commented 8 years ago

why my case was closed if wasn´t solved?

thanks.

BBVA José Luis Martínez Mártínez

Tecnica de Sistemas - Monitores DBDC - CPD Europa Batanes 3, Planta 1, 28760 Tres Cantos Antes de imprimir este mensaje, por favor comprueba que es necesario hacerlo. Before you print this message please consider if it is really necessary

2016-06-06 9:16 GMT+02:00 Alexander V. Lukyanov notifications@github.com:

Closed #227 https://github.com/lavv17/lftp/issues/227.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lavv17/lftp/issues/227#event-682475428, or mute the thread https://github.com/notifications/unsubscribe/AREa-B75qC96EgiX4fAtTwVpE84wWEpXks5qI8lNgaJpZM4IFeaa .

"Este mensaje está dirigido de manera exclusiva a su destinatario y puede contener información privada y confidencial. No lo reenvíe, copie o distribuya a terceros que no deban conocer su contenido. En caso de haberlo recibido por error, rogamos lo notifique al remitente y proceda a su borrado, así como al de cualquier documento que pudiera adjuntarse.

Por favor tenga en cuenta que los correos enviados vía Internet no permiten garantizar la confidencialidad de los mensajes ni su transmisión de forma íntegra.

Las opiniones expresadas en el presente correo pertenecen únicamente al remitente y no representan necesariamente la opinión del Grupo BBVA."

"This message is intended exclusively for the adressee and may contain privileged and confidential information. Please, do not disseminate, copy or distribute it to third parties who should not receive it. In case you have received it by mistake, please inform the sender and delete the message and attachments from your system.

Please keep in mind that e-mails sent by Internet do not allow to guarantee neither the confidentiality or the integrity of the messages sent."