How to Connect to Wildfly Administration Console via Command Line

Posted on

Introduction

This is an article for showing how to connect to Wildfly Administration Console. It is very simple for connecting to Wildfly Administration Console. The process occurs in a command line interface. The following is the actual process for connecting to Wildfly Administration Console. There are several ways to connect to the Wildfly Administration Console. The connection can be done via web-based administration console. But the connection can also be done via command line. The context of this article is focusing the connection to Wildfly Administration Console occurs in the command line interface. Therefore, performing the execution to connect to the Wildfly Administration Console must be in the command line.

Command Execution

Below are ways for connecting Wildfly Administration Console via command line :

1. Executing command line script. The script exist in the Wildfly folder installation. The following is the command execution in the command line using Wildfly version 17.0.1 :

user@hostname:~$ /opt/wildfly-17.0.1.Final/bin/jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] 

After successfully execute the Wildfly Command Console, execute the following command to connect to Wildfly Administration Console :

The command for connecting to Wildfly Administration Command Console exist as follows :

connect

The execution of the above command in Wildfly Command Console in the real environment is in the following output command :

[disconnected /] connect
Authenticating against security realm: ManagementRealm

Username: admin
Password: 
[standalone@localhost:9990 /]

If the above output appears, it means the connection process is a success.

2. There is another way for connecting to Wildfly Administration Console. The execution of the command only need one single line. The following is the syntax pattern of the command using Wildfly version 17.0.1 in one single line :

/opt/wildfly-17.0.1.Final/bin/jboss-cli.sh --connect --controller=127.0.0.1:9990

The following is the execution of the above command pattern to connect directly to Wildfly Command Console in one single line of command a pattern for connecting to Wildfly Command Console :

           
user@hostname:~$ /opt/wildfly-17.0.1.Final/bin/jboss-cli.sh --connect --controller=127.0.0.1:9990
Authenticating against security realm: ManagementRealm
Username: admin
Password: 
[standalone@127.0.0.1:9990 /] 

Those are a simple ways to connect to Wildfly Administration Console via command line. After successfully connecting to the Wildfly Administration Console via command line, there are various commands available to manage Wildfly operation further.

Leave a Reply