[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ftp_append suddenly not working in put_block



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


Hi,

> Suddenly, after a year of sending files to one of our vendors several times
> every day, it has started hanging.
>
> The procedure I'm calling is ftp_append, and the error is occurring with
> the call to 'accept' in procedure 'put_block'.

Sounds like a firewall issue.  Have you tried changing to passive mode?

The way FTP works...  there is one "control" connection where the commands
are transferred, and another connection is made each time data is
transferred.  I.e., file uploads, downloads, appends, directory listings,
etc go on the "data" connection.

When using standard (not passive) FTP, the client initiates a connection
to the server on port 21 for the "control" connection.  The server
connects back to the client on random ports for the "data" connections.

In passive FTP, the control connection is done the same way.  But, the
data connections go the opposite direction -- the client connects to the
server's random port for each data connection.

The accept() API is used to receive a new connection from the server in
standard mode.  If the server's ability to connect is blocked by a
firewall, it would just hang on that accept() API indefinitely.

Frequently, people will block all incoming connections in their firewall,
and this prevents the server's connection request from getting there.
Passive mode often fixes this problem because it's common for client
machines to be allowed to make any outgoing connections they want to, and
only limit incoming connections -- so, if that's the case in your shop, a
passive connection may do the trick.

If not, you'll have to talk to your network admin about allowing FTP to
work properly from your machine. Hopefully he understands how to
configure the firewall properly for that to happen.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------