I started a server a week or 2 ago and never had any issues then one day this started popping up and now the server sometimes stops working and friends cant play on it when I'm at work. Since it does eventually stop the server (usually when I'm at work) the server is down until I get home from work and reopen the server.
[08:10:58 INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[08:10:59 INFO]: Loaded 1290 recipes
[08:10:59 INFO]: Loaded 1399 advancements
[08:11:00 INFO]: Starting minecraft server version 1.21.1
[08:11:00 INFO]: Loading properties
[08:11:00 INFO]: Default game type: SURVIVAL
[08:11:00 INFO]: Generating keypair
[08:11:00 ERROR]: Exception handling console input
java.io.IOException: The handle is invalid
at java.base/java.io.FileInputStream.readBytes(Native Method) ~[?:?]
at java.base/java.io.FileInputStream.read(FileInputStream.java:328) ~[?:?]
at java.base/java.lang.System$In.read(System.java:2252) ~[?:?]
at java.base/java.io.BufferedInputStream.read1(BufferedInputStream.java:345) ~[?:?]
at java.base/java.io.BufferedInputStream.implRead(BufferedInputStream.java:420) ~[?:?]
at java.base/java.io.BufferedInputStream.read(BufferedInputStream.java:399) ~[?:?]
at java.base/sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:350) ~[?:?]
at java.base/sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:393) ~[?:?]
at java.base/sun.nio.cs.StreamDecoder.lockedRead(StreamDecoder.java:217) ~[?:?]
at java.base/sun.nio.cs.StreamDecoder.read(StreamDecoder.java:171) ~[?:?]
at java.base/java.io.InputStreamReader.read(InputStreamReader.java:190) ~[?:?]
at java.base/java.io.BufferedReader.fill(BufferedReader.java:160) ~[?:?]
at java.base/java.io.BufferedReader.implReadLine(BufferedReader.java:370) ~[?:?]
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:347) ~[?:?]
at java.base/java.io.BufferedReader.readLine(BufferedReader.java:436) ~[?:?]
at apn$1.run(SourceFile:103) [server-1.21.1.jar:?]
[08:11:00 INFO]: Starting Minecraft server on *:25565
[08:11:00 INFO]: Using default channel type
[08:11:00 INFO]: Preparing level "world"
[08:11:01 INFO]: Preparing start region for dimension minecraft:overworld
[08:11:01 INFO]: Preparing spawn area: 0%
[08:11:02 INFO]: Time elapsed: 374 ms
[08:11:02 INFO]: Done (1.274s)! For help, type "help"
Related issues
Comments

Thank you for your report!
We're tracking this issue in MC-33041, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote and any extra information to the main ticket it would be appreciated.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
-- I am a bot. This action was performed automatically! The ticket was resolved by one of our moderators, and I left this message to give more information to you.