java.io.IOException: An existing connection was forcibly closed by the remote host

  • For about two weeks I have been getting this error.I have wiped the server numerous time added add-ons taken them away.Right now this is a vanilla server.The main reason I am concerned about this error is sooner than later a person will try to log on the server get stuck at 10 percent and the only fix is to restart the server.I mentioned this before and did not receive any usable help.Red asked for the Server logs which I pm him.I have to admit since I started to host RW I said DAY ONE will always be but this has gotten me sofrustrated that statement no longer may be true.Please adviseORED TO CACHECreate WorldPartSQLite -1 12...Worldpart generating...Biomepart generating...biomepart offset -1 6 -> 29 17 (-875192156, -218798039)Biomepart (0) generated: -1 - 6 (96ms)BIOMEPART -1 6 STORED TO CACHECavePoints: 382326DungeonPoints: 768Worldpart generated: -1 - 12 (1120ms)Create WorldPartSQLite -2 11...Worldpart generating...WORLDPART -1 12 STORED TO CACHECavePoints: 398160DungeonPoints: 738Worldpart generated: -2 - 11 (1101ms)Create WorldPartSQLite -2 12...Worldpart generating...CavePoints: 394590DungeonPoints: 708WORLDPART -2 11 STORED TO CACHEWorldpart generated: -2 - 12 (1135ms)WORLDPART -2 12 STORED TO CACHECLIENT 2 CHANGE STATE: Connected -> DisconnectingCLIENT 2 CHANGE STATE: Disconnecting -> DisconnectedREMOVE: de.jiw.network.server.session.ClientConnection@2c28e803 - 2 - 0[TcpSessionHandler ChannelInactive] /50.101.44.56:57853[TcpSessionHandler ChannelInactive] /50.101.44.56:57919[TcpSessionHandler ChannelInactive] /50.101.44.56:578862018/07/13 04:32 AM G.fINFO: Delete Client ID: 2[EndAuthSession] 389660853[TcpSessionHandler ChannelInactive] /50.101.44.56:57820... (1) ChunkAdditions saved to DB!... (1) ChunkAdditions saved to DB!... (1) ChunkAdditions saved to DB!... (1) ChunkAdditions saved to DB!... (1) ChunkAdditions saved to DB![TcpSessionHandler] NEW Client Connection from:/218.101.97.65:63843 de.jiw.network.server.session.TcpSessionHandler@627cdd1 PORT:4255/218.101.97.65CLIENT 5 CHANGE STATE: Disconnected -> ConnectingTCP[TcpSessionHandler] NEW Client Connection from:/218.101.97.65:63909 de.jiw.network.server.session.TcpSessionHandler@41baa506 PORT:4256[TcpSessionHandler] NEW Client Connection from:/218.101.97.65:63975 de.jiw.network.server.session.TcpSessionHandler@399e84a9 PORT:4257[TcpSessionHandler] NEW Client Connection from:/218.101.97.65:64040 de.jiw.network.server.session.TcpSessionHandler@6d93b03 PORT:4258CLIENT 5 CHANGE STATE: ConnectingTCP -> ConnectingUDPCLIENT 5 CHANGE STATE: ConnectingUDP -> Connected2018/07/13 05:02 AM G.fINFO: Client Connected ID: 5 IP: 218.101.97.65PLAYER REQUEST AUTHENTICATION 5SERVER START VERIFICATION OF CLIENT PhartBlastClient 5 send ReturnAuthenticationMessagePLAYER CONNECT: PhartBlastCREATEPLAYER: PhartBlast (76561198281861142)LOADPLAYER: PhartBlast (76561198281861142)clear temporary voxel maps... (1, 1) Chunks saved to DB!... (1, 1) Chunks saved to DB!... (1, 1) Chunks saved to DB!CLIENT 5 CHANGE STATE: Connected -> DisconnectingCLIENT 5 CHANGE STATE: Disconnecting -> DisconnectedREMOVE: de.jiw.network.server.session.ClientConnection@4a8ebe87 - 5 - 0[TcpSessionHandler ChannelInactive] /218.101.97.65:64040[TcpSessionHandler ChannelInactive] /218.101.97.65:63909[TcpSessionHandler ChannelInactive] /218.101.97.65:639752018/07/13 05:07 AM G.fINFO: Delete Client ID: 5[TcpSessionHandler ChannelInactive] /218.101.97.65:63843... (1) ChunkAdditions saved to DB!... (1) ChunkAdditions saved to DB!
    java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.read0(Native Method) at sun.nio.ch.SocketDispatcher.read(Unknown Source) at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) at sun.nio.ch.IOUtil.read(Unknown Source) at sun.nio.ch.SocketChannelImpl.read(Unknown Source) at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1106) at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:343) at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138) at java.lang.Thread.run(Unknown Source)

    DEATH AND DESTRUCTION PVP
    192.154.229.151:4255


  • It is a shot in the total dark, but from the log it could be like the RW server trying to read from a file (or folder) which either does not exists or it has no permission to access, as if RW server set-up was not correct / complete.


    But of course, this is really a wild guess.


    P.S.: next time, please attach the log rather then pasting it into the main post, as lines are all scrambled...

  • @red51 may I respectfully request that you engage with this issue. I am unable to play on the mentioned server while this problem persists, and am rather disappointed that I can't.
    I note that I have experienced this issue on other servers also (log off then stuck at 10% and can't get back in until server is restarted) so it is not unique to Icon58.
    Various players along with admin have expended much effort in trying to resolve this matter and now are quite dependent on your advice and assistance.


    TIA


    Regards PB

    Incurably addicted to Rising World

  • I am having the same issue. Although, this is just a test server I am running from home. The Java IO Exceptions are at the bottom of my log file.
    So far, this has only occurred when I have logged off of the server and leave it running. I have not had the server shut down while I am logged in.
    Hope this helps.


    Log file attached.


    V.G.

  • Sorry for the late response! Basically the message An existing connection was forcibly closed by the remote host means that the other side (in this case the client) closed the connection unexpectedly. It's a very general error message and doesn't provide any information about what went wrong. Possible reasons why this error occurs:

    • There is a connection issue between the client and the server. It could be either the client connection or the server connection which causes trouble
    • The client sends malformed data to the server, either caused by other programs (security programs) or connection issue

    It's also possible that there is a completely different issue which isn't even related to the networking. If the client gets stuck in the loading screen, and cancels the loading process (or quits the game), this could also result in this error message.


    Another situation where this error can occur is when a client simply disconnects. Since we use several channels (and every channel runs in a separate thread), there is a chance that this error shows up when the client disconnects while the server still sends/receive data to/from the client. Basically this error is harmless and can be ignored in this case (if we want to avoid it, it would be necessary to synchronize the traffic, which would have a negative impact on performance - so there is really no reason to do that).


    A clientside log will likely provide more information about what's going on. If only few players run into this issue, this might be a clientside issue, if the majority of players experience this problem, it might be a serverside thing.


    @ViralGamer: What happened exactly in your case? Did you only see the error message in the logs without actually having any noticeable problems, or do you get stuck in the loading screen (or something like that)?

  • @red51 I have only experienced this issue a few minutes after I exit the game with no other players on the server, then leave my server running. I have seen no other effects in game, or trying to get in game. Although, I was able to log back into a session after this error had occurred, but the database would no longer update. I ended up just restarting my server.


    VG


    FYI: I was able to resolve this issue by changing to an older version of Java SE. Doesn't identify the problem. But, at least fixed it for me.

    Edited once, last by ViralGamer: Sorry, to necro and old post. But, I wanted to follow up. ().

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!