Mihai Alexandru-Ionut
Mihai Alexandru-Ionut

Reputation: 48437

Cannot connect to Wildfly

I have just installed Wildfly and I tried to connect it :

\wildfly-11.0.0.Final\bin>jboss-cli.bat -c

But gives me follow error :

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

I tried a lot of solutions but it's not working for me.

Upvotes: 14

Views: 57037

Answers (4)

Francesco Marchioni
Francesco Marchioni

Reputation: 4338

The most common case is that there is a mismatch between the default controller defined in jboss-cli.xml and the management port, configured in the standalone.xml/domain.xml. Out of the box, they should converge on localhost:9990. Therefore, verify if you changed any of the two files. Other than that, it could be a firewall/network issue.

See also: Cannot connect to WildFly with CLI

Upvotes: 1

user7023213
user7023213

Reputation: 3670

Jboss must be running while doing this. I was trying to do this while my jboss was not up n running... then i got this error message. So boot up jboss and try again.

Upvotes: 3

SmpathE
SmpathE

Reputation: 51

Got the same error on wildfly version 16

Error

Failed to connect to the controller: The controller is not available at localhost:: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:. The connection failed: Connection refused

And following done and resolved successfully

Step 01

Comment (or you can remove) following line from /bin/jboss-cli.xml

default-protocol use-legacy-override="true">remote+https</default-protocol

Correct protocol Ex:

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

<!-- The default controller to connect to when 'connect' command is executed w/o arguments -->
<default-controller>
    <protocol>remote+http</protocol>
    <host>localhost</host>
    <port>9990</port>
</default-controller>

Step 02

In my case i have alredy created a Administrative user hence, I have statup the CLI with following commnad

./jboss-cli.sh --user="<user>" --password="<password>" --controller=remote+http:<your IP>:<port> --connect

Example :

./jboss-cli.sh --user="Admin" --password="Password" --controller=remote+http://19.199.115.172:9990 --connect

Make sure your wildfly is up and running. If you have used different port for the admin console it should be added .

Upvotes: 5

jordiburgos
jordiburgos

Reputation: 6302

With Widlfly running, i.e. (standalone.bat), use the --controller option to define where it is:

jboss-cli.bat -c --controller=localhost:9990

Upvotes: 10

Related Questions