Unable to read data from the transport Connection: Connection reset by peer

Asked

Viewed 563 times

0

Follows the code: here.

Customer code is receiving an exception:

Unable to read data from the transport Connection: Connection reset by peer.

Why this error? And how can I correct ?

1 answer

1

Here is an attempt to translate some parts of the David who seem to me more interesting to your case...

This error usually means the server is running, but the service you are trying to connect is not available. (It may be stopped, stopped, or busy with another request)

...It is possible that this is being caused by a locked port in the firewall...

The rest of his answer seems to be more focused on the specific question they asked here (in English).

I hope it helps.

  • @Matheusmiranda, I may be mistaken, but if I’m not mistaken, when you use TCP connection directly, you need to treat some things that you wouldn’t need if you were using a protocol like HTTP/FTP or a ready-made library like Signalr, for example. In the case of FTP, I know that the client connects to the server by port 21 and the server returns to the client a new port so that it connects to carry out the transfer of the files, thus freeing the port 21 so that another client can connect. (continues)

  • Basically, what I mean is that on the first click you are connecting to your server by port 11000 and staying connected until you finish the request, when the second click of the button comes, It tries to connect to port 11000 but it is occupied by the first request and then you get the error message. To fix this you’d have to treat it. The most common way is to use the 11000 port only as an input port, where the first communication is to give the customer a new port so that it connects indefinitely, releasing the 11000 port right away.

  • Take a look at this image http://www.tcpipguide.com/free/diagrams/ftppassive.png, it shows how the FTP protocol works

Browser other questions tagged

You are not signed in. Login or sign up in order to post.