Socket 10054 error - not your normal issue - development problem - from the server but why?

Posted on 2005-04-28
Last Modified: 2011-09-20
Greetings.  Things are getting testy in my development lab, and I need some ideas as to how to defuse a situation that's developed.  Our environment is mainly Windows Sockets talking to an embedded device we currently have under development.  The device has an embedded DHCP server within it, and supports a dedicated ethernet communications network for the application.

One of our tools uses winsock to communicate with the device.  Usually, things work fine, but at times, the socket connection fails with a 10054 error - connection reset by peer.

It is my understanding that this error is initiated by the server (server in this context is the application accepting socket connections - our device).  True or False?

Now, I know y'all can't help me with the application, and I'm treating the code in the device as a black box.  I've never written an extensive server application, but what examples I've seen, I've not noticed a specific command that generates a 10054 error.  Is this down inside the stack and something that just happens?  What would I do if I were a server and wanted to generate a 10054 error?

I appreciate any feedback.  
Question by:charles_gilley
    LVL 21

    Accepted Solution

    I'll say this tongue in cheak because I'm not an expert in this area.  But, here are what I believe the answers to your questions are.

    1)  True.  The text for this error is sometimes represented as "An existing connection was forcibly closed by the remote host"
    2)  The 10054 error (WSAECONNRESET) would most likely be implemented as an HResult from a call to the Winsock subsystem.  The error is actually defined in both winerror.h and winsock2.h.  I would imagine that since you're just utilizing the winsock subsystem with your code that the more likely scenario would be the error is returned to your code and you do what you need to with it.  I guess you could return this error yourself, but its probably something better left to winsock.

    Author Comment

    Hello - learned one - I was hoping for more feedback, but it appears none is forthcoming.

    FWIW, this error *appears* to occur from within the stack on either end of the connection.
    I draw this somewhat dubious conclusion based on continued testing of our application under
    various conditions - cable connected, disconnected, etc.  From the server side, things have changed,
    and we're not sure what, moderating the error occurrence significantly.  Very flakey update I know.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
    FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now