MultiPaperK8s / MultiPaperHelm

Multipaper Helm Chart
MIT License
11 stars 5 forks source link

Issue connect to port forwarded server on local kind cluster on 1.19.2 #20

Open twosdai opened 2 years ago

twosdai commented 2 years ago

Describe the bug When attempting to connect to a client running 1.19.2 on a local kind cluster I get the following error:

Internal Exception: io.netty.handler.codec.DeconderException:
java.lang.NullPointerException: Cannot invoke "qw$a.a(int, qx)" because the return value of "java.util.Map.get(Object)" is null

To Reproduce Steps to reproduce the behavior:

  1. Build a multipaper server and master image running 1.19.2
  2. Use a 1.19.2 client
  3. Deploy the helm chart to a local kind cluster
  4. port forward a server pod
  5. attempt to connect to the server pod via localhost:25565

Expected behavior A minecraft client running the same version as the server is able to connect

Possible Solution (Optional) I'm not sure if there is something I am doing wrong with the deployment expectations or if this is just an untested thing.

Versioning Helm Version: version.BuildInfo{Version:"v3.9.0", GitCommit:"7ceeda6c585217a19a1131663d8cd1f7d641b2a7", GitTreeState:"clean", GoVersion:"go1.17.5"}

Master Version: 2.10.1 Build 35 Server Version: 1.19.2 Build 35 Kubernetes Version: Major:"1", Minor:"25", GitVersion:"v1.25.2", GitCommit:"5835544ca568b757a8ecae5c153f317e5736700e", GitTreeState:"clean", BuildDate:"2022-09-22T05:25:21Z", GoVersion:"go1.19.1", Compiler:"gc", Platform:"linux/amd64"

twosdai commented 2 years ago

Additionally, I did validate that the server in the cluster was in fact running 1.19.2 so I don't think it was a configuration issue with my kind cluster setup:

kubectl logs -f multipaper-6d46cc86b9-fmp5k
Defaulted container "multipaper" out of: multipaper, copy-configuration (init)
Downloading mojang_1.19.2.jar
Applying patches
Starting org.bukkit.craftbukkit.Main
System Info: Java 17 (OpenJDK 64-Bit Server VM 17.0.3+7) Host: Linux 5.18.10-76051810-generic (amd64)
Loading libraries, please wait...
2022-09-28 23:24:57,580 ServerMain WARN Advanced terminal features are not available in this environment
[23:24:58 INFO]: [MultiPaperConnection] Connecting to multipaper-master:35353...
[23:24:58 INFO]: [MultiPaperConnection] Connected to multipaper-master/10.244.1.11:35353
[23:24:59 INFO]: Building unoptimized datafixer
[23:25:00 INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[23:25:01 INFO]: Loaded 7 recipes
[23:25:02 INFO]: Starting minecraft server version 1.19.2
[23:25:02 INFO]: Loading properties
[23:25:02 INFO]: This server is running MultiPaper version MultiPaper-1.19.2-35 (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT) (Git: 7d8ed82)
[23:25:02 INFO]: Using 4 threads for Netty based IO
[23:25:02 INFO]: Server Ping Player Sample Count: 12
[23:25:03 INFO]: Default game type: SURVIVAL
[23:25:03 INFO]: Generating keypair
[23:25:03 INFO]: Starting Minecraft server on *:25565
[23:25:03 INFO]: Using epoll channel type
[23:25:03 INFO]: Paper: Using libdeflate (Linux x86_64) compression from Velocity.
[23:25:03 INFO]: Paper: Using OpenSSL 1.1.x (Linux x86_64) cipher from Velocity.
[23:25:03 INFO]: Server permissions file permissions.yml is empty, ignoring it
[23:25:03 INFO]: Preparing level "world"
[23:25:13 INFO]: Running delayed init tasks
[23:25:13 INFO]: Done (10.706s)! For help, type "help"
[23:25:13 INFO]: Timings Reset
[23:28:59 INFO]: /127.0.0.1:39134 lost connection: If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
[23:39:45 INFO]: /127.0.0.1:47138 lost connection: If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
[23:48:47 INFO]: /127.0.0.1:55536 lost connection: If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
[23:58:08 INFO]: /127.0.0.1:46336 lost connection: If you wish to use IP forwarding, please enable it in your BungeeCord config as well!
twosdai commented 2 years ago

Basically each of the lost connections is me trying to connect to the server with a client, I'm not sure if IP forwarding needs to be enabled, but I don't think it does. Maybe I am wrong *shrug.

twosdai commented 2 years ago

Found the issue: https://github.com/MultiPaperK8s/MultiPaperHelm/blob/master/templates/multipaper-spigot-configmap.yaml#L42

If you're going to set this to be true, then bungeecord needs to be installed. I just disabled it and it worked fine.

RemcoSpigot commented 1 year ago

Thank you for reporting this @twosdai

I'll make sure to revamp the settings and ensure that everything works out of the box in any situation. Right now I can imagine that such settings are a bit confusing.

twosdai commented 1 year ago

Thanks! I would make a pr if I had the time. Super busy right now.

I think migrating more of the configmap stuff into the values.yaml file would be the better long term move.

RemcoSpigot commented 1 year ago

Thanks! I would make a pr if I had the time. Super busy right now.

Thank you! Despite you being busy you're providing great feedback which can be put back into the project. It's much appreciated.

I think migrating more of the configmap stuff into the values.yaml file would be the better long term move.

You are indeed correct, hence why we created #13 and will make everything configurable after most parts of the MVP have been completed!