[
https://jira.jboss.org/browse/JBESB-3177?page=com.atlassian.jira.plugin.s...
]
David Ward closed JBESB-3177.
-----------------------------
Resolution: Done
This was fixed as part of JBESB-2905.
There are now 4 ftp timeout properties that are respected. All are documented in the
default jbossesb-properties.xml, as well as in javadoc (FtpUtils.java).
1. org.jboss.soa.esb.ftp.timeout
Coarse-grained ftp timeout property in milliseconds (0 = infinite).
The fine-grained properties below will default to this value if they are not set.
2. org.jboss.soa.esb.ftp.timeout.default
Fine-grained ftp timeout property in milliseconds (0 = infinite) used for
org.apache.commons.net.SocketClient.setDefaultTimeout(int):void,
which sets the default timeout to use when opening a socket. It is used only previous to
a
call to connect() and should not be confused with timeout.so which operates on the
currently opened socket.
3. org.jboss.soa.esb.ftp.timeout.data
Fine-grained ftp timeout property in milliseconds (0 = infinite) used for
org.apache.commons.net.ftp.FTPClient.setDataTimeout(int):void,
which sets the timeout to use when reading from the data connection.
4. org.jboss.soa.esb.ftp.timeout.so
Fine-grained ftp timeout property in milliseconds (0 = infinite) used for
java.net.Socket.setSoTimeout(int):void,
which sets the timeout of a currently open connection.
Committed on trunk, revision 33380.
In FtpImpl.java also setSoTimeout(_timeout); in initialize(boolean
bConnect)
----------------------------------------------------------------------------
Key: JBESB-3177
URL:
https://jira.jboss.org/browse/JBESB-3177
Project: JBoss ESB
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Transports
Affects Versions: 4.7
Reporter: jarkko Lietolahti
Assignee: David Ward
Fix For: 4.9
Currently FtpImpl.java (and the others) only set DataTimeout on m_oConn. We're seeing
firewall issues where this is not enough and we need SoTimeout for the socket in order to
avoid infinite waiting during __getReply();
So also call m_oConn.setSoTimeout(_timeout);
Aka;
{code}
if (_timeout > 0)
{
m_oConn.setDataTimeout(_timeout);
// added by jarkko lietolahti, 9.2.2010 to address hanging replies from server
m_oConn.setSoTimeout(_timeout);
}
{code}
The hanging occurs in org.apache.commons.net.ftp.FTP.__getReply() in line String line =
_controlInput_.readLine();
The readLine() will hang forever if the server/firewall is blocking/etc fails to send
reply through the control channel.
There's also FTP.setDefaultTimeout
(
http://commons.apache.org/net/api/org/apache/commons/net/SocketClient.htm...)
maybe we should set it also? Or maybe we need three different configuration parameters.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira