Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

netout: write returned 0? 1

Status
Not open for further replies.

specv

Programmer
Aug 8, 2001
42
CA
When I send file with ftp, on put command, I get this message : netout: write returned 0?.

The file looks like to be send.
Anybody knows what this message means and how eliminate it?

Thanks
 
Looks like a debug message to me.

Does the file get sent correctly anyway?

You could try
Code:
ftp     2>/dev/null
to send the message into oblivion
 
Yes, the file get sent correctly. The complete code I use is :

1) ftp -n <<EOF > log.txt 2>&1
2) open ${ftpserver}
3) user ${ftpuser} ${ftppassword}
4) put ${filefrom} /dfs/projects/gdm/batch/test.txt
5) quit
6) EOF

The error is on line 4, when I hardcode the from file I don't have message.

I set the filefrom property like this :
filefrom=$(date &quot;+/dfs/projects/gdm/data/TEMPLATE_%Y%m%d.zip&quot;)
 
that's your problem:

filefrom=&quot;/dfs/projects/gdm/data/TEMPLATE_$(date &quot;+%Y%m%d).zip&quot;

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Thanks vlad but it produces the same message.
 
Perhaps you don't have permissions to write to log.txt ?
 
I have permission, the message appears in file log.txt
 
are the SOURCE machine and the DESTINATION machines of the 'similar' type?

meaning SUN->SUN, HP->HP, SUN->HP etc

Or are they like:

SUN -> Mainframe IBM?

There might be something incompatible between the ftp client (SOURCE) and the ftp server (DESTINATION) implementation.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
> Yes, the file get sent correctly.
So I'm guessing that its a debug message which indicates a transient failure in sending the data. One attempt fails to send anything, but it tries again and succeeds.

Does
Code:
ftp -n <<EOF > log.txt 2>/dev/null
lose you any logging information which you wanted?
 
Thanks Salem,

I think I don't lose any logging information I want with
ftp -n <<EOF > log.txt 2>/dev/null.

Can you explain exactly what 2>/dev/null means?

Phil
 
> what 2>/dev/null means?
Redirect standard error to the null device (/dev/null)

> log.txt is the same as 1> log.txt
which is redirect standard output to the file log.txt

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top