I am unable to connect to a minecraft server hosted on an Ubuntu machine (16.04) from a computer on the same local network (Windows 7). Attempting to connect to either the local network IP of the server or to connect via external IP returns the same error: "Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host".

The server runs on the Ubuntu machine via the terminal command sudo java -Xmx2G -Xms2G -jar /minecraft/minecraft_server.1.11.2 -nogui. The server seems to run with no problems. latest.log (server) is below.

The minecraft client is the same version: 1.11.2. It connects to other minecraft servers with no problems. latest.log (client) is below.

Both computers are assigned IP addresses on the local network, and port 25565 is set as the default port for the server and forwarded in the router settings to the Ubuntu machine. I also have a ufw rule allowing connections through it.

The computers can talk to each other normally. I have a samba fileshare set up between them, and I can ssh into the Ubuntu machine from the Windows machine via both the local network and my external IP.

The Ubuntu machine is running the newest version of Java.

My router lacks a "hardware acceleration" option, or anything analogous.

I've really got no more solutions here. If people have suggestions, I'm open to them.

latest.log (server)

[16:00:40] [Server thread/INFO]: Starting minecraft server version 1.11.2
[16:00:40] [Server thread/INFO]: Loading properties
[16:00:40] [Server thread/INFO]: Default game type: SURVIVAL
[16:00:40] [Server thread/INFO]: Generating keypair
[16:00:40] [Server thread/INFO]: Starting Minecraft server on *:25565
[16:00:41] [Server thread/INFO]: Using epoll channel type
[16:00:42] [Server thread/INFO]: Preparing level "world"
[16:00:42] [Server thread/INFO]: Preparing start region for level 0
[16:00:43] [Server thread/INFO]: Preparing spawn area: 33%
[16:00:44] [Server thread/INFO]: Done (1.968s)! For help, type "help" or "?"
[16:11:27] [Server thread/INFO]: Stopping the server
[16:11:27] [Server thread/INFO]: Stopping server
[16:11:27] [Server thread/INFO]: Saving players
[16:11:27] [Server thread/INFO]: Saving worlds
[16:11:27] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
[16:11:27] [Server thread/INFO]: Saving chunks for level 'world'/Nether
[16:11:27] [Server thread/INFO]: Saving chunks for level 'world'/The End
[16:11:27] [Server Shutdown Thread/INFO]: Stopping server
[16:11:27] [Server Shutdown Thread/INFO]: Saving players
[16:11:27] [Server Shutdown Thread/INFO]: Saving worlds

latest.log (client)

[15:59:39] [Client thread/INFO]: Setting user: lolusername
[15:59:39] [Client thread/INFO]: LWJGL Version: 2.9.4
[15:59:40] [Client thread/INFO]: Reloading ResourceManager: Default
[15:59:41] [Sound Library Loader/INFO]: Starting up SoundSystem...
[15:59:41] [Thread-5/INFO]: Initializing LWJGL OpenAL
[15:59:41] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[15:59:41] [Thread-5/INFO]: OpenAL initialized.
[15:59:41] [Sound Library Loader/INFO]: Sound engine started
[15:59:43] [Client thread/INFO]: Created: 1024x512 textures-atlas
[16:00:12] [Client thread/INFO]: Connecting to lol.exter.nal.ip, 25565
[16:00:15] [Server Connector #1/ERROR]: Couldn't connect to server
java.net.ConnectException: Connection refused: no further information: lol.isp.info/lol.exter.nal.ip:25565
    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0_25]
    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716) ~[?:1.8.0_25]
    at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:208) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:287) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:528) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) ~[netty-all-4.0.23.Final.jar:4.0.23.Final]
    at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_25]
[16:03:04] [Client thread/INFO]: Connecting to, 25565
[16:03:11] [Client thread/INFO]: Connecting to, 25565
[16:05:31] [Client thread/INFO]: Connecting to lol.exter.nal.ip, 25565
[16:06:20] [Client thread/ERROR]: Can't ping mawmawlithy: Internal Exception: java.io.IOException: An existing connection was forcibly closed by the remote host
[16:06:36] [Client thread/INFO]: Connecting to lol.exer.nal.ip, 25565
[16:06:39] [Client thread/INFO]: Connecting to mawmawlithy, 25565
[16:09:49] [Client thread/INFO]: Connecting to lol.exter.nal.ip, 25565

*note: "mawmawlithy" is friendly name of ubuntu machine. long story, don't ask.


still no clue what caused the problem, but a fresh Ubuntu install solved it. System has gone through a couple more reinstalls (Ubuntu/Lubuntu) and is working with zero issue.


I solved the issue by completely desinstalling my JDK, and reinstalling it. Then I was able to log in and play with no problems.

  • That’s not an optimal solution for sure, but still probably better than OP's full reinstallation. – Ealhad May 16 '17 at 8:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.