- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Errors : SIGPIPE , Connection Reset by Peer
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 12:08 AM
05-03-2006 12:08 AM
Errors : SIGPIPE , Connection Reset by Peer
I have received a "Connection reset by peer" error while reading from a socket and "SIGPIPE" while writing to a socket. I have given shutdown(sockfd,SHUT_RDWR) in my prototype to simulate the error.
In my realtime application i have ignored the SIGHUP signal. Even then I receive the "Connection reset by peer" and "SIGPIPE" errors. Can anyone help me to figure out how the socket is disabled for read and write?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 03:45 AM
05-03-2006 03:45 AM
Re: Errors : SIGPIPE , Connection Reset by Peer
Socket information can be found in /etc/services
what socket are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2006 08:38 PM
05-03-2006 08:38 PM
Re: Errors : SIGPIPE , Connection Reset by Peer
Usually it happens when the peer had reset the connection.
You can reproduce it with an application which set the abortive linger option - look at setsockopt(2)-(linger.l_onoff=1 linger.l_linger=0)
When you then close that socket a reset is send in place of a FIN.
Else you can try tcp_discon_by_addr.
This may happen if the connectivity is lost too.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2006 08:21 PM
05-04-2006 08:21 PM
Re: Errors : SIGPIPE , Connection Reset by Peer
Socket used is : TCP/IP.
In realtime application, "shutdown()" is not called in any case. Is there any ways the OS-Kernel decides to shutdown the socket for read/write automatically in raise of any other events? If OS makes it, then is it logged anywhere?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2006 09:59 PM
05-04-2006 09:59 PM
Re: Errors : SIGPIPE , Connection Reset by Peer
1) the peer system is using the linger option which makes that close cause a reset
2) a ndd tcp_discon or tcp_discon_byaddr
3) the connectivity with the peer system had been lost, and there are still messages unacked after a timeout. then the connection get reset and cause that sequence.
for instance:
write(mysocket,..)
we loose connectivity
after some retransmitions, the connection is reset causing the connection to be reset.
Then the read return an error with connection reset by peer error, and then any write cause a SIGPIPE except if it is ignored, then write() return an error with EPIPE.
Else I don't see.