Visit Our UNIX and Linux User Community

Top Forums UNIX for Dummies Questions & Answers fatal: Read from socket failed: Connection reset by peer Post 302424514 by jim mcnamara on Tuesday 25th of May 2010 12:30:47 PM
Old 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 03:38 PM.. Reason: spelling
 
Test Your Knowledge in Computers #999
Difficulty: Easy
The trusted computing base (TCB) of a computer system is the set of all hardware, firmware, and/or software components that are critical to its security.
True or False?

10 More Discussions You Might Find Interesting

1. IP Networking

connection reset by peer

: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

XIO: fatal IO error 232 (Connection reset by peer) on X server "192.168.1.239:0.0"

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

ssh - connection reset by peer

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

Connection reset by peer

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

connection reset by peer on freebsd

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

Connection reset by peer..closing connection

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

Fatal: Read from socket failed: Connection reset by peer [preauth]

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

Sftp - Couldn't read packet: Connection reset by peer

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

Can't SSH - Connection reset by Peer

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

Couldn't read packet: Connection reset by peer send: spawn id exp4 not open while executing

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
dat_ep_dup_connect(3DAT)			     Direct Access Transport Library Functions				  dat_ep_dup_connect(3DAT)

NAME
dat_ep_dup_connect - establish a connection between the local Endpoint and a remote Endpoint SYNOPSIS
cc [ flag... ] file... -ldat [ library... ] #include <dat/udat.h> DAT_RETURN dat_ep_dup_connect ( IN DAT_EP_HANDLE ep_handle, IN DAT_EP_HANDLE dup_ep_handle, IN DAT_TIMEOUT timeout, IN DAT_COUNT private_data_size, IN const DAT_PVOID private_data, IN DAT_QOS qos ) PARAMETERS
ep_handle Handle for an instance of an Endpoint. dup_ep_handle Connected local Endpoint that specifies a requested connection remote end. timeout: Duration of time, in microseconds, that Consumers wait for Connection establishment. The value of DAT_TIMEOUT_INFINITE represents no timeout, indefinite wait. Values must be positive. private_data_size Size of private_data. Must be nonnegative. private_data Pointer to the private data that should be provided to the remote Consumer as part of the Connection Request. If pri- vate_data_size is zero, then private_data can be NULL. qos Requested Quality of Service of the connection. DESCRIPTION
The dat_ep_dup_connect() function requests that a connection be established between the local Endpoint and a remote Endpoint. This opera- tion is used by the active/client side Consumer of the connection model. The remote Endpoint is identified by the dup_ep_handle. The remote end of the requested connection shall be the same as the remote end of the dup_ep_handle. This is equivalent to requesting a connection to the same remote IA, Connection Qualifier, and connect_flags as used for establishing the connection on duplicated Endpoints and following the same redirections. Upon establishing the requested connection as part of the successful completion of this operation, the local Endpoint is bound to a Port Qualifier of the local IA. The Port Qualifier is passed to the remote side of the requested connection and is available to the remote Con- sumer in the Connection Request of the DAT_CONNECTION_REQUEST_EVENT. The Consumer-provided private_data is passed to the remote side and is provided to the remote Consumer in the Connection Request. Consumers can encapsulate any local Endpoint attributes that remote Consumers need to know as part of an upper-level protocol. Providers can also provide a Provider on the remote side any local Endpoint attributes and Transport-specific information needed for Connection establishment by the Transport. Upon successful completion of this operation, the local Endpoint is transferred into DAT_EP_STATE_ACTIVE_CONNECTION_PENDING. Consumers can request a specific value of qos. The Provider specifies which Quality of Service it supports in documentation and in the Provider attributes. If the local Provider or Transport does not support the requested qos, the operation fails and DAT_MODEL_NOT_SUPPORTED is returned synchronously. If the remote Provider does not support the requested qos, the local Endpoint is automatically transitioned into a DAT_EP_STATE_UNDISCONNECTED state, the connection is not established, and the event returned on the connect_evd_handle is DAT_CONNEC- TION_EVENT_NON_PEER_REJECTED. The same DAT_CONNECTION_EVENT_NON_PEER_REJECTED event is returned if connection cannot be established for all reasons for not establishing the connection, except timeout, remote host not reachable, and remote peer reject. For example, remote host is not reachable, remote Consumer is not listening on the requested Connection Qualifier, Backlog of the requested Service Point is full, and Transport errors. In this case, the local Endpoint is automatically transitioned into a DAT_EP_STATE_UNDISCONNECTED state. The acceptance of the requested connection by the remote Consumer is reported to the local Consumer through a DAT_CONNECTION_EVENT_ESTAB- LISHED event on the connect_evd_handle of the local Endpoint. The rejection of the connection by the remote Consumer is reported to the local Consumer through a DAT_CONNECTION_EVENT_PEER_REJECTED event on the connect_evd_handle of the local Endpoint and the local Endpoint is automatically transitioned into a DAT_EP_STATE_UNDISCONNECTED state. When the Provider cannot reach the remote host or the remote host does not respond within the Consumer-requested timeout, a DAT_CONNEC- TION_EVENT_UNREACHABLE is generated on the connect_evd_handle of the Endpoint. The Endpoint transitions into a DAT_EP_STATE_DISCONNECTED state. The local Endpoint is automatically transitioned into a DAT_EP_STATE_CONNECTED state when a Connection Request is accepted by the remote Consumer and the Provider completes the Transport-specific Connection establishment. The local Consumer is notified of the established con- nection through a DAT_CONNECTION_EVENT_ESTABLISHED event on the connect_evd_handle of the local Endpoint. When the timeout expired prior to completion of the Connection establishment, the local Endpoint is automatically transitioned into a DAT_EP_STATE_UNDISCONNECTED state and the local Consumer through a DAT_CONNECTION_EVENT_TIMED_OUT event on the connect_evd_handle of the local Endpoint. RETURN VALUES
DAT_SUCCESS The operation was successful. DAT_INSUFFICIENT_RESOURCES The operation failed due to resource limitations. DAT_INVALID_PARAMETER Invalid parameter. DAT_INVALID_HANDLE The ep_handle or dup_ep_handle parameter is invalid. DAT_INVALID_STATE A parameter is in an invalid state. DAT_MODEL_NOT_SUPPORTED The requested Model is not supported by the Provider. For example, requested qos was not supported by the local Provider. USAGE
It is up to the Consumer to negotiate outstanding RDMA Read incoming and outgoing with a remote peer. The outstanding RDMA Read outgoing attribute should be smaller than the remote Endpoint outstanding RDMA Read incoming attribute. If this is not the case, connection estab- lishment might fail. DAT API does not define a protocol on how remote peers exchange Endpoint attributes. The exchange of outstanding RDMA Read incoming and outgoing attributes of EPs is left to the Consumer ULP. The Consumer can use Private Data for it. If the Consumer does not care about posting RDMA Read operations or remote RDMA Read operations on the connection, it can set the two out- standing RDMA Read attribute values to 0. If the Consumer does not set the two outstanding RDMA Read attributes of the Endpoint, the Provider is free to pick up any values as a default. The Provider is allowed to change these default values during connection setup. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Standard: uDAPL, 1.1, 1.2 | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
libdat(3LIB), attributes(5) SunOS 5.11 16 Jul 2004 dat_ep_dup_connect(3DAT)

Featured Tech Videos

All times are GMT -4. The time now is 08:09 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy