kharidiron / StarryPy3k

StarryPy on Python3k
Other
5 stars 3 forks source link

Disconnected players are still shown in /who, admins can not kick them #14

Closed ghost closed 8 years ago

ghost commented 8 years ago

I ran the latest StarryPy3k for approximately 1 hour. After some players experienced disconnection, their names are shown with [-1] prefix on /who command. Admins report they tried to kick those "ghost" players so they could join back, but they couldn't. http://i.imgur.com/XGz1Wbg.png The debug.log is pretty much long so I will try to reproduce this for a short period of time.

kharidiron commented 8 years ago

hm... Ok, I think I might know what's going on. I'll look into that ASAP

ghost commented 8 years ago

Okay, here's a log snippet when I tried to kick a "ghost" player and failed.

http://pastebin.com/yQusfDQT

kharidiron commented 8 years ago

Ok I've got more of a handle on this, now that I've got SBReddit up, It looks like if a user attempts to connect, but the connect fails (no user/pass, bad user/pass, etc...), they still get added to the player shelf. At the same time, their status gets set to -1, and logged_in gets set... which is bad, since they aren't actually logged in.

kharidiron commented 8 years ago

Nope, still not resolved. I'm going to fix the kick command to take care of this.

kharidiron commented 8 years ago

A little more insight into this bug: it looks like it is people who attempt to connect to the server while having mods enabled, but who don't have 'asset mismatch' disabled.

ghost commented 8 years ago

Thanks kharidiron, it's working fine now.

Also, since setting AllowAssetMismatch to false on the server, I have been having less "ghost" players.

kharidiron commented 8 years ago

This issue is still active, though in a different form now. There are users who disconnect due to server lag, but cannot be removed, even with my kick fix.

davoodinator commented 8 years ago

still happening.. have 3 ghosted players right now.. how do i help you gather more information on it? want an ssh account on my server?

Septicity commented 8 years ago

Hi, Kharidiron told me to send this log file when I crashed like this, so you guys can use it. http://pastebin.com/q7FwTCsn The crash happens at line 1761.

kharidiron commented 8 years ago

Thanks for posting that. Let me dig in and see if it helps.

davoodinator commented 8 years ago

i have like 50 ghosted players right now

server is set to assetmismatch=false server is running 1.02 version of starbound

when logged in as " owner" UUID char. I see (-1) next to all of their names. is that not a clear indication they are ghosted? Can you just kill them ?

rubellyte commented 8 years ago

While 582658e438d7fef8cde8ef24c5532a109230ae7d has fixed the problem of being unable to kick -1 players, I ran into an issue today where a ghosted player still has an id, and cannot be kicked.

kharidiron commented 8 years ago

New commit should hopefully finally resolve this issue once and for all.

ghost commented 8 years ago

I ran the new commit for 4 hours. I saw 10 "asset mismatch" connection attempts in starbound_server.log, and had 0 ghosts.

kharidiron commented 8 years ago

This is solved... sorta. There's a new bug, but I'll open that as a new ticket.

dopeghoti commented 8 years ago

Just FYI, I don't see a new issue for this yet, but I had this occur today on my server. Here is the relevant log:

2016-08-02 21:14:14 - DEBUG - starrypy # Initializing connection.
2016-08-02 21:14:14 - INFO - starrypy # Received connection from xx.xx.xx.xx
2016-08-02 21:14:14 - DEBUG - starrypy # New connection established.
2016-08-02 21:14:14 - INFO - starrypy.plugin.player_manager # Known player is attempting to log in: ThVortex
2016-08-02 21:14:14 - ERROR - starrypy.plugin_manager # Exception encountered in plugin on action: client_connect
Traceback (most recent call last):
  File "/home/steam/src/StarryPy3k/plugins/player_manager.py", line 260, in on_client_connect
    player = yield from self._add_or_get_player(**data["parsed"])
  File "/usr/lib/python3.5/asyncio/coroutines.py", line 206, in coro
    res = func(*args, **kw)
  File "/home/steam/src/StarryPy3k/plugins/player_manager.py", line 671, in _add_or_get_player
    raise ValueError("Player is already logged in.")
ValueError: Player is already logged in.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/steam/src/StarryPy3k/plugin_manager.py", line 45, in do
    if not (yield from p(packet, connection)):
  File "/home/steam/src/StarryPy3k/plugins/player_manager.py", line 264, in on_client_connect
    self._set_offline(connection)
  File "/home/steam/src/StarryPy3k/plugins/player_manager.py", line 449, in _set_offline
    connection.player.connection = None
AttributeError: 'StarryPyServer' object has no attribute 'player'
2016-08-02 21:14:14 - INFO - starrypy # Removing unknown player.