I'm trying to shut down WildFly 9.0.2 with a script (Windows Server). Everything I have read online point to the same command:

jboss-cli.bat --controller=localhost:9990 --connect --command=:shutdown

When I run this (even as Admin), I get the following error:

Failed to connect to the controller: 
The controller is not available at localhost:9990: 
java.net.ConnectException: WFLYPRT0053: 
Could not connect to http-remoting://localhost:9990. 
The connection failed: Connection refused! no further information

I have tried variations like replacing localhost with the fully qualified hostname, the IP address, etc. I have also tried passing in user/pass with --user=myuser --pass=mypass.

Thing is, I am 99.999% sure this worked a couple years ago on the same machine. Nothing has changed that I am aware of.

The following is my jbos-cli.xml:

<?xml version='1.0' encoding='UTF-8'?>

WildFly Command-line Interface configuration.
<jboss-cli xmlns="urn:jboss:cli:2.0">

    <default-protocol use-legacy-override="true">http-remoting</default-protocol>

    <!-- The default controller to connect to when 'connect' command is executed w/o arguments -->

    <!-- Example controller alias named 'Test'  
        <controller name="Test">


    <!-- Command and operation history log configuration -->

    <!-- whether to resolve system properties specified as command argument or operation parameter values
                in the CLI VM before sending the operation requests to the controller -->

    <!-- Whether to write info and error messages to the terminal output -->

    <!-- Whether to filter out commands and attributes based on user's permissions -->

WildFly is running and I can successfully connect to the web console using SSL and 9993. The following are my port configs in standalone.xml:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
    <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
    <socket-binding name="http" port="${jboss.http.port:8080}"/>
    <socket-binding name="https" port="${jboss.https.port:9443}"/>
    <socket-binding name="iiop" interface="unsecure" port="3528"/>
    <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>

Any ideas on what I'm doing wrong?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.