?
Solved

Any Solution to FTP Client's Weird Behavior?

Posted on 1998-03-26
5
Medium Priority
?
259 Views
Last Modified: 2013-12-23
I have a question regarding FTP Timeout.

During FTP session, if some problems has happened within the IP network,
and if such problems has lasted for a certain duration of time,
FTP server (ftpd) close the session, however it SEEMS that FTP client
 (ftp) has no way to detect that the session is out of service UNTIL
FTP client tries another command after the network has been recovered.
As far as we have examined, before the network is recovered,
FTP client even needs to be killed by hand.

From the point of TCP/IP protocol, both TCP server and client is able
 to detect how long any packets has not been transmitted during its
TCP session and then to close the session if no transmission is
done for a duration of time, which was specified by Time-out parameter.
It seems extremely weird that FTP client has no way to close the
session at its own convenience.

I would like to know the way to make FTP client CLOSE the session
 or to make FTP find the fact that the concerned file transmission
 has failed.  Anybody can help me out?  Await for your response!
0
Comment
Question by:guo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 

Expert Comment

by:atheneyc
ID: 1583203

Try the passive mode of FTP.
Since the data session (port 20) of ftp is initiated from the server, so the client needs to time-out rather than giving up when the server disappeared on the network.
The passive mode (hopefully supported by yours) gets around this because the data session is also initiated from the client. This mode is also used when setting up packet filtering in firewall.
0
 

Expert Comment

by:vkg063097
ID: 1583204

Use hash command in ftp. This will print # for each 4096 byte
it receive from the server or viceversa.
0
 
LVL 1

Accepted Solution

by:
mrausch earned 300 total points
ID: 1583205
If you have the means to recompile your FTP client, try setting
the socket option SO_KEEPALIVE on the FTP control connections;
see the manual page to the syscall setsockopt() on your unix
system for more information. The client sets some socket options
on his connections anyway, so with a little knowledge of C it should be no problem to do this.
This will send keep-alive packets on the TCP connection (a bit like ICMP pings), and the OS on the client side will care about
the remote not answering anymore, and thus shutting down the connection.

0
 

Author Comment

by:guo
ID: 1583206
Thanks for your answer.
We are planning to use Solaris 2.6. Would you please tell me whether Soloris supports passive ftp, how to confirm and how to use it?

0
 

Expert Comment

by:atheneyc
ID: 1583207
Unfortunately, the ftp on my Solaris 2.6 does not support passive mode. To check yours, simply type ftp. Then in the ">" prompt, type "?" to see if there is any "passive" command show up.

Normally, I don't find any ftp bundled with the original OS (e.g. AIX 3.2.5, SCO, Solaris 2.5.1/2.6, IRIS, Windows 95, etc.) supporting passive mode ftp EXCEPT Linux!!

Therefore, you may download one and comply by yourself. Try the following URL:

http://hobbes.cdrom.com/pub/linux/tsx-11/packages/net/telnet+ftp/

and choose the wu-ftp-2.4-fixed.tar.gz

You may search other site for the wu-ftp and you may probably find a pre-complied Solaris 2.6 package. However, I prefer to comply by myself.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Short answer to this question: there is no effective WiFi manager in iOS devices as seen in Windows WiFi or Macbook OSx WiFi management, but this article will try and provide some amicable solutions to better suite your needs.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question