PaperMC / Folia

Fork of Paper which adds regionised multithreading to the dedicated server.
GNU General Public License v3.0
3.57k stars 463 forks source link

rcon-cli broken #170

Open Alestrix opened 12 months ago

Alestrix commented 12 months ago

Expected behavior

docker exec -ti mc rcon-cli list should run the /list command on the console

Observed/Actual behavior

$ docker exec -ti mc rcon-cli list
Error executing: list (null)

Steps/models to reproduce

Run itzg/minecraft-server:latest image with TYPE: FOLIA as environment, wait for the server to come up and execute above command.

Plugin and Datapack List

No plugins or datapacks. Executing listed commands not possible due to bug mentioned in this report.

Folia version

According to docker logs mc:

...
[mc-image-helper] 00:59:22.273 INFO  : Resolved folia to version 1.20.2 build 18
[mc-image-helper] 00:59:25.018 INFO  : Downloaded /data/folia-1.20.2-18.jar
...

Other

I double-checked with the maintainer of itzg/minecraft-server and they confirm that this is a Folia issue.

ocelotpotpie commented 12 months ago

rcon functionality is not currently planned for Folia. That may change in the future but for now this is as expected.

Alestrix commented 12 months ago

Thanks @ocelotpotpie for the quick reply! Is this documented anywhere and does the regular paper release support rcon?

Spottedleaf commented 12 months ago

https://github.com/PaperMC/Folia/commit/1e5e2154c9f88d788cecf0b9fcc77ece7d1f8663 May resolve the issue, can you re-test?

fisher60 commented 11 months ago

Hello, I see that rcon support is marked as not planned. I have only recently started playing with folia, but the lack of rcon immediately makes folia unusable for my regular needs when hosting an MC server.

Especially considering Folia is intended as a higher performance implementation, remote server management seems it would be essential.

Also worth mentioning, the linked fix seems to fix the error messages received in version 1.20.2, but the command executions do not appear to have any effect on my machine (when running rcon-cli in docker)

Spottedleaf commented 11 months ago

A lot of commands schedule now onto different contexts, which means when the command finishes synchronously it may not have the resulting command response available - as it has not actually finished execution. This is a more general problem with the command system, as there is no way to signal an asynchronous completion.

Not sure what I can do to fix that, as it's always been an issue with RCON but it's certainly more noticeable now.

electronicboy commented 11 months ago

I recall lucko created a PR to spigot years ago to try to add a means to control buffering and releasing the rcon response, it is something I've wanted to look into for paper, just, rcon is not something that deems any priority

Netherwhal commented 10 months ago

I think even if we had a "fire and forget" option that would be great, as already mentioned, even today with Paper you can not really rely on RCON anymore for request<>response operations, but it is useful to send commands. We usually then read the results from the DB (most plugins will write to the db, but they do not action of 3rd party writes to the db)

Spottedleaf commented 10 months ago

https://github.com/PaperMC/Folia/commit/27561750dd0e90fe957d77e075f696a6f63b73b4 Is another fix for RCON

Netherwhal commented 9 months ago

This can be closed - and rather create specific ticket? To me I see no difference in usage to Paper: it works "as expected" (e.g. those async issues also exist in paper).