FTP Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationFTP Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 5th, 2011, 04:12 AM
BhavyaMadiri BhavyaMadiri is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2011
Posts: 1 BhavyaMadiri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 27 m 21 sec
Reputation Power: 0
ftp connection hanging on linux side

Our application LSIE AI is hosted on RHEL 5.5 AP machine. The application has to FTP some files from a Windows (Server 2003) machine. Our application initiates an active FTP connection to the Windows machine. We are using active mode of ftp. The FTP connection hangs on the Linux side after few minutes and on Windows machine we get the FTP reason codes 425 and 426.

On troubleshooting, we found that FTP transfer fails when Linux tries to reuse a socket. After closing a TCP connection, the Windows server keeps the socket pair (source-ip, dest-ip, source-port, dest-port, protocol) in a TCP TIME_WAIT state for 240 seconds (4 minutes). During this time, if an attempt is made to reuse the socket pair, the connection is declined. So, whenever an FTP client tries to pull multiple files, the first time it tries to reuse a port number within 4 minutes of its earlier usage, the server will fail to make the data connection.
FTP works on our HP-UX machine because HP-UX uses a separate socket for each data connection.

We found that the TCP parameter /proc/sys/net/ipv4/tcp_tw_reuse on the linux box is set to 1. Our understanding is that this parameter will cause Linux to reuse the sockets.
We changed this parameter to 0 without server restart. But this did not fix the FTP problem and Linux is still reusing sockets.

We also tried /proc/sys/net/ipv4/tcp_tw_recycle and tcp_fin_timeout . tcp_fin_timeout property for linux box is 30 sec and Windows is also 30 sec. When we executed the netstat command to monitor the socket status on Linux, it is showing as LISTEN and not TIME-WAIT.

Is it possible to change the /proc/sys/net/ipv4/tcp_tw_reuse file to prevent port reuse completely? Please let me know if there are any other parameters that need to be changed to prevent Linux from reusing sockets during FTP transfer.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationFTP Help > FTP issue

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap