doctorray117 / minecraft-ondemand

Templates to deploy a serverless Minecraft Server on demand in AWS
Apache License 2.0
1.68k stars 115 forks source link

fargate watchdog doesn't detect bedrock connections #44

Open fridaystreet opened 2 years ago

fridaystreet commented 2 years ago

first off, well done, this is a great piece of work and clearly a lot of effort gone in.

I've made a few modifications as I wanted to run a pufferpanel server rather than just a single standalone minecraft server. Also puffer panel then gives easy access to the files through sftp to install plugins and tools to manage the server.

I noticed that the watchdog doesn't seem to work (well I can't seem to see it working) for bedrock connections. Not sure about the netstat commands etc in the script but from what I can see (including local testing) it never detects any udp connections.

I tried everything I could to get it to work, but couldn't. So in the end I gave up and just decided to write a small node script that use the minecraft protocol to get the status of the server directly. Seems to be a bit more robust as it gets the status and number of players online directly. I'd be happy to share it if you are open to taking PRs?

doctorray117 commented 2 years ago

Since bedrock uses UDP connections, I couldn't do it with the netstat loop. The watchdog.sh attempts to monitor bedrock using a poor man's implementation of the minecraft protocol on line 136 by sending an uncommitted ping message (generated on lines 116-124) to the server and pulling the connection count. Is that not working right now? Open to PRs but would like to get an understanding on how the node would run, whether it's replacing the shell script logic or is complimentary.

fridaystreet commented 2 years ago

yeah I tested that ping command and couldn't get any response from it. I'm running java server with geyserMC for bedrock connections, not sure if that's the issue, either way it doesn't seem to work.

No I haven't completely replaced the script, just have some suplimentary node scripts that output to console so the bash script just runs them in place of the other commands and uses the outputs of the node script in the existing bash script instead.