gekware / minecraft-server-hibernation-pterodactyl-egg

egg for gekware/minecraft-server-hibernation
https://github.com/gekware/minecraft-server-hibernation
MIT License
36 stars 8 forks source link

start via proxy #3

Closed BroodjeNoodles closed 1 year ago

BroodjeNoodles commented 2 years ago

Is there an possibility that it can start via an proxy, if so, how to? really like the idea and it really helps me out. But if its possible to let it start when im connecting to it via an proxy, it will start and than send it to the server.

BolverBlitz commented 2 years ago

I don´t quite understand what you mean. This Egg comes with MSH installed and MSH is a proxy already?

BroodjeNoodles commented 2 years ago

with proxy i mean smth like waterfall to connect more servers together

BolverBlitz commented 2 years ago

Havent had time to try it, but i'm sure it will work, in theorie. But the MSH needs some time to get the Server running, so the proxy should think its offline and then not try again.

So i guess all you have to do is setting a diffrent timeout policy.

BroodjeNoodles commented 2 years ago

well, it doesnt start the server at all. When im joining it just says the server isnt reachable and doesnt do anything, as far as i know the server doesnt even get an request

gekigek99 commented 2 years ago

So I guess you are not using the egg but the msh executable directly?

Are you able to make it work without using the proxy?

BroodjeNoodles commented 2 years ago

Well, i put the egg in my panel, under the tab nests. So added an egg. It just works fine without waterfall proxy, the server just doesnt get the command to start the server. Did it work for you than?

BolverBlitz commented 2 years ago

Now i hat the time to try it.

1: Join Server: grafik

2: Rejoin & The Waterfall will connect you to MSH Server grafik

3: MSH Server sees client and connects him to the minecraft server grafik

4: Minecraft works 100% grafik

Found limitations: Wehen MSH stops the minecraft server after the time set in the config, the waterfall proxy wont notice. When a client joins he is stuck in "connecting..." and times out. However, msh regognizes the connection and will start the server again. After the user timed out and clicks rejoin, he gets forwarted to the server right away.

Minecraft shows this then: (Sorry, german. English: "Joining world" grafik

What MSH logs while this happens: grafik

Minecraft after some time shows: grafik

Then just click rejoin (or back to menue and manualy join again) grafik

And works. Yes this in not ideal but i think you can get this better handeld by modyfying the waterfall proxy. Config.yml: server_connect_timeout: 5000 if this is set lower, i think you can get better results, i don´t have time to do test it and it will depend on how fast the minecraft server starts (Ammount of plugins & resources)

Other settings in waterfalls config.yml where tweeking could improve that might be: timeout: 30000 connection_throttle_limit: 3 ping_passthrough: false

BroodjeNoodles commented 2 years ago

Wow thanks, gonna try asap! Now worries about your english, mine isn't best too since i am from the netherlands :D May you can make a wiki, and put this on the wiki?

BroodjeNoodles commented 2 years ago

Hey, i tried it, it does only work when the first server you try to join is offline. What im trying to do is something like minehut, if you want to join. you jump in portal and the server starts up. Does someone know if that is possible or do i need to just skip the idea or maybe look further. I tried it but via this it really doesnt work, really appreciate the help tho

gekigek99 commented 2 years ago

if server is offline and the client joins, msh takes some time to start the server and then you have to try joining every 10 seconds until you get in the server.

I'm working on a option to start immediately the server when client joins to avoid the first client waiting

BolverBlitz commented 2 years ago

Hey, i tried it, it does only work when the first server you try to join is offline.

The issue is that the waterfall proxy saves the server state i noticed, thats what i meant with experimenting with the settings

Other settings in waterfalls config.yml where tweeking could improve that might be: timeout: 30000 connection_throttle_limit: 3 ping_passthrough: false

Those and the server_connect_timeout: 5000 one. If you can´t get it to work good, then i guess you have to wait for the next MSH version :(

BroodjeNoodles commented 2 years ago

Oh im sorry, gonna try it just again to see if i maybe missed something. Otherwise it isnt an problem and thanks and hope you have a good day!

BroodjeNoodles commented 2 years ago

mmh, may i am using the wrong ip

afbeelding

Well, i do need to put ipofmyserver:25503 in my proxy right? otherewise that will be the problem, because it says its an unknown request so it doesnt start. Sorry for bothering tho

gekigek99 commented 2 years ago

i do need to put ipofmyserver:25503 in my proxy right?

yes exactly

BroodjeNoodles commented 2 years ago

Okay than is that not the problem haha

gekigek99 commented 2 years ago

Mmmmmm ok... Let's wait for the repo update and see is this issue will be fixed then ;)

BroodjeNoodles commented 2 years ago

Hope so! Haha But i also saw the memory and cpu usage working for you? Well for me its always both 0 so may i have the wrong egg? But i tried all the eggs listed. 3 eggs or something, also an really old egg. Maybe you know the reason?

BolverBlitz commented 2 years ago

Thats Not Egg related. Its a c-group issue on your node.

Auto Response from pterodactyl Discord: Vom Pterodactyl Discord:

Support Bot: You can type sudo docker info | grep "Cgroup Version" to check your active cgroup version.

Should you experience issues with Docker statistics, there are two ways to fix this. Changing the cgroup version to V2 or downgrading containerd to 1.4.13.

To change your Cgroup version open the file at /etc/default/grub and add systemd.unified_cgroup_hierarchy=1 to the CMDLINE_LINUX, without removing any existing parameters inside. Type =1 to enable cgroup V2 and =0 for V1.

It should look similar to GRUB_CMDLINE_LINUX="systemd.unified_cgroup_hierarchy=1". It might contain other existing parameters, in which case, you should add the new one at the end, e.g "swapaccount=1 systemd.unified_cgroup_hierarchy=1"

After that, run sudo update-grub followed by sudo reboot to apply it and restart the machine.

For more help related to stats, please ask them on Discord.

BroodjeNoodles commented 2 years ago

Oh thanks, so than it does work with this egg? Normal servers with default egg do work, thanks! Gonna try it asap but its gonna take some time since i have 3 vpsses, 1 from a vriend hahaha

BolverBlitz commented 2 years ago

The Default eggs should Not Work either, you might installed them on diffrent nodes. You can Check with sudo docker ps, it should either Show stats of all containers or none. I'm not aware of any half working.

BroodjeNoodles commented 2 years ago

Well, this egg doesnt work on any node. With default eggs they all work. May its a problem all of this on my side than? I dont know

BroodjeNoodles commented 2 years ago

I can check the wings logs. May they give any error