Network error WINSOCK 10054: "Connection reset by peer"
Error
Network error 10054: "Connection reset by peer"
Error description
The error occurs when the server (or some intermediate action between the client and server) forcibly breaks the connection due to some reason. Sometimes the reason is written in the client's log, and sometimes not (due to security measures).
Main issue reasons:
- IP, MAC address or HardwareID of the client computer is in the block list. MyChat Server will block any client's connection attempts without explaining anything;
- if the connection quality between a client and server is very low and the server does not receive response from the client which leads to disconnection. For example, the connection channel "flooded" by torrents that require high speed. Or the connection channel quality is bad and interrupted frequently. This issue is typical for mobile networks that work in conditions with weak internet connections or high load on a channel, for example, via free Wi-Fi in internet cafes.
- NAT/Firewall considered connection as "dead" and disrupted it;
- protocol is violated; someone interrupted the process of data transfer and the program sent unexpected data that does not correspond to the actual protocol;
- network connection suddenly lost, for example, router/switch was restarted or a laptop is in a fly mode;
- a laptop automatically switched between networks; for example, between Wi-Fi and mobile hotspot when connection was lost;
- there is protection on the server against frequent client connections (anti-ddos), and client application temporarily disconnects due to high load;
- the server forbids multilogins (it's when you can connect with several devices under the same account at the same time);
- you use incorrect security password for connecting to the server (or the administrator turned it on when you were offline);
- there are no available license connections left on the server.
Notice, that sometimes such a message in the protocol is completely fine in normal conditions. For example, the server was restarted, and the client application was shut down by the admin or script. Or the server forcibly disconnected the client due to delayed response or no response at all during a long period of time (keep-alive ping). It's OK if it is not a regular thing.
Problem solution
If the reason is network, then it is better to analize it with the help of console command ping <server_address> -t -l 1024. If connection is stable with no package loss, then check if your IP is blocked on the server in the filter for IP addresses, HardwareID, and MAC addresses.
Also, you should enable encryption to avoid interference from antiviruses and firewalls in the process of data transfer between a client and server (MyChat Client, "Chat settings", "Network", "Network settings", Use traffic encryption").
As a rule, to find a reason for the broken connection between the server and client you need to enter MyChat Admin Panel and check the system log.
How to open MyChat administration console?
Section "Tools", "Protocols". Protocol type: "System protocols".
A system protocol can help you to find the reason of the client application disconnection (by IP address or UIN if a user managed to authorize).
Use the search through the text (Ctrl+F).