Open Thorinwasher opened 11 months ago
Similar behavior can be seen for teleportation requests as well:
[18:13:14 INFO]: [Stargate] trying to read player join json msg
[18:13:14 INFO]: [Stargate] {"PLAYER":"LegetimateUser2","PORTAL":"inter2","NETWORK":"inter"}
[18:13:14 INFO]: [Stargate] Player was not null; trying to teleport
[18:13:14 INFO]: [Stargate] Formatted TranslatableMessage 'TELEPORT' to 'Teleported!'
[18:13:14 INFO]: [Stargate] Checking permissions for entity CraftPlayer{name=LegetimateUser2}
[18:13:14 INFO]: [Stargate] Adding action org.sgrewritten.stargate.action.SupplierAction@7afb7f96
[18:13:14 INFO]: [Stargate] Received plugin-message
[18:13:14 INFO]: [Stargate] trying to read player join json msg
[18:13:14 INFO]: [Stargate] {"PLAYER":"LegetimateUser2","PORTAL":"inter2","NETWORK":"inter"}
[18:13:14 INFO]: [Stargate] Player was not null; trying to teleport
[18:13:14 INFO]: [Stargate] Formatted TranslatableMessage 'TELEPORT' to 'Teleported!'
[18:13:14 INFO]: [Stargate] Checking permissions for entity CraftPlayer{name=LegetimateUser2}
[18:13:14 INFO]: [Stargate] Adding action org.sgrewritten.stargate.action.SupplierAction@7ef80b6b
[18:13:14 INFO]: [Stargate] Received plugin-message
[18:13:14 INFO]: [Stargate] trying to read player join json msg
[18:13:14 INFO]: [Stargate] {"PLAYER":"LegetimateUser2","PORTAL":"inter2","NETWORK":"inter"}
[18:13:14 INFO]: [Stargate] Player was not null; trying to teleport
[18:13:14 INFO]: [Stargate] Formatted TranslatableMessage 'TELEPORT' to 'Teleported!'
[18:13:14 INFO]: [Stargate] Checking permissions for entity CraftPlayer{name=LegetimateUser2}
[18:13:14 INFO]: [Stargate] Adding action org.sgrewritten.stargate.action.SupplierAction@11e14352
[18:13:14 INFO]: [Stargate] Received plugin-message
[18:13:14 INFO]: [Stargate] trying to read player join json msg
[18:13:14 INFO]: [Stargate] {"PLAYER":"LegetimateUser2","PORTAL":"inter2","NETWORK":"inter"}
[18:13:14 INFO]: [Stargate] Player was not null; trying to teleport
[18:13:14 INFO]: [Stargate] Formatted TranslatableMessage 'TELEPORT' to 'Teleported!'
[18:13:14 INFO]: [Stargate] Checking permissions for entity CraftPlayer{name=LegetimateUser2}
[18:13:14 INFO]: [Stargate] Adding action org.sgrewritten.stargate.action.SupplierAction@be79c6c
This comes from entering a portal once, somehow the messages got sent multiple times
It seems there are loops in the logic of inter-server messages, but I'm unsure whether part of the problem is that an inter-server responds to its own message, or if it's that the servers answer each other (that's not clear without knowing the output of all connected servers).
For the teleportation message, it seems likely that the receival of a teleportation message calls VirtualPortal's teleportHere message (instead of/in addition to AbstractPortal's teleportHere), which sends a new teleportation message to BungeeCord. In StargateBungeeManager.playerConnect(String message), the fetched destination portal might be a virtual portal, causing the VirtualPortal's teleportHere message to be sent.
or if it's that the servers answer each other (that's not clear without knowing the output of all connected servers).
There was only output like this on one server.
I have had it in the back of my head since I made a refactor (removed all database code away from the registry) that I somehow made a mistake and that the servers are sending the portal create messages in a loop. But I haven't found it to be real.
This is definitely unusual behavior, could it also have something to do with the unreliability of bungee?
Whatever it is, it's not critical (except for maybe infinite creation loops if that were a thing). But it is definitely a bug.
or if it's that the servers answer each other (that's not clear without knowing the output of all connected servers).
There was only output like this on one server.
I have had it in the back of my head since I made a refactor (removed all database code away from the registry) that I somehow made a mistake and that either the servers are sending the portal create messages in a loop. But I haven't found it to be real.
This is definitely unusual behavior, could it also have something to do with the unreliability of bungee?
Whatever it is, it's not critical (except for maybe infinite creation loops if that were a thing). But it is definitely a bug.
Then it's definitely responding to its own BungeeCord messages. I believe BungeeCord messages should have some kind of sending server id, so a server won't respond/listen to BungeeCord messages it has sent to the other servers.
It isn't a direct fix to this issue, but it should fix this issue as well.
Then it's definitely responding to its own BungeeCord messages. I believe BungeeCord messages should have some kind of sending server id, so a server won't respond/listen to BungeeCord messages it has sent to the other servers.
It isn't a direct fix to this issue, but it should fix this issue as well.
That could definitely fix the issue, I would rather find the real problem behind this first though. It might be something completely different than one expects. I would agree, this is probably not a bungee bug, I would be surprised if that were the case
Bug Description
Duplicate portal create messages were sent for interserver
Reproduction Steps
Create an interserver portal ijn one server (do all preparatory step to be able to do this of course)
Desired Behaviour
no stacktrace
Observed Behaviour
Trace Logs
Nein
Other Information
Seems very similar to #305
Easiest way to avoid this is just to hide the stack trace, it really is harmless. But it's good to keep for debug purposes