SUMMARY: odd error message from ftp. ideas?

From: Christopher L. Barnard (cbar44@tsg.cbot.com)
Date: Thu May 01 1997 - 15:34:57 CDT


I asked:

> Does anyone know what "netout: bad file number" from an ftp session
> might mean? A SunSolve search on this string did not turn up anything
> useful, so I'm hopeful that someone out there in the Reald World(tm) has
> seen this one...
>
> We have a script that runs on a Solaris 2.3 machine to ftp some files
> to a central storage machine. It is executed overnight by users who are
> not very unix-knowledgeable, so I can't get very much debugging information
> out of them. The portion of the script that is failing is this:
>
> -----8<-----
> echo -n "Enter user name: "
> read user_name
> echo -n "Enter password for $user_name: "
> read pass_word
> clear
>
> echo "Uploading statement files..."
> ftp -n << -NOMORE
>
> open clearing
> user $user_name $pass_word
> put [local file] '[remote location]'
> put [local file] '[remote location]'
> put [local file] '[remote location]'
> close
> -NOMORE
> -----8<-----
>
> and the error message that they are getting is this:
>
> -----8<-----
> netout: bad file number
> not connected
> not connected
> not connected
> -----8<-----
>
> obviously the "not connected" are from the three 'put' commands, and the
> "bad file number" must be coming from the 'open' or 'user' commands. When
> I try to do these commands by hand, everything works fine. SunSolve
> identifies "bad file number" as indicating an internal coding error and
> that Sun Software would never ever display such a message. yeah, uh huh.
> right.

The answer:

Well, I didn't actually get an answer but I got an excellent suggestion
that pointed me in the right direction. By adding the "-d" and "-v" flags
to the ftp call, I get a verbose debugging output of the session, which
showed me that the "bad file number" was an error message coming from the
remote host when the transfer begins of the first file. Now I just have
to hunt down the sysadmin of the remote machine and find out why his machine
won't accept this file.

Thanks to James.E.Coby.Jr@cdc.com (James Coby).

+-----------------------------------------------------------------------+
| Christopher L. Barnard O When I was a boy I was told that |
| cbarnard@tsg.cbot.com / \ anybody could become president. |
| (312) 347-4901 O---O Now I'm beginning to believe it. |
| http://www.cs.uchicago.edu/~cbarnard --Clarence Darrow |
+----------PGP public key available via finger or PGP keyserver---------+



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:52 CDT