mojira.dev
MC-172541

Lag causes client to join server twice. Kicked due to logging in from another location

What Happens: While the player is already connected to a server, something happens that causes their game to connect to the server while they are still connected. This causes a "handleDisconnection() called twice" error and the player is then timed out. The player is unable to rejoin the server due to "You logged in from another location". A server restart fixes the issue.

Server Log:
[01:17:22] User Authenticator #6/INFO: UUID of player NicoleX is XXXX
[01:17:22] [Server thread/INFO]: NicoleX/xx.xx.xx.xx:50770 logged in with entity id 159 [...]

  1. Several minutes pass with no problems

[...]
[01:21:53] User Authenticator #7/INFO: UUID of player NicoleX is XXXX

_# After lag spike, Client attempts to re-establish the connection (The ip address stays the same)_

[01:21:53] [Server thread/INFO]: NicoleX lost connection: You logged in from another location
[01:21:53] [Server thread/INFO]: NicoleX left the game
[01:21:53] [Server thread/INFO]: NicoleX/xx.xx.xx.xx:50805 logged in with entity id 167 [...]
[01:21:53] [Server thread/WARN]: handleDisconnection() called twice
[01:22:40] [Server thread/INFO]: NicoleX lost connection: Timed out
[01:22:40] [Server thread/INFO]: NicoleX left the game

  1. Further login attempts result in the "You logged in from another location" error

Client Log:
[11:44:55] [Client thread/INFO]: [CHAT] You cannot enter your own wool room!

  1. Client disconnects here

[11:45:25] [Client thread/INFO]: Connecting to mc.server.net, 25565
[11:46:42] [Client thread/INFO]: Connecting to mc.server.net, 25565

  1. After two attempts to re-join, player closed the game

[11:47:02] [Client thread/INFO]: Stopping!
[11:47:02] [Client thread/INFO]: SoundSystem shutting down...
[11:47:02] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

Probable Causes: The user I know that suffers from this occasionally has their internet cut out or drop. What exactly causes these drops is unknown, but it seems the Minecraft server and/or client is not handling the loss of connection properly. When the lag happens they are kicked from the server, but their character gets left behind. Then Minecraft tries to reconnect them and causes the error.

Linked issues

Comments 6

This is all the info I could get on the problem with my limited knowledge. If anyone knows more ways to get data to help identify the problem, please tell me. The bug happens often enough that it isn't that hard to catch it. I also have a server that I can run any sort of test on.

Im having this same issue, but only on few servers. It happens a lot on some servers i have and it just keeps happening over and over.

I'm having the same issue on hypixel. 
I'm on 1.8.9 and using forge.  
I've changed password and my anti-virus is up to date, and it still happens. So I'm know I haven't been hacked.   

Experienced this issue twice myself today, and also had someone else happen it to. Only restarting the server helped in allowing us to reconnect.

Had the same issue myself on a server on my own pc. (1.16.4)

Seems similar to MC-74984. Not exactly sure whether it's the same issue or not.

Zachary C.

(Unassigned)

Community Consensus

Networking

1.15.2

Retrieved