Jump to content

Java Error "Exception handling console input java.io.IOException: The handle is invalid"

AAura
Go to solution Solved by Prodigy_Smit,
2 minutes ago, AAura said:

Edit 2: The server also does not have Windows Activated which may be the issue?

Not the issue. But are you sure you have java 64bit installed?

I am trying to run a Minecraft server on one of my computers and keep getting an error. The server works fine on my main PC but not on the server PC. Everything is exactly the same except the Java version is newer on the server. I am using the ZeroTier One API to create a virtual network. This works fine on the desktop but not the server.

 

My network is set up as follows, and then i have pasted the full error log (with my IP redacted). If anyone has experience with Java or Minecraft servers could you please suggest a fix as i have looked pretty much everywhere!

Only the things in bold could be a problem, but i included the full network.

 

NBN Moden > Nighthawk Router > TP Link Powerline Adapater (from 1 cable to 3 pc's, never had an issue with it) > Dlink Network Switch > PC & Server PC

 

Full pasted error:

 

[04:34:56] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[04:34:56] [main/WARN]: Ambiguity between arguments [teleport, location] and [teleport, targets] with inputs: [0.1 -0.5 .9, 0 0 0]
[04:34:56] [main/WARN]: Ambiguity between arguments [teleport, targets] and [teleport, destination] with inputs: [Player, 0123, dd12be42-52a9-4a91-a8a1-11c01849e498]
[04:34:56] [main/WARN]: Ambiguity between arguments [teleport, targets, location] and [teleport, targets, destination] with inputs: [0.1 -0.5 .9, 0 0 0]
[04:34:56] [main/INFO]: Reloading ResourceManager: Default
[04:34:56] [Worker-Main-5/INFO]: Loaded 7 recipes
[04:34:56] [Worker-Main-5/INFO]: Loaded 927 advancements
[04:34:58] [Server thread/INFO]: Starting minecraft server version 1.16.1
[04:34:58] [Server thread/WARN]: To start the server with more ram, launch it as "java -Xmx1024M -Xms1024M -jar minecraft_server.jar"
[04:34:58] [Server thread/INFO]: Loading properties
[04:34:58] [Server thread/INFO]: Default game type: SURVIVAL
[04:34:58] [Server thread/INFO]: Generating keypair
[04:34:58] [Server console handler/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 yd$1.run(SourceFile:90) [server.jar:?]
[04:34:58] [Server thread/INFO]: Starting Minecraft server on x.x.x.x:25565 (Redacted)
[04:34:58] [Server thread/INFO]: Using default channel type
[04:34:58] [Server thread/INFO]: Preparing level "world"
[04:34:59] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:02] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:04] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:04] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:04] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:04] [Server thread/INFO]: Preparing spawn area: 0%
[04:35:07] [Server thread/INFO]: Time elapsed: 8133 ms
[04:35:07] [Server thread/INFO]: Done (8.221s)! For help, type "help"

Link to comment
Share on other sites

Link to post
Share on other sites

Edit: When running the server through a bat file and using pause as a paramater, this is the message:

 

C:\Users\Dedicated-Server\Desktop\1.16.1 PORT>java -Xmx2048M -Xms2048M -jar server.jar nogui
Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

 

C:\Users\Dedicated-Server\Desktop\1.16.1 PORT>pause
Press any key to continue . . .

Link to comment
Share on other sites

Link to post
Share on other sites

Edit 2: The server also does not have Windows Activated which may be the issue?

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, AAura said:

Edit 2: The server also does not have Windows Activated which may be the issue?

Not the issue. But are you sure you have java 64bit installed?

I will recommend an NHu12s (or an NHd15 (maybe)) for your PC build. Quote or @ me @Prodigy_Smit for me to see your replies.

PSU Teir List | Howdy! A Windows Hello Alternative 

 

 

Desktop :

i7 8700 | Quadro P4000 8GB |  64gb 2933Mhz cl18 | 500 GB Samsung 960 Pro | 1tb SSD Samsung 850 evo

Laptop :

ASUS G14 | R9 5900hs | RTX 3060 | 16GB 3200Mhz | 1 TB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

@AAura also can you send the text in your server.properties file?

I will recommend an NHu12s (or an NHd15 (maybe)) for your PC build. Quote or @ me @Prodigy_Smit for me to see your replies.

PSU Teir List | Howdy! A Windows Hello Alternative 

 

 

Desktop :

i7 8700 | Quadro P4000 8GB |  64gb 2933Mhz cl18 | 500 GB Samsung 960 Pro | 1tb SSD Samsung 850 evo

Laptop :

ASUS G14 | R9 5900hs | RTX 3060 | 16GB 3200Mhz | 1 TB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Smit Devrukhkar said:

@AAura also can you send the text in your server.properties file?

#Minecraft server properties
#Fri Jul 24 21:23:57 AEST 2020
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
sync-chunk-writes=true
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=easy
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
entity-broadcast-range-percentage=100
snooper-enabled=true
level-type=default
hardcore=false
enable-status=true
enable-command-block=false
max-players=20
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
function-permission-level=2
rcon.port=25575
server-port=25565
server-ip=x.x.x.x
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
max-build-height=256
online-mode=true
level-seed=
use-native-transport=true
prevent-proxy-connections=false
enable-jmx-monitoring=false
enable-rcon=false
motd=A Minecraft Server

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Smit Devrukhkar said:

@AAura also can you send the text in your server.properties file?

@Smit Devrukhkar I might actually have the wrong Java. Ill test. 1 sec.

Link to comment
Share on other sites

Link to post
Share on other sites

@AAura first check the java thing? second remove your ip for this server-ip=x.x.x.x mincraft server auto binds to your system's ip by default and it may cause problems.

If that does not work just copy these settings in the server.properties file.

 

#Minecraft server properties
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
sync-chunk-writes=true
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=easy
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
entity-broadcast-range-percentage=100
snooper-enabled=true
level-type=default
hardcore=false
enable-status=true
enable-command-block=false
max-players=7
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
function-permission-level=2
rcon.port=25575
server-port=25565
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
max-build-height=256
online-mode=true
level-seed=
use-native-transport=true
prevent-proxy-connections=false
enable-jmx-monitoring=false
enable-rcon=false
motd=First Day Of Launch

 

I will recommend an NHu12s (or an NHd15 (maybe)) for your PC build. Quote or @ me @Prodigy_Smit for me to see your replies.

PSU Teir List | Howdy! A Windows Hello Alternative 

 

 

Desktop :

i7 8700 | Quadro P4000 8GB |  64gb 2933Mhz cl18 | 500 GB Samsung 960 Pro | 1tb SSD Samsung 850 evo

Laptop :

ASUS G14 | R9 5900hs | RTX 3060 | 16GB 3200Mhz | 1 TB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Smit Devrukhkar said:

@AAura first check the java thing? second remove your ip for this server-ip=x.x.x.x mincraft server auto binds to your system's ip by default and it may cause problems.

If that does not work just copy these settings in the server.properties file.

 

#Minecraft server properties
spawn-protection=16
max-tick-time=60000
query.port=25565
generator-settings=
sync-chunk-writes=true
force-gamemode=false
allow-nether=true
enforce-whitelist=false
gamemode=survival
broadcast-console-to-ops=true
enable-query=false
player-idle-timeout=0
difficulty=easy
spawn-monsters=true
broadcast-rcon-to-ops=true
op-permission-level=4
pvp=true
entity-broadcast-range-percentage=100
snooper-enabled=true
level-type=default
hardcore=false
enable-status=true
enable-command-block=false
max-players=7
network-compression-threshold=256
resource-pack-sha1=
max-world-size=29999984
function-permission-level=2
rcon.port=25575
server-port=25565
server-ip=
spawn-npcs=true
allow-flight=false
level-name=world
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=
generate-structures=true
max-build-height=256
online-mode=true
level-seed=
use-native-transport=true
prevent-proxy-connections=false
enable-jmx-monitoring=false
enable-rcon=false
motd=First Day Of Launch

 

@Smit Devrukhkar Oh my god, that actually fixed it. You are a legend. Someone please mod you 🤣

 

And the IP was just x.x.x.x cause i took it out for sending.

Link to comment
Share on other sites

Link to post
Share on other sites

@AAura no problem. You have no idea how long I was searching the internet for the problem when I first started a server. I have no idea why java downloads the 32bit version by default.

I will recommend an NHu12s (or an NHd15 (maybe)) for your PC build. Quote or @ me @Prodigy_Smit for me to see your replies.

PSU Teir List | Howdy! A Windows Hello Alternative 

 

 

Desktop :

i7 8700 | Quadro P4000 8GB |  64gb 2933Mhz cl18 | 500 GB Samsung 960 Pro | 1tb SSD Samsung 850 evo

Laptop :

ASUS G14 | R9 5900hs | RTX 3060 | 16GB 3200Mhz | 1 TB SSD

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Smit Devrukhkar said:

@AAura no problem. You have no idea how long I was searching the internet for the problem when I first started a server. I have no idea why java downloads the 32bit version by default.

I was literally wondering why the download was only 1mb originally, such a stupid default option.

Link to comment
Share on other sites

Link to post
Share on other sites

Guest
This topic is now closed to further replies.

×