Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-197798

Server crashes after 60 second tick after updating to 1.16.2 with error "java.io.IOException: The handle is invalid"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16.2
    • None
    • Windows 10, Java version 1.8.0_261
    • Unconfirmed
    • (Unassigned)

      I was updating my server from 1.15.2 to 1.16.2, going through the usual steps. It took much longer than usual to prepare the spawn area, and after one or two minutes of being up, the server crashed with this message in the command prompt:

      [16:16:22] [Server Watchdog/FATAL]: A single server tick took 60.37 seconds (should be max 0.05)
      [16:16:22] [Server Watchdog/FATAL]: Considering it to be crashed, server will forcibly shutdown.
      [16:16:22] [Server Watchdog/ERROR]: This crash report has been saved to: C:\Users\Nick\Documents\Fun Stuff\Minecraft\Server\.\crash-reports\crash-2020-08-11_16.16.22-server.txt
      

      I attached the related crash report. I've attempted to redownload a new server.jar file multiple times and tried a fresh download on a different machine, created a new world, and experienced the exact same issue.

      I found a couple threads on multiple forums describing the same issue, including this bug report with the same error I got when using the server gui:

      [01:21:53 INFO]: Generating keypair
      [01:21:53 ERROR]: Exception handling console input
      java.io.IOException: The handle is invalid at   java.io.FileInputStream.readBytes(Native Method) ~[?:1.8.0_261] at java.io.FileInputStream.read(Unknown Source) ~[?:1.8.0_261] at java.io.BufferedInputStream.read1(Unknown Source) ~[?:1.8.0_261] at java.io.BufferedInputStream.read(Unknown Source) ~[?:1.8.0_261] at sun.nio.cs.StreamDecoder.readBytes(Unknown Source) ~[?:1.8.0_261] at sun.nio.cs.StreamDecoder.implRead(Unknown Source) ~[?:1.8.0_261] at sun.nio.cs.StreamDecoder.read(Unknown Source) ~[?:1.8.0_261] at java.io.InputStreamReader.read(Unknown Source) ~[?:1.8.0_261] at java.io.BufferedReader.fill(Unknown Source) ~[?:1.8.0_261] at java.io.BufferedReader.readLine(Unknown Source) ~[?:1.8.0_261] at java.io.BufferedReader.readLine(Unknown Source) ~[?:1.8.0_261] at zg$1.run(SourceFile:89) [server.jar:?]
      

      I followed the instructions in that thread, opening from the command prompt only for the issue to repeat itself.

      When I tried to use the command prompt to allocate more RAM to the server to see if that would solve it, it seemed like it tried to use up everything I gave it and more, throwing these errors:

      C:\Users\Nick\Documents\Fun Stuff\Minecraft\Server>java -Xmx2G -jar server.jar --nogui
      Error occurred during initialization of VM
      Could not reserve enough space for 2097152KB object heap
      
      C:\Users\Nick\Documents\Fun Stuff\Minecraft\Server>java -Xmx3G -jar server.jar --nogui
      Error occurred during initialization of VM
      Could not reserve enough space for 3145728KB object heap
      
      C:\Users\Nick\Documents\Fun Stuff\Minecraft\Server>java -Xmx4G -jar server.jar --nogui
      Invalid maximum heap size: -Xmx4G
      The specified size exceeds the maximum representable size.
      Error: Could not create the Java Virtual Machine.
      Error: A fatal exception has occurred. Program will exit.

      Let me know if there's any more information I can provide

            Unassigned Unassigned
            Smithy876 Nick Smith
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: