Wildfly 18 deploying war error - java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://hostname:port

1.7k Views Asked by At

I am deploying a war in my wildfly 18 server with below command -

$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=$HOSTNAME:$PORT --user=**** --password=****

Values for JBOSS_HOME, HOSTNAME and PORT were passed correct as per need, but I am getting this below error after running this -

Failed to connect to the controller: The controller is not available at hostname:port: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://hostname:port. The connection failed: WFLYPRT0053: Could not connect to remote+http://hostname:port. The connection failed: Invalid response

here port is the management-native port + offset, which are also properly defined in my standalone-ha.xml-

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:20}">
        <socket-binding name="ajp" port="45001"/>
        <socket-binding name="http" port="41001"/>
        <socket-binding name="https" port="41201"/>
        <socket-binding name="management-http" interface="public" port="${jboss.management.http.port:51000}"/>
        <socket-binding name="management-https" interface="public" port="${jboss.management.https.port:51200}"/>
        <socket-binding name="management-native" interface="public" port="${jboss.management.native.port:43001}"/>
        .....
    </socket-binding-group>

Can someone help me on this as I am new to wildfly 18 that what I am missing out here? My wildfly server is up and running, i am able to deploy my war from admin console of wildfly but getting error in putty(Linux).

2

There are 2 best solutions below

3
On

If you are using http+remote you should connect to management-http port and not the management-native one

0
On

Try connecting to port 51020 As you have given offset of 20 and your management-http port is 51000.