Zulfen / ZulfBungee

A Skript addon which adds proxy integration.
Apache License 2.0
10 stars 2 forks source link

Issue for connecting the addon on Pterodactyl panel #9

Closed MaitreFranck closed 1 year ago

MaitreFranck commented 1 year ago

Describe the bug Hello, i tried many configuration with pterodactyl to make this addon work, i've ports opened on both proxy and spigot but it didn't want to connect. I tried all IP, 127.0.0.1, 0.0.0.0, 172.18.0.1 and the IP of my VPS.

Has you advises on how you can connect ?

I'm on bungeecord/waterfall and paper, tried with latest (0.8.0)

I can send you screenshots of differents configurations if you need.

Zulfen commented 1 year ago

Could you turn on debug mode on the Spigot, send me the output and also your plugin config for both the Bungeecord and Spigot?

I have had issues with Pterodactyl in the past, so hopefully I can find out what causes this! If you can connect to your Spigot servers just fine ingame, it might just be a case of changing your firewall rules so the plugin can use the ports.

Zulfen commented 1 year ago

Just wanna check - guessing you are running Pterodactyl yourself and know how to configure it?

MaitreFranck commented 1 year ago

Yes i installed it myself on my vps, i have full access on it.

Spigot :

[ClientListenerManager/INFO]: [ZulfBungee] Thread has arrived: ClientListenerManager [DataIn/INFO]: [ZulfBungee] Thread has arrived: DataIn [ClientConnection/INFO]: [ZulfBungee] Thread has arrived: ClientConnection [DataOut/INFO]: [ZulfBungee] Thread has arrived: DataOut [ClientListenerManager/WARN]: [ZulfBungee] Connection lost with proxy, attempting to connect every 2 seconds... [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Invalid argument (connect failed) [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Invalid argument (connect failed) [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Invalid argument (connect failed) [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Invalid argument (connect failed)

Also got this on another try :

[21:17:50] [ClientConnection/INFO]: [ZulfBungee] Thread has arrived: ClientConnection [21:17:50] [DataIn/INFO]: [ZulfBungee] Thread has arrived: DataIn [21:17:50] [DataOut/INFO]: [ZulfBungee] Thread has arrived: DataOut [21:17:50] [ClientListenerManager/WARN]: [ZulfBungee] Connection lost with proxy, attempting to connect every 2 seconds... [21:17:52] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:17:54] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:17:56] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:17:58] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:18:00] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:18:02] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [21:18:04] [ClientListenerManager/INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused)

Currently i don't have any firewall turned on iirc.

bungee_config.txt

spigot_config.txt

Zulfen commented 1 year ago

Do you mind showing me your Pterodactyl allocations? https://pterodactyl.io/community/games/minecraft.html

I think that might have something to do with it.

Zulfen commented 1 year ago

Depending what distro you use, also make sure your firewall is configured using the guide I linked just in case a firewall is automatically in place :)

Zulfen commented 1 year ago

If you use ufw, try this: ufw allow in on pterodactyl0 to 172.18.0.1 port 25500 proto tcp ufw allow in on pterodactyl0 to 172.18.0.1 port 25570 proto tcp

With these commands you should be able to keep your ZulfBungee config the same and have it work, but let me know if it doesn't.

Zulfen commented 1 year ago

If you need further help with this, I could do a Discord call to help you configure if it still doesnt work.

MaitreFranck commented 1 year ago

I dont have ufw on my vps, but iptables with this settings : https://pastebin.com/pesQ5x1p

Concerning this : https://pterodactyl.io/community/games/minecraft.html it's what i followed, so my allocations looks like that : image

And on the spigot : image

MaitreFranck commented 1 year ago

On bungee config.yml, i have my spigot setuped this way : image

Zulfen commented 1 year ago

On your spigot server's server.properties, what do you have as the address in there? Just wanna get an idea of what goes where basically.

MaitreFranck commented 1 year ago

On spigot server's server.properties, it is set to 0.0.0.0, and server port is the primary in allocations tab so 25566.

Zulfen commented 1 year ago

Can you try these configs? bungee_config.txt spigot_config.txt

MaitreFranck commented 1 year ago

These ones print me this on the spigot :

[16:33:42 INFO]: [ZulfBungee] Thread has arrived: ClientListenerManager [16:33:42 INFO]: [Skript] Loading variables... [16:33:42 INFO]: [Skript] Loaded 81 variables in 0.0 seconds [16:33:42 INFO]: [Skript] All scripts loaded without errors. [16:33:42 WARN]: [Skript] No scripts were found, maybe you should write some ;) (config.sk, line 188: databases:') [16:33:42 INFO]: [Skript] Finished loading. [16:33:42 INFO]: [ZulfBungee] Thread has arrived: ClientConnection [16:33:42 INFO]: [ZulfBungee] Thread has arrived: DataIn [16:33:42 INFO]: [ZulfBungee] Thread has arrived: DataOut [16:33:42 WARN]: [ZulfBungee] Connection lost with proxy, attempting to connect every 2 seconds... [16:33:44 INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [16:33:46 INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused) [16:33:48 INFO]: [ZulfBungee] Error while creating socket: java.net.ConnectException: Connection refused (Connection refused)

Zulfen commented 1 year ago

That's really odd... my only suggestion at this point is to try different combinations. 0.0.0.0 always used to work with Pterodactyl for me, but I believe those ports were open to the Internet, so not sure.

Zulfen commented 1 year ago

I might try and set up a Pterodactyl instance myself and see if I can get it working

MaitreFranck commented 1 year ago

Okay so with your Spigot config file, I tried to replace server-host with 172.18.0.1, and it lead me to that :

Spigot side : image

Bungeecord side : image

Zulfen commented 1 year ago

Awesome! This means that it appears that at least they can talk to eachother. image Is your Bungeecord server still defined like this with the same address? If it is, just disable port whitelisting and the plugin should work!

MaitreFranck commented 1 year ago

On bungeecord's config.yml, it's like this : image

MaitreFranck commented 1 year ago

But the port whitelisting is already disabled : image

Zulfen commented 1 year ago

On bungeecord's config.yml, it's like this : image

Try replacing 0.0.0.0 with 172.18.0.1

MaitreFranck commented 1 year ago

Well I can't replace this line, every time i start the bungee, it's automaticly replaced with 0.0.0.0 (probably due to the way that ptero/docker works).

Zulfen commented 1 year ago

Oh okay. I'm gonna release an update soon which hopefully allows Pterodactyl to work, thanks for providing info :)

MaitreFranck commented 1 year ago

Okay, I'm gonna wait it with impatience, I hope it will work. If not, I will probably have to think about removing pterodactyl panel I guess

Zulfen commented 1 year ago

Hi! Have just released an experimental build which might fix the issue. https://github.com/Zulfen/ZulfBungee/releases/download/v0.8.2-TEST/ZulfBungee.jar Tell me if it works!

MaitreFranck commented 1 year ago

Seems good, but the port whitelist doesn't works if turned on. On proxy i got this :

https://pastebin.com/4hVYt4uk

MaitreFranck commented 1 year ago

And the test.sk skript seems to not really work : image

Zulfen commented 1 year ago

I'm just gonna remove the security system I think - it's been causing loads of problems and I only understand now that it's not needed. Will release a new update very soon to hopefully fix it

Zulfen commented 1 year ago

I'm hoping this works - done a couple of fixes: https://github.com/Zulfen/ZulfBungee/releases/download/v0.8.2-TEST/ZulfBungee.jar

MaitreFranck commented 1 year ago

Everything seems good, thanks alot ! I only noticed one thing : image Idk if this line doesn't works or not, but I tried to add that but doesn't change alot of thing : image

MaitreFranck commented 1 year ago

One more thing, has you tested your addon on a network with dozens of peoples ? Or is there a limit where it can start to be a little lagguy ?

MaitreFranck commented 1 year ago

I also maybe have a little improvement for global scripts, its a really good feature, but it can be nice to send them into a folder in Skript/scripts like we can have our scripts on each server on Skript/scripts/ZulfBungee/ and our skripts we only want in a specific server on Skript/scripts/

Idk if you wanted me to add this on a new issue or not, so let me know :)

MaitreFranck commented 1 year ago

And one little little more thing, it seems that it sometimes "connect" 2 times the server, so that means it reload 2 times all the scripts : image It could lead to 2x more time to reload all the global scripts (this is a bug i guess).

Zulfen commented 1 year ago

Thanks for the suggestion, glad to hear everything is working! :D

Everything seems good, thanks alot ! I only noticed one thing : image Idk if this line doesn't works or not, but I tried to add that but doesn't change alot of thing : image

It should be event-text instead of event-string. My bad - think I put the wrong thing on SkriptHub!

One more thing, has you tested your addon on a network with dozens of peoples ? Or is there a limit where it can start to be a little lagguy ?

Not really sure performance wise - I know network variables can get a little slow, but planning on adding some new syntax to get around a limitation.

I also maybe have a little improvement for global scripts, its a really good feature, but it can be nice to send them into a folder in Skript/scripts like we can have our scripts on each server on Skript/scripts/ZulfBungee/ and our skripts we only want in a specific server on Skript/scripts/

Idk if you wanted me to add this on a new issue or not, so let me know :)

Good suggestion, will definitely consider this!