04-26-2002
It is possible for an application program to abort a coonection. It must set the SO_LINGER bit on and set the linger time to zero, then close(2) (as opposed to shutdown(2)) the socket. Actually, an explicit close call is not required, the automatic close that occurs when the process exits will do. And the process can exit either due to an explicit exit(2) or the default action of an uncaught signal.
Putting that all together, some programmers turn on SO_LINGER after establishing the connection. Then if the program aborts, so does the socket. This gives the remote end a clue that something went very wrong.
You can see if the ftpd on the remote system behaves this way. Establish a connection, and then have the remote sysadmin "kill -9" the appropriate instance of ftpd. If you get the "reset by peer" message, then this is a possibility. There may be a bug on the remote ftpd which is causing it to abort.
There could also be a bug in the remote kernel which is causing the abort.
Since this seems to be a WAN issue you need to examine your network topology. It is very likely that your peer in this case in not the remote system. It could be a firewall, for instance. In fact, you could have two firewalls and a proxy server daisy chained betwen you and the remote ftp server. If so, the abort could be coming from any of them.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Every night I recieve this message:
Verify Report - Broken/missing symbolic links
File With Discrepancies : 213
Total Discrepancies : 213
Can anyone explain what this is and how I can resolve it?
Thanks,
DJ At Work (4 Replies)
Discussion started by: djatwork
4 Replies
2. Shell Programming and Scripting
hi all,
i've got a script that takes in what a user enters (multiple entries) and then joins them all together and appends this to a file. what i want to happen now is the terminal should display "record saved" if the save to the file is successful, if it isn't just display the standard unix... (2 Replies)
Discussion started by: wazzag
2 Replies
3. Programming
What does the following mean:
state_field state_abvr = {
"AL","ALABAMA",
"AK","ALASKA",
.
.
.
};
extern state_field state_abvr;
issues we
I am facing following compilation issue
bosdf9d1:root make
CC -I/bto/bcs/shared/include -I/bto/sys/BCS/usr/include ... (1 Reply)
Discussion started by: jaganreddy
1 Replies
4. Shell Programming and Scripting
I used set -n FS.sh to check for syntax errors. No problems. I run the script with set -x and set -v with the following error:
find: bad option ;
find: path-list predicate-list
Reviewing the verbose output everything is read correctly. The files transfer and the script completes. I can't seem... (4 Replies)
Discussion started by: BigSky
4 Replies
5. Filesystems, Disks and Memory
I have an HP NetServer LH3 which is exhibiting an error during the boot process. I am getting the following messages, none of which I've seen before
1. WARNING: SCSI adapter: Cannot install intr vecno=12 type=4 IPL=5 Vector 12 is private
2. WARNING: "TEST_UNIT_READY" Command timed 11 seconds... (0 Replies)
Discussion started by: slant-40
0 Replies
6. Programming
Hello, the following is generating a error at the line "tmprintf(&tmBundle, _TMC("{0}"),Prompt);"... a bit lost as I am diving into this debug...
Thank you in advance...
int H_YesNo(TMCHAR *Prompt, int DefVal)
{
TMCHAR YesNo = '\0';
tmprintf(&tmBundle, _TMC("{0}"),Prompt);
while... (3 Replies)
Discussion started by: reelflytime
3 Replies
7. UNIX for Dummies Questions & Answers
Hello All,
Below is the control card or the file which i am using in shell script to mget files from remote machine via FTP.
bash-3.00$ cat ftp_ALD_DAC.log
open 10.xx.yy.zzz
user D00000187 nb8tr4xx2u
ascii
cd prod/out
lcd /Internal_Impact_TT_Input
mget ALD*.TXT
bye
Below is the... (0 Replies)
Discussion started by: Ariean
0 Replies
8. Shell Programming and Scripting
Hi gurus,
I have a question, need some of your inputs...
I have a command like this :
export LINE_COUNT=`wc -l test.dat | awk '{print $1}'`
echo $LINE_COUNT --- > gives me 2 which is fine as the file has 2 lines.
This works fine if the file test.dat is present but in case... (3 Replies)
Discussion started by: calredd
3 Replies
9. Shell Programming and Scripting
first of all.. sorry about all the question bombing.. im bored atm so im currently playing around with sh scripting hehe
s = `expr ls -s Documents | grep Music | awk '{ print $1 }' `
t = `expr $t + $s`
it give syntax error
s not found
t not found lol...
any idea why? (7 Replies)
Discussion started by: Nick1097
7 Replies
10. Shell Programming and Scripting
Hi guys...was trying to use while loop and a sentry to prompt user input again if an invalid option was entered...but somehow I got a "while" unmatched error...The code is as below:
#!/system/bin/sh
finsh=0
while
do
echo "Please select an option: "
echo "1. One" echo "2. Two" ... (4 Replies)
Discussion started by: Ryuinferno
4 Replies
NETRC(5) BSD File Formats Manual NETRC(5)
NAME
netrc -- user configuration for ftp
SYNOPSIS
~/.netrc
DESCRIPTION
This file contains configuration and autologin information for the File Transfer Protocol client ftp(1).
The .netrc file contains login and initialization information used by the auto-login process. It resides in the user's home directory. The
following tokens are recognized; they may be separated by spaces, tabs, or new-lines:
machine name
Identify a remote machine name. The auto-login process searches the .netrc file for a machine token that matches the remote
machine specified on the ftp command line or as an open command argument. Once a match is made, the subsequent .netrc tokens are
processed, stopping when the end of file is reached or another machine or a default token is encountered.
default This is the same as machine name except that default matches any name. There can be only one default token, and it must be after
all machine tokens. This is normally used as:
default login anonymous password user@site
thereby giving the user automatic anonymous ftp login to machines not specified in .netrc. This can be overridden by using the -n
flag to disable auto-login.
login name
Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the specified
name.
password string
Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server requires
a password as part of the login process. Note that if this token is present in the .netrc file for any user other than anonymous,
ftp will abort the auto-login process if the .netrc is readable by anyone besides the user.
account string
Supply an additional account password. If this token is present, the auto-login process will supply the specified string if the
remote server requires an additional account password, or the auto-login process will initiate an ACCT command if it does not.
macdef name
Define a macro. This token functions like the ftp macdef command functions. A macro is defined with the specified name; its con-
tents begin with the next .netrc line and continue until a null line (consecutive new-line characters) is encountered. If a macro
named init is defined, it is automatically executed as the last step in the auto-login process.
SEE ALSO
ftp(1), ftpd(8)
Linux NetKit (0.17) September 23, 1997 Linux NetKit (0.17)