Solved

Any Solution to FTP Client's Weird Behavior?

Posted on 1998-03-26
5
257 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 100 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Node.js 11 69
Cisco 3650 switch licensing 6 68
connect to cisco 2690 series 6 61
Change to New Domain, carry Wks configs foward? 4 61
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

740 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