Fatal error occurred!

  • java.net.bindexception: Address already in use: bind


    and then a load of other stuff


    Server has been working fine for quite some time now, it auto restarts, auto updates and looks after itself.


    This problem seems quite recent and also coincides with problems with my Apache and FTP server crashing on the same machine (which I had assumed was caused by a Windows update).


    Does RW do anything on port 80? or port 21?


    I'm hoping that fixing this will also fix the problems with my Apache and FTP servers.



    Restarting the machine fixes everything, until about 2am the next day and then it all falls over again.

  • java.net.bindexception: Address already in use: bind

    This message indicates that another process already uses one of the server ports (more precisely, ip + port combination), so the server cannot bind to this address. This could either be another program which uses the same ports, or maybe an older server instance which was not shut down properly...


    Does RW do anything on port 80? or port 21?

    No, the server only uses serverport-1 (for http queries), serverport, serverport+1, serverport+2, serverport+3 and serverport+4 (if server port is 4255, the RW server actually uses 4254, 4255, 4256, 4257, 4258 and 4259 TCP and UDP). If RCON is enabled, it also uses a separate port (by default 4253, but the port can be changed in the server.properties file).

  • It's just did it again, the problem is Java related I believe, there remains an instance of Java open after the server stops, with the RW server ports bound (TCPView), this stops the server from starting again and I believe messes up Apache and filezilla when they both restart some time later (everything restarts between 2am and 4am).
    The hung Java process can't be closed, even with taskkill /f, the only way is to completely shutdown and restart the machine.


    All of this seems to have started after the last weeks windows update.




    Also I run my server on a Windows machine at home, this works just fine and has done for a long time despite much turning up of noses. I primarily run a HTTP server and FTP server (personal cloud), but I also like to run vanilla game servers for indy games, (anything not too resource intensive) for anyone who wants to play without all the crazy stuff.

  • It's just did it again, the problem is Java related I believe, there remains an instance of Java open after the server stops, with the RW server ports bound (TCPView)

    How do you restart the server exactly? If you just kill the process, it may take a few seconds (in some cases) until the ports are freed, depending on the network implementation of the OS. If you shutdown the server by using the shutdown command, it also takes a few seconds, since all connections are closed gracefully and the world is saved before the process is terminated.

  • I know very little about Java. Just enough to check updates and be sure they are current. Today I downloaded the latest update Ver. 8 Update 181 (build 1.8.0_181-b13).
    Included was a notice that after Jan. 2019 any gaming commercial builders were going to have to get a commercial license to run Java. And any personal users would be covered until Jan 2020. After Jan 2020 there will be no support for Java 8.
    As said I have no idea what in heck is going on technically. I will ride with it, and keep reading whatever people who know what they are talking about post.

  • How do you restart the server exactly? If you just kill the process, it may take a few seconds (in some cases) until the ports are freed, depending on the network implementation of the OS. If you shutdown the server by using the shutdown command, it also takes a few seconds, since all connections are closed gracefully and the world is saved before the process is terminated.


    I'm running the server in a console window via a .bat file, a second hidden console window runs a monitoring script that watches the internet connection and also runs timed restarts by sending keys "exit" to the RW window, it waits 120 seconds, calls steamcmd update, waits for that to finish and then sends "start" to the same window.


    The .bat file for running the server contains a loop, so when it's stopped it waits for a command and then loops back to the top of the .bat file to start the server again.


    set /p cm=Enter Command:


    if %cm% equ start (
    goto :startrw
    ) else (
    exit
    )


    The reason I did this is because whilst I have a good connection speed, I have a dynamic IP and RW gets really upset if my connection drops and the IP changes, so if my IP changes, the monitoring script initiates a restart before RW server realises anything is wrong.


    As I say, it appears that Java goes nuts and then messes up my other services that use Java, but only those on common ports (21 and 80).

  • ^^ Thanks, im not sure what I can do about it, but if you see at the bottom:



    Quote

    When an administrator tries to stop the World Wide Web Publishing Service (W3SVC), the W3SVC remains in a "stopping" state, but cannot fully stop or be restarted.

    This is effectively what happens to the Apache and FTP servers that are running, I don't run RW as a service, but the effect is the same.


    Unfortunately the fix currently breaks the NIC, which could have knock on effects with other stuff i'm doing, so I think it's a case of waiting for MS to get their house in order, rather than messing with stuff that isn't broken.

  • Appears to be fixed by update KB4345459, which appears to have to be installed manually.


    MS introduced some bug that prevented ports being released properly when shutting down the program using it, causing the program to hang such that it couldn't be closed even by force.

Participate now!

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