05-25-2010
The problem is external to your code.
Assuming a SOCKSTREAM:
It means the connection was forcibly closed by a peer. It a loss of the connection to the remote socket due to a timeout or a restart, the remote process died, a network component died, etc. In TCP terms, the remote host or maybe an intervening component sent an RST packet.
In anthroplogical terms it means the remote host "wants" you to try to connect and then send the packet again. If it was hardware or a process crash you probably won't reconnect but you should try. listen() with a time out, or try a connect() - which ever is appropriate.
Last edited by jim mcnamara; 05-25-2010 at 02:38 PM..
Reason: spelling
10 More Discussions You Might Find Interesting
1. IP Networking
:confused: HI,
We have 2 servers ( win 2003 + sun 5.8 ) and we run a rsh from the NT to the UNIX.
The program runs a shell script on the UNIX and waits for the answer in the EOF.
How ever, after period of appx 2 min there is a reply "Recv failed:Connection reset by peer".
while the... (5 Replies)
Discussion started by: eyalush
5 Replies
2. HP-UX
Hi All... I'm newbie here...,
i have problem when installing oracle9206, i use HPUX 11.11,
i'm using Xmanager enterprise 2.1 for forwarding from server A to my laptop
# export DISPLAY=192.168.1.239:0.0
# echo $DISPLAY
output ==> 192.168.1.239:0.0
at the oracle directory, i execute ... (3 Replies)
Discussion started by: grimanda
3 Replies
3. Shell Programming and Scripting
I use ssh to work on the server (OS X 10.4.x) remotely from home (Debian / OS X 10.5.3). If I leave my machine idle, I get disconnected after a couple of minutes. I get the following error message:
Read from remote host "server name": Connection reset by peer
Connection to "server name" closed.... (2 Replies)
Discussion started by: osxhawk
2 Replies
4. Shell Programming and Scripting
hi
i am connecting to a remote server using sftp protocol.
i am using the command like "sftp USER01@122.10.12.45"
then i got the error "Couldn't read packet: Connection reset by peer"
please help its very urgent (5 Replies)
Discussion started by: Satyak
5 Replies
5. IP Networking
hi all.
am running postgresql in a vm on debian server.
i have some client programs connecting to the db.
when i check the logs of postgresql i see "connection reset by peer"
can someone help me with this issue...
thanks. (1 Reply)
Discussion started by: coolatt
1 Replies
6. UNIX for Advanced & Expert Users
Hello
I'm facing the above problem while doing a performance run. I've a script which I'm launching from my windows desktop using mozilla. The script will invoke backend action on a Solaris host which in turn feeds the records to a driver located on a linux box(Cent OS).
What's happening is... (1 Reply)
Discussion started by: subramanyab
1 Replies
7. UNIX for Advanced & Expert Users
Hello,
I have recently updated my AIX machine from version 6.1.7.5 to 6.1.9.1 and i noticed that the errpt of the server is full of ssh messages like the one below:
sshdprocess_id>]: fatal: Read from socket failed: Connection reset by peer
Does anyone knows if this a known bug of the ssh... (15 Replies)
Discussion started by: omonoiatis9
15 Replies
8. UNIX for Dummies Questions & Answers
Hello to all,
i have a problem when trying to estabilish a sftp connection.
i setup a sftp server (i used feeFTPd) and i'm now trying to connect from two different machines.
from the first one everything is fine:
$ sftp -vvv user@xxx.xxx.xxx.xxx
Connecting to xxx.xxx.xxx.xxx...... (9 Replies)
Discussion started by: dc26
9 Replies
9. Red Hat
Hi Guys,
I can't SSH to a remote system - connection reset by peer..any ideas ?
-The Source is Linux, the Remote is Windows
-The remote has OpenSSH running on Port 22 - Telnet confirms port is open
-User1 has a RSA2 Key (2048) key, which is capture in the 1010101-pub.key specified by the... (1 Reply)
Discussion started by: stevie_velvet
1 Replies
10. Shell Programming and Scripting
Hi All, I am having an issue with my script which I am using to get files from a remote server.
In my script I am going to server:- REMOTESERVER and directory:- /Interface/Upload, and then getting files from there to my local server directory:- /ftp/jail_nextview_LMS/home/nextview_LMS/outbox.
... (1 Reply)
Discussion started by: Hero6438
1 Replies
TCP(4P) TCP(4P)
NAME
tcp - Internet Transmission Control Protocol
SYNOPSIS
#include <sys/socket.h>
#include <netinet/in.h>
s = socket(AF_INET, SOCK_STREAM, 0);
DESCRIPTION
The TCP protocol provides reliable, flow-controlled, two-way transmission of data. It is a byte-stream protocol used to support the
SOCK_STREAM abstraction. TCP uses the standard Internet address format and, in addition, provides a per-host collection of "port
addresses". Thus, each address is composed of an Internet address specifying the host and network, with a specific TCP port on the host
identifying the peer entity.
Sockets utilizing the tcp protocol are either "active" or "passive". Active sockets initiate connections to passive sockets. By default
TCP sockets are created active; to create a passive socket the listen(2) system call must be used after binding the socket with the bind(2)
system call. Only passive sockets may use the accept(2) call to accept incoming connections. Only active sockets may use the connect(2)
call to initiate connections.
Passive sockets may "underspecify" their location to match incoming connection requests from multiple networks. This technique, termed
"wildcard addressing", allows a single server to provide service to clients on multiple networks. To create a socket which listens on all
networks, the Internet address INADDR_ANY must be bound. The TCP port may still be specified at this time; if the port is not specified
the system will assign one. Once a connection has been established the socket's address is fixed by the peer entity's location. The
address assigned the socket is the address associated with the network interface through which packets are being transmitted and received.
Normally this address corresponds to the peer entity's network.
TCP supports one socket option which is set with setsockopt(2) and tested with getsockopt(2). Under most circumstances, TCP sends data
when it is presented; when outstanding data has not yet been acknowledged, it gathers small amounts of output to be sent in a single packet
once an acknowledgement is received. For a small number of clients, such as window systems that send a stream of mouse events which
receive no replies, this packetization may cause significant delays. Therefore, TCP provides a boolean option, TCP_NODELAY (from
<netinet/tcp.h>, to defeat this algorithm. The option level for the setsockopt call is the protocol number for TCP, available from getpro-
tobyname(3N).
Options at the IP transport level may be used with TCP; see ip(4P). Incoming connection requests that are source-routed are noted, and the
reverse source route is used in responding.
DIAGNOSTICS
A socket operation may fail with one of the following errors returned:
[EISCONN] when trying to establish a connection on a socket which already has one;
[ENOBUFS] when the system runs out of memory for an internal data structure;
[ETIMEDOUT] when a connection was dropped due to excessive retransmissions;
[ECONNRESET] when the remote peer forces the connection to be closed;
[ECONNREFUSED] when the remote peer actively refuses connection establishment (usually because no process is listening to the port);
[EADDRINUSE] when an attempt is made to create a socket with a port which has already been allocated;
[EADDRNOTAVAIL] when an attempt is made to create a socket with a network address for which no network interface exists.
SEE ALSO
getsockopt(2), socket(2), intro(4N), inet(4F), ip(4P)
4.2 Berkeley Distribution May 16, 1986 TCP(4P)