You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Bogdan Drozdowski (JIRA)" <ji...@apache.org> on 2012/07/01 15:49:56 UTC
[jira] [Commented] (NET-470) DataConnection-Socket hangs on
InputStream.read()
[ https://issues.apache.org/jira/browse/NET-470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13404727#comment-13404727 ]
Bogdan Drozdowski commented on NET-470:
---------------------------------------
Does it work with plaintext (no SSL) connections? Perhaps you have the same problem as in NET-408, but your server doesn't break the connection with an error?
> DataConnection-Socket hangs on InputStream.read()
> -------------------------------------------------
>
> Key: NET-470
> URL: https://issues.apache.org/jira/browse/NET-470
> Project: Commons Net
> Issue Type: Bug
> Components: FTP
> Affects Versions: 3.0, 3.0.1, 3.1
> Environment: Windows 7 (x86), Netbeans 7, JDK 1.6 and JDK 1.7
> Reporter: Alexander Schuetz
> Attachments: examplePatch.diff
>
>
> I'm using ftps (SSL/implicit) and passive mode. connect(), login() and cwd() commands work well.
> But if I have to open a data connection (for example for LIST) the socket is opened successfully using one of the desired "dataports". The underlying InputStream is created as well without any Exception.
> But then every attempt to read from the InputStream will eventually time out or hang forever (depending on the DataTimeout-value).
> If I use the FileZilla client, everything works successfully and fast. FileZilla issues the following commands:
> {color:blue}
> {{C: SYST}}
> {{A: 215 UNIX Type: L8}}
> {{C: FEAT}}
> {{A: 211-Extensions supported}}
> {{A: SIZE}}
> {{A: REST}}
> {{A: MDTM}}
> {{A: MFMT YYYYMMDDHHMMSS filename}}
> {{A: MDTM YYYYMMDDHHMMSS filename}}
> {{A: MDTM YYYYMMDDHHMMSS[+-TZ] filename}}
> {{A: XCRC filename}}
> {{A: XMD5 filename}}
> {{A: AUTH TLS}}
> {{A: AUTH SSL}}
> {{A: MODE Z}}
> {{A: PBSZ}}
> {{A: PROT}}
> {{A: 211 End of FEAT}}
> {{C: USER ********}}
> {{A: 331 Password required for ********}}
> {{C: PASS ********}}
> {{A: 230 User ******** logged in}}
> {{C: PBSZ 0}}
> {{A: 200 PBSZ 0 successful}}
> {{C: PROT P}}
> {{A: 200 Data connection set to: Private}}
> {{C: TYPE I}}
> {{A: 200 TYPE set to BINARY}}
> {{C: PASV}}
> {{A: 227 Entering passive mode (217,70,161,93,39,15)}}
> {{C: LIST}}
> {{A: 150 Opening ASCII mode data connection}}
> {{A: 226 Directory send OK}}
> {color}
> Issueing the commands "PBSZ 0" and "PROT P" before and calling enterLocalPassiveMode() and setFileType(FTP.BINARY_FILE_TYPE) will produce the same commandsequence (without SYST and FEAT), but with the error described above.
>
> On top of that: disconnect() will block forever, originating from socket.close() which is blocking. The only way to avoid this is calling logout() (even if login() wasn't issued). Then disconnect will return as expected.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira