Server is active but can't either connect to it via lan or public IP

Hi , recently I made (or attempted to) a server for me and my friends, however ever since I started I receiving an error that goes like this, "internal exception java io.ioexception forcibly closed by remote host ", both on lan and publi IP.
I thought its because I haven’t port forwarded yet, so I did just that, and it changed nothing, what’s more, in the logs (/var/log/mineos.log) it says that port 25565 is closed (??) even though it’s set up correctly in router config. If that was the case then I would probably be able to join in via lan.
I’m currently using Debian 11, before it was Turnkey MineOS distro but I thought that it was the problem.
Please help and thank you.

Because you are inside the lan already and assuming your Minecraft server is too then this error won’t be caused by closed ports you only need to open ports for people that are external to you so they can join. That error can be caused by a whole range of issues.

it should not matter because you are local but i am pretty sure this error can still happen if the java you use to launch Minecraft is not allowed on the firewall so check to see if it is allowed if not then make a rule for it. Personally this is the first place i would look. Check this on the pc you use to play Minecraft.

outside of this check things like whitelist on the server or towards goggle because it can be cause by quite a few issues. Whitelist would be the next one to look at as it will kick you straight away with that same message.

i figured it out, turns out some versions are bugged (i tried on
When you start a server and it shows the version of the server in “Ping Version” on WebUI it works, if not, well it won’t work then