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

Watchdog isn't aware of Geyser usage - Bedrock client on Java server #58

Open mithrandir opened 1 year ago

mithrandir commented 1 year ago

I'm running Spigotmc / Geysermc and the watch dog scripts cannot detect bedrock client connection. Thus my server is shutting down after 10 minutes even I'm playing and connecting. The easy way to mitigate the issue is assuming that Java server can host both of bedrock clients (UDP ports) and Java clients. Could we have such change?

PS. thanks for awesome documentation and the script. I'm AWS newbie and it only took 2 hours to setup the ECS cluster and lambda stuffs. Everything is working great except the bedrock client detection.

yurisasc commented 1 year ago

This is an interesting issue. I'll have a look to see if I can help with this.

yurisasc commented 1 year ago

@mithrandir I've opened a PR and published a test watchdog image. You can use the test image while waiting for the PR to be reviewed. You can do so by changing code: https://github.com/doctorray117/minecraft-ondemand/blob/c12ab627dc496e97c3df734a0003d5317423753c/cdk/lib/minecraft-stack.ts#L226-L232

into:

image: ecs.ContainerImage.fromRegistry( 
       'yurisasc/minecraft-ecsfargate-watchdog' 
     ), 

The new image should allow the watchdog to listen to the 19132 UDP port if you add GEYSER: true under this line: https://github.com/doctorray117/minecraft-ondemand/blob/c12ab627dc496e97c3df734a0003d5317423753c/cdk/lib/minecraft-stack.ts#L246

Rithmatist commented 1 year ago

I'm running Spigotmc / Geysermc and the watch dog scripts cannot detect bedrock client connection. Thus my server is shutting down after 10 minutes even I'm playing and connecting. The easy way to mitigate the issue is assuming that Java server can host both of bedrock clients (UDP ports) and Java clients. Could we have such change?

PS. thanks for awesome documentation and the script. I'm AWS newbie and it only took 2 hours to setup the ECS cluster and lambda stuffs. Everything is working great except the bedrock client detection.

Would be easier to deploy with code :)

mithrandir commented 1 year ago

@yurisasc Thanks for quick change! It worked fine now, confirmed my Bedrock connection is recognized.

doctorray117 commented 1 year ago

Hello. Looks good, thanks for the additional testing. @yurisasc Did you have a chance to try a fresh deployment with CDK to ensure that method worked as well?

yurisasc commented 1 year ago

@doctorray117 Yup. I've set up a new staging server using the image, which also works. The watchdog still works as expected. Such as stopping after $SHUTDOWNMIN minutes of the last activity, stopping after $STARTUPMIN minutes if there's no activity after the server starts, recognising java and bedrock connections, and sending startup and shutdown notifications.

Happy for you to review the code (or even the commit messages) if it doesn't match your format :)

doctorray117 commented 1 year ago

@yurisasc No, it's good. Apologies for the delay. I'm happy with the formatting and my testing time has been limited. I'll get it merged and deploy it out to the public docker repo over the weekend, and come back and close this issue afterward.

Rithmatist commented 1 year ago

@yurisasc No, it's good. Apologies for the delay. I'm happy with the formatting and my testing time has been limited. I'll get it merged and deploy it out to the public docker repo over the weekend, and come back and close this issue afterward.

Do you have discord? I found a method to support modpacks and some other features

GarrettBeatty commented 1 month ago

any update on this?