Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output from /bluemap does not show up through RCON or in log #351

Closed
ion1 opened this issue Oct 16, 2022 · 9 comments
Closed

Output from /bluemap does not show up through RCON or in log #351

ion1 opened this issue Oct 16, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@ion1
Copy link

ion1 commented Oct 16, 2022

What I did / Steps to reproduce

Running the bluemap command in a Minecraft client outputs the result normally:
image

However, running it through RCON outputs nothing:
image

The output does not show up in the server log in either case.

Expected result

I expect to see the output from the bluemap command through RCON and possibly in the server log as well.

Actual result

The output does not show up through RCON or in the server log.

Context

BlueMap Version: BlueMap-3.4-spigot
Platform: PaperMC 1.19.2-210

@TBlueF
Copy link
Member

TBlueF commented Oct 16, 2022

If the command-source is not a player, then the command-response is being sent with spigots CommandSender#sendMessage(String) method, here: https://github.com/BlueMap-Minecraft/BlueMap/blob/master/implementations/spigot/src/main/java/de/bluecolored/bluemap/bukkit/BukkitCommandSource.java#L63

So my first thought is that this must be an issue with spigot/paper..

I will test this myself later though, let's await the results from that :)

@ion1
Copy link
Author

ion1 commented Oct 24, 2022

I thought 3.5 fixed this as I got the expected output, but it turns out it only worked the first time after starting the server. It may or may not have been like that in 3.4 as well.

$ rcon 'bluemap'
BlueMap - Status:
 Render-Threads are running!
 Queued Tasks (3):
  [20df] Update map 'world'
   Detail: Update region (-2, 0) for map 'world'
   Progress: 6.09%
   ETA: 02:04:53
  [2fd5] Update map 'world_nether'
  [6f30] Update map 'world_the_end'

$ rcon 'bluemap'

$ rcon 'bluemap'

@TBlueF
Copy link
Member

TBlueF commented Oct 24, 2022

Sorry, I haven't looked at this yet .. it's the first next thing on the todo rn, so i'll check this soon :)

@ion1
Copy link
Author

ion1 commented Oct 24, 2022

There's nothing to apologize for, I just wanted to point out that it seems to respond with the output but only once, in case that helps with debugging. Thanks for your efforts!

@TBlueF TBlueF moved this from TODO to In progress in TODO / Idea board Oct 26, 2022
@TBlueF
Copy link
Member

TBlueF commented Nov 1, 2022

@ion1 So ...
the good news are, i found the reason why there are no responses to rcon sometimes..
.. The bad news are i won't be able to fix this.

BlueMap processes most commands asynchronously, to not block the server-thread while doing the calculations for the command. This is something i won't change, because some BlueMap commands take a second to read and freezing the server for a second is not acceptable for me.
The problem with RCON is now that the way most ServerAPI's like Spigot/Paper are implementing their command-system, is that .. if the command gets executed asynchronously, Spigot/Paper closes the RCON-connection before bluemap finished executing the command. Which means that bluemap can't send a response.

tl;dr:
To send a response to RCON i'd need to execute the commands on the Server-Thread, which i don't want to and will not do ^^'

@TBlueF TBlueF closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2022
@TBlueF TBlueF moved this from In progress to Rejected / Canceled in TODO / Idea board Nov 1, 2022
@ion1
Copy link
Author

ion1 commented Nov 1, 2022

Thanks for looking into this! Would it be possible to output the result into the server log so I could see it in there after running the command through RCON?

@TBlueF TBlueF reopened this Nov 1, 2022
@TBlueF
Copy link
Member

TBlueF commented Nov 1, 2022

I'll add that 👍

@TBlueF TBlueF moved this from Rejected / Canceled to In progress in TODO / Idea board Nov 1, 2022
@TBlueF TBlueF closed this as completed in 034d8b0 Nov 1, 2022
@TBlueF TBlueF moved this from In progress to Ready for next release in TODO / Idea board Nov 1, 2022
@TBlueF TBlueF moved this from Ready for next release to Done in TODO / Idea board Nov 10, 2022
@golyalpha
Copy link

golyalpha commented Oct 10, 2023

Hi, this same issue appears in Fabric 1.18.2 servers (and presumably others) with the server mod version of BlueMap. No response via RCON or in server output/logs.

@TBlueF TBlueF reopened this Oct 10, 2023
@TBlueF TBlueF moved this from Done to TODO in TODO / Idea board Oct 10, 2023
@TBlueF TBlueF added bug Something isn't working needs testing Not confirmed bug, needs more testing first labels Oct 10, 2023
@TBlueF TBlueF moved this from TODO to In progress in TODO / Idea board Nov 18, 2023
@TBlueF
Copy link
Member

TBlueF commented Nov 18, 2023

This is a bigger problem in Fabric or Forge, since there seems to be no easy way (without a Mixin) to detect if the command-source is an RCON source or not.

Logging command-output onto the console/log instead of sending them back is also more a hack than a real solution.
So this issue will be a won't fix and as long as RCON doesn't allow async command-responses it will just not be supported by BlueMap.

@TBlueF TBlueF closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
@github-project-automation github-project-automation bot moved this from In progress to Ready for next release in TODO / Idea board Nov 18, 2023
@TBlueF TBlueF moved this from Ready for next release to Rejected / Canceled in TODO / Idea board Nov 18, 2023
@TBlueF TBlueF removed the needs testing Not confirmed bug, needs more testing first label Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Rejected / Canceled
Development

No branches or pull requests

3 participants