FTP connection timeout

7 views
Skip to first unread message

Sumesh Mohan

unread,
Apr 12, 2010, 11:24:55 PM4/12/10
to javatechnicals
Hi,

I am trying to a remote file explorer using FTP for an internal
purpose of a project.I am using apache commons net for achieving
it.Everything working properly except connection time out.After a
certain time interval the connection terminates and getting the
following error.

org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response
421 received. Server closed connection.

I tried to set connetionTimeOut externally , but that also not
working.
Anyone gone through such a situation?? If so, please feel free to sort
out my problem

Thanks & Regards,
Sumesh Mohan

srinivas

unread,
Apr 13, 2010, 3:34:44 AM4/13/10
to javatechnicals
Are u using EJB in your project to do any transaction.

regards,
Srinivas

$u♥e$h

unread,
Apr 13, 2010, 3:40:48 AM4/13/10
to javatec...@googlegroups.com
No.

--
To unsubscribe, reply using "remove me" as the subject.



--
Sumesh Mohan

srinivas

unread,
Apr 13, 2010, 3:43:29 AM4/13/10
to javatechnicals
If you have done using EJB there is a parameter which you can give for
Transaction Timeout which overrides the timeout you give in web.xml.

Check whether the process taking more than Idle Timeout setting in
web.xml file.

srinivas

unread,
Apr 13, 2010, 3:49:40 AM4/13/10
to javatechnicals
The FTP 421 Error arises if user name password or any other details
required for making connection are incorrect.
Else Checking whether the IP Address and port are configured through
Firewall.

Best is do the operation and the moment you get Error check the Event
Error Log in your Operating System.

There you will get much more reason. I am sure some proxies might have
been disabled or some Firewall might block the connection while you
make. Since FTP requires free from all these. This is configuration
related 100% sure.

Sumesh Mohan

unread,
Apr 13, 2010, 4:38:59 AM4/13/10
to javatechnicals
Hi srinivas,

The file transactions will work properly if there is no idle time more
than 5 mins.
If there is any proxy configuration , it should not even able to
connect to the server.
Since the program connects, displays file and able upload and
download , i dont think it is something related to configuration
stuffs
I tried to the same server using filezilla . if there is idle time
more than 5 mins, it also disconnects.
i would like to know is there any way to handle the connection time
out.

Rejin Chandran

unread,
Apr 13, 2010, 1:28:28 PM4/13/10
to javatec...@googlegroups.com
Some shellscript is executing in the server to kill the windows connection. KR engineers used to do that dnt know how ? , it is just a guess, not sure ;-)

Rejin Chandran

unread,
Apr 13, 2010, 1:35:28 PM4/13/10
to javatec...@googlegroups.com
If filezilla is also not working then smething will be there, please check the below command to kill the connection established on a particular port on a specific network card.

 Kill all outgoing ftp (port 21) connection:

tcpkill -i eth0 port 21

pls check it, 
Reply all
Reply to author
Forward
0 new messages