Server keeps going offline

My server doesn’t crash but randomly goes offline and doesn’t let anyone connect.

I don’t see any issues in that log file.

It could be an issue with the network - e.g. connection instability or firewall.

I disabled my firewall and my network shouldn’t be the issue. I’m just confused why it says the server is up and is up for like the first hour or so when I start it but then after that no can connect and it shows the server is offline.

Are we able to see the log around when the server shutdown?

This is the startup for the server.
The server never crashes it just appears offline and no one can join even though the server is obviously up and running… I can still run commands on the server through the start up prompt.

Are you running this on your home computer/network?

Yes I am. I’ve also hosted other servers in the past that on Minecraft 1.7.10 and 1.10.2 but this is the first time I’ve had an issue like this.

Are you able to connect via the ip of “localhost” (without quotes - and the minecraft client must be on the same pc as the server for that ip to work)?

No once I port forward I’m not able to connect with localhost.

[09:14:43] [Netty Server IO #3/WARN] [io.netty.channel.nio.NioEventLoop]: Selector.select() returned prematurely 512 times in a row; rebuilding Selector io.netty.channel.nio.SelectedSelectionKeySetSelector@552d10d0.
[09:14:43] [Netty Server IO #3/INFO] [io.netty.channel.nio.NioEventLoop]: Migrated 0 channel(s) to the new Selector.

This is what starts being sent on the server log after no one is on the server for 1-2 hours.
Not sure if it it has anything to do with it or not though.

Linux or Windows?

This is/was a known issue with netty on certain Linux kernel versions…

Also seems like it could be due to a behind-the-scenes OutOfMemoryError…

I’m on Windows 10