JBoss Shutting Down Error: 'Failed to connect to the controller'


JBoss comes with a start and shutdown script bundled in it.

This article covers a situation where the bundled shutdown script is unable to properly shutdown JBoss, forcing the admin to kill the process which is not the appropriate method to shut down.

The solution shared in this article is appropriate when you see an error similar to the following in the JBoss log:

Failed to connect to the controller: The controller is not available at java.net.ConnectException: WFLYPRT0053: Could not connect to http-remoting:// The connection failed: WFLYPRT0053: Could not connect to http-remoting:// The connection failed: XNIO000812: Connection closed unexpectedly

Important Note: If you are unsure about securely performing the steps mentioned in this article, always make a backup before making any changes or reach out to support for more help.

Root Cause

Incorrect values for port or hostname or both in JBoss can cause this error.


 Follow these steps to resolve this issue:

  1. Locate standalone.XML file in <JBoss Installation Directory>/bin/Standalone/.

  2. Open the file and locate the following lines and take note of the <HostName> value:

    <interface name="management"> 
    <inet-address value="${jboss.bind.address.management:<HostName>}"/> 
  3. Locate the following line and take note of the <port> value:
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:<Port>}"/>

  4. Execute the following command with the <HostName> and <port> values as noted earlier:
    jboss-cli.sh -c --controller=remote://<HostName>:<Port> --command=":shutdown()" 


JBoss should shut down properly after fixing the hostname and port number values.

Related Articles



Please sign in to leave a comment.