Uploaded image for project: 'Openfire'
  1. Openfire
  2. OF-1956

Restarting s2s may fail with Error starting: 5269 Address already in use (Bind failed)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.5.0
    • Component/s: Core
    • Labels:
      None

      Description

      Openfire may sometimes attempt to restart its s2s port when certain config changes are made or perhaps updated SSL certs are configured.  This restart appears to be brittle and various latency / race conditions could cause this operation to fail like so:

       

       

      2019.12.27 19:31:18 org.jivesoftware.openfire.spi.LegacyConnectionAcceptor - Error starting: 5269java.net.BindException: Address already in use (Bind failed)        at java.net.PlainSocketImpl.socketBind(Native Method) ~[?:1.8.0_222]        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387) ~[?:1.8.0_222]        at java.net.ServerSocket.bind(ServerSocket.java:375) ~[?:1.8.0_222]        at java.net.ServerSocket.<init>(ServerSocket.java:237) ~[?:1.8.0_222]        at org.jivesoftware.openfire.net.BlockingAcceptingMode.<init>(BlockingAcceptingMode.java:41) ~[xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.net.SocketAcceptThread.<init>(SocketAcceptThread.java:54) ~[xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.spi.LegacyConnectionAcceptor.start(LegacyConnectionAcceptor.java:54) [xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.spi.ConnectionListener.start(ConnectionListener.java:226) [xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.spi.ConnectionListener.restart(ConnectionListener.java:325) [xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.spi.ConnectionListener.setAcceptSelfSignedCertificates(ConnectionListener.java:757) [xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]        at org.jivesoftware.openfire.admin.connection_002dsettings_002dadvanced_jsp._jspService(connection_002dsettings_002dadvanced_jsp.java:263) [xmppserver-4.5.0-SNAPSHOT.jar:4.5.0-SNAPSHOT]
      

       
      Perhaps the restarting code should wait a bit on shutdown before attempting to start up the listener again.

        Attachments

          Activity

            People

            Assignee:
            guus Guus der Kinderen
            Reporter:
            akrherz Daryl Herzmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: