Problem with FTP and network startup

I have a problem I need some help with.

I am trying to retreive a file via FTP using an install program I wrote.
This all works fine unless the user exits the program and re-starts it.

The sequence of events are.
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (success) // FTP Command - PORT
192,168,0,26,4,1
user exits install program
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (failure) // FTP Command - PORT
192,168,0,26,4,1

I ran the same sequence of events using the QNX ftp client with similar
results
start the network and socket managers
connect via ftp.
get file (success) // FTP Command - PORT 192,168,0,26,4,1
exit ftp
restart the network and socket managers
connect via ftp.
get file (failure) // FTP Command - PORT 192,168,0,26,4,1

In both scenarios the FTP server logged…
Sending file foo
Error sending file foo, aborting (reason unknown)
450 Host unreachable

Without the restart of the network, the PORT command increments the port
value (the last two parameters of the FTP PORT command) and everything works
fine.
The second transfer also works if I wait 5 minutes before retrying. In this
case the PORT number is unchanged (4,1 as above)

Is this a server side issue or is there some cleanup that needs to happen
when you restart the network and socket managers ?


Thanks for the help

John Love
Tolltex, Inc.
973.579.1776
John@Tolltex.com

What type of system are you attempting to connect to? Another QNX system or
a Windows system? If it is Windows NT/2000 it may have a timeout period
before it closes the original connection and will not allow a second
connection on that port.

“John” <john_nospam@tolltex.com> wrote in message
news:b9baus$84o$1@inn.qnx.com

I have a problem I need some help with.

I am trying to retreive a file via FTP using an install program I wrote.
This all works fine unless the user exits the program and re-starts it.

The sequence of events are.
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (success) // FTP Command -
PORT
192,168,0,26,4,1
user exits install program
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (failure) // FTP Command - PORT
192,168,0,26,4,1

I ran the same sequence of events using the QNX ftp client with similar
results
start the network and socket managers
connect via ftp.
get file (success) // FTP Command - PORT 192,168,0,26,4,1
exit ftp
restart the network and socket managers
connect via ftp.
get file (failure) // FTP Command - PORT 192,168,0,26,4,1

In both scenarios the FTP server logged…
Sending file foo
Error sending file foo, aborting (reason unknown)
450 Host unreachable

Without the restart of the network, the PORT command increments the port
value (the last two parameters of the FTP PORT command) and everything
works
fine.
The second transfer also works if I wait 5 minutes before retrying. In
this
case the PORT number is unchanged (4,1 as above)

Is this a server side issue or is there some cleanup that needs to happen
when you restart the network and socket managers ?


Thanks for the help

John Love
Tolltex, Inc.
973.579.1776
John@Tolltex.com

This was in fact the problem. The server held the connection open. I wrote
a function to do a pasv connection and that solved the problem.

Thanks

John Love

“Ivan Bannon” <ivan.bannon@rjginc.com> wrote in message
news:bab6q2$qo5$1@inn.qnx.com

What type of system are you attempting to connect to? Another QNX system
or
a Windows system? If it is Windows NT/2000 it may have a timeout period
before it closes the original connection and will not allow a second
connection on that port.

“John” <> john_nospam@tolltex.com> > wrote in message
news:b9baus$84o$> 1@inn.qnx.com> …
I have a problem I need some help with.

I am trying to retreive a file via FTP using an install program I wrote.
This all works fine unless the user exits the program and re-starts it.

The sequence of events are.
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (success) // FTP Command -
PORT
192,168,0,26,4,1
user exits install program
install program starts.
install program starts the network and socket managers
install program attempts to retreive file (failure) // FTP Command -
PORT
192,168,0,26,4,1

I ran the same sequence of events using the QNX ftp client with similar
results
start the network and socket managers
connect via ftp.
get file (success) // FTP Command - PORT 192,168,0,26,4,1
exit ftp
restart the network and socket managers
connect via ftp.
get file (failure) // FTP Command - PORT 192,168,0,26,4,1

In both scenarios the FTP server logged…
Sending file foo
Error sending file foo, aborting (reason unknown)
450 Host unreachable

Without the restart of the network, the PORT command increments the port
value (the last two parameters of the FTP PORT command) and everything
works
fine.
The second transfer also works if I wait 5 minutes before retrying. In
this
case the PORT number is unchanged (4,1 as above)

Is this a server side issue or is there some cleanup that needs to
happen
when you restart the network and socket managers ?


Thanks for the help

John Love
Tolltex, Inc.
973.579.1776
John@Tolltex.com
\