Appendix A. Reference Material

A.1. Management CLI Startup Arguments

The following table lists the arguments that can be passed into the jboss-cli script to launch the management CLI.

Table A.1. Management CLI Arguments

ArgumentDescription

--bind

Specifies to which address the CLI is going to be bound to. If none is provided then the CLI will choose one automatically as needed.

--command

Specifies a single command or an operation that should be executed in the CLI session. The CLI will terminate the session immediately after the command or the operation has been executed.

--command-timeout

The maximum time, in seconds, to wait for a command to complete. A value of 0 means no timeout. By default, there is no timeout.

--commands

Specifies a comma-separated list (must not contain whitespace) of commands and operations that should be executed in the CLI session. The CLI session will terminate after the last command has been executed or if a command fails.

--connect, -c

Instructs the CLI to connect to the controller on start-up. This avoid having to issue a separate connect command later.

--controller

The default controller host, port, and protocol to connect to when the --connect option is specified upon startup or when the connect command is issued in the management CLI without arguments. The default host is localhost, the default port is 9990, and the default protocol is remote+http. Alternatively, a controller alias containing the host, port, and protocol information can be supplied.

--echo-command

Include the prompt and command in the output for commands executed in non-interactive mode.

--error-on-interact

Disables prompts for security-related input in non-interactive mode. If an input is required to proceed, the CLI process will terminate abruptly with an error.

--file

Specifies the path to a file which contains commands and operations (one per line) that should be executed non-interactively. The CLI will terminate after the last command has been executed or if a command or operation fails.

--gui

Launches a GUI that is built on top of the command-line interface. This GUI is not a supported way to interact with the JBoss EAP management CLI and should only be used to view configuration and help build CLI commands.

--help, -h

Displays the help message.

--no-color-output

Disable CLI output and prompt colors.

--no-local-auth

Disables the local authentication mechanism which allows the CLI to demonstrate that it is being executed locally to the server being managed through an exchange of tokens using the file system.

--no-output-paging

Disables output paging, which is when the management CLI pauses after a page of output has been displayed, allowing you to browse and search the output. When this option is specified, the entire output is printed immediately.

--output-json

Displays operation responses in pure JSON format. By default, operation responses are displayed in DMR format.

--password, -p

Specifies the password for authentication while connecting to the controller. If the argument is not specified and authentication is required, then the user will be prompted to enter the password when the connect command is issued.

--properties

Specifies a path to a properties file that contains property value pairs to define system properties. The properties file uses a standard KEY=VALUE syntax.

--resolve-parameter-values

Resolve system properties specified as command argument values or operation parameter values before sending the operation request to the controller.

--timeout

Specifies the time, in milliseconds, to wait for a connection to succeed. The default is 5000.

--user, -u

Specifies the user name if the controller requires user authentication. If the argument is not specified and authentication is required, then the user will be prompted to enter the user name when the connect command is issued. Local authentication is automatically disabled if a user is specified.

--version

Displays the application server version and environment information.

A.2. Management CLI Batch Mode Commands

This table provides a list of commands that can be used with the management CLI to work with batches.

Table A.2. Management CLI Batch Mode Commands

Command NameDescription

clear-batch

Removes all the existing command lines from the currently active batch.

discard-batch

Discards the currently active batch and exits batch mode.

edit-batch-line

Edit a line in the current batch by providing the line number to edit and the edited command. For example: edit-batch-line 2 data-source disable --name=ExampleDS.

holdback-batch

Postpone or store a current batch. Using this command without arguments creates an unnamed heldback batch. To return to this heldback batch, simply type batch again at the CLI command line. There can be only one unnamed heldback batch.

You can optionally provide a name under which to store the batch by using the holdback_name argument. To return to the named batch, pass the heldback_name to the batch command.

Use the batch -l command to see a list of all heldback batches.

list-batch

Lists all commands in the currently active batch.

move-batch-line

Re-order the lines in the batch by specifying the line number you want to move as the first argument and its new position as the second argument. For example: move-batch-line 3 1.

remove-batch-line

Removes the batch command at the specified line. For example: remove-batch-line 3.

run-batch

Runs the currently active batch. If the batch executed successfully, the batch will be discarded and the CLI will exit batch mode.

A.3. Management CLI Commands

The following table lists management CLI commands and their purposes. For more usage and argument details, use the --help argument on a specific command.

Table A.3. Management CLI Commands

CommandDescription

alias

Define an alias with the format NAME=VALUE. When no arguments are specified, the list of aliases are displayed.

batch

Starts batch mode by creating a new batch. If there is an unnamed held back batch, it will be reactivated. If there are named held back batches, reactivate by specifying the heldback_name.

cd

Changes to the specified path.

clear

Clears the screen.

command

Allows you to add, remove, and list existing generic type commands. A generic type command is a command that is assigned to a specific node type and which allows you to perform any operation available for an instance of that type. It can also modify any of the properties exposed by the type on any existing instance.

connect

Connects to the controller on the specified host and port using the specified protocol when the management CLI was launched. If not specified, the default host is localhost, the default port is 9990, and the default protocol is http.

connection-factory

Manages connection factories in the messaging-activemq subsystem.

connection-info

Displays information about the current connection to the server.

data-source

Manages datasource configuration in the datasources subsystem.

deployment deploy-file

Deploys an application. Use wildcard (*) to deploy all the applications.

deployment disable

Disables a pre-existing deployment.

deployment enable

Enables a pre-existing deployment.

deployment info

Displays information about an individual deployment or about multiple deployments.

deployment undeploy

Undeploys an application with the specified name.

deployment-overlay

Manage deployment overlays. If no arguments are specified, all existing deployment overlays are listed.

echo

Outputs the specified text to the console.

echo-dmr

Builds a DMR request for the command or operation passed in as the argument and echos in its toString() format.

help

Displays the help message. Can be used with an argument to display help information for a particular command or operation. Use the --commands argument to display a list of available commands.

history

Displays the CLI command history in memory and displays a status of whether the history expansion is enabled or disabled. Can be used with arguments to clear, disable and enable the history as required.

if

Starts if-else control flow.

jdbc-driver-info

Displays information about the installed JDBC drivers.

jms-queue

Manage JMS queues in the messaging-activemq subsystem.

jms-topic

Manage JMS topics in the messaging-activemq subsystem.

ls

Lists the contents of the node path. Use the -l switch to print the result one per line.

module

Add and remove modules. Note that this command is provided as Technology Preview only.

patch

Apply or roll back a patch to the server.

pwd

Prints the full node path of the current working node.

quit

Terminates the command line interface.

read-attribute

Prints the value and, depending on the arguments, the description of the attribute of a managed resource.

read-operation

Displays the description of a specified operation, or lists all available operations if none is specified.

reload

Sends the :reload operation request to the server/domain controller and waits for the controller to close the connection and then it returns the control back to the client.

rollout-plan

Manage stored rollout plans.

run-batch

Runs the currently active batch while in batch mode. While not in batch mode, can use with the --file argument to execute the contents of the file as a batch.

set

Initializes variables with the given names with the specified values.

shutdown

Sends the :shutdown operation request to the server/domain controller and waits for the controller to close the connection.

try

Starts a try-catch-finally control flow.

unalias

Remove the specified alias.

unset

Removes an existing variable with the specified name.

version

Prints the application server version and environment information.

xa-data-source

Manages XA datasource configuration in the datasources subsystem.

A.4. Management CLI Operations

The following table lists management CLI operations that are available at the root level (/). The actual available operations for a particular resource will vary per resource and also depend on the operating mode (standalone server or managed domain).

Operations are invoked using a colon (:). The available operations for a resource can be exposed by using the read-operation-names operation or by using tab completion after a colon. Operation descriptions can be displayed by using the read-operation-description operation. For example:

:read-operation-description(name=write-attribute)

Table A.4. Management CLI Operations

Operation NameDescription

add-namespace

Adds a namespace prefix mapping to the namespaces attribute’s map.

add-schema-location

Adds a schema location mapping to the schema-locations attribute’s map.

clean-obsolete-content

Clean contents that are no longer referenced from the content repository.

delete-snapshot

Deletes a snapshot of the server configuration from the snapshots directory.

full-replace-deployment

Adds previously uploaded deployment content to the list of content available for use, replace existing content of the same name in the runtime, and remove the replaced content from the list of content available for use.

list-add

Add an entry to a list attribute.

list-clear

Clear all entries from a list attribute.

list-get

Get an entry from a list attribute.

list-remove

Remove an entry from a list attribute.

list-snapshots

Lists the snapshots of server configurations saved in the snapshots directory.

map-clear

Clear all entries from a map attribute.

map-get

Get an entry from a map attribute.

map-put

Add an entry to a map attribute.

map-remove

Remove an entry from a map attribute.

product-info

Returns a summary of the current server installation.

query

Query a resource.

read-attribute

Displays the value of an attribute for the selected resource.

read-attribute-group

Displays the value of attributes for the selected group.

read-attribute-group-names

Displays the names of all the attribute groups under the selected resource.

read-children-names

Displays the names of all children under the selected resource with the given type.

read-children-resources

Displays information about all of a resource’s children that are of a given type.

read-children-types

Displays the type names of all the children under the selected resource.

read-config-as-xml

Displays the current configuration in XML format.

read-operation-description

Displays the details of an operation for the given resource.

read-operation-names

Displays the names of all available operations for the given resource.

read-resource

Displays a resource’s attribute values along with either basic or complete information about any child resources.

read-resource-description

Displays the description of a resource’s attributes, types of children and operations.

reload

Reloads the server by shutting all services down and restarting.

reload-servers

Reloads all servers currently running in the domain.

remove-namespace

Removes a namespace prefix mapping from the namespaces attribute map.

remove-schema-location

Removes a schema location mapping from the schema-locations attribute map.

replace-deployment

Replace existing content in the runtime with new content. The new content must have been previously uploaded to the deployment content repository.

resolve-expression

Accepts an expression as input (or a string that can be parsed into an expression), and resolves it against the local system properties and environment variables.

resolve-expression-on-domain

Accepts an expression as input (or a string that can be parsed into an expression) and resolves it against the local system properties and environment variables on all servers in the domain.

resolve-internet-address

Takes a set of interface resolution criteria and finds an IP address on the local machine that matches the criteria, or fails if no matching IP address can be found.

restart-servers

Restarts all servers currently running in the domain.

resume

Resumes normal operations in a suspended server.

resume-servers

Resumes processing on all servers in the domain.

shutdown

Shuts down the server with a call to System.exit(0).

start-servers

Starts all configured servers in the managed domain that are not currently running.

stop-servers

Stops all servers currently running in the managed domain.

suspend

Suspends server operations gracefully. All current requests will complete normally, however no new requests will be accepted.

suspend-servers

Suspends all servers in the domain. All current operations will finish and no new operations will be allowed.

take-snapshot

Takes a snapshot of the server configuration and saves it to the snapshots directory.

undefine-attribute

Sets the value of an attribute of the selected resource to undefined.

upload-deployment-bytes

Indicates that the deployment content in the included byte array should be added to the deployment content repository. Note that this operation does not indicate the content should be deployed into the runtime.

upload-deployment-stream

Indicates that the deployment content available at the included input stream index should be added to the deployment content repository. Note that this operation does not indicate the content should be deployed into the runtime.

upload-deployment-url

Indicates that the deployment content available at the included URL should be added to the deployment content repository. Note that this operation does not indicate the content should be deployed into the runtime.

validate-address

Checks whether a resource with the specified address exists.

validate-operation

Validates that an operation is valid according to its description. Any errors present will be shown in the operation’s failure-description.

whoami

Returns the identity of the currently authenticated user.

write-attribute

Sets the value of an attribute for the selected resource.

A.5. Resource Attribute Details

The read-resource-description operation displays a resource’s attributes and the details about the attribute. The following table lists the possible fields that might be returned, depending on whether it is relevant for the attribute.

Table A.5. Resource Attribute Details

FieldDescription

access-type

Whether an attribute can only be read, can be read and written, or is a metric. Valid values are read-only, read-write, and metric. A metric is a read-only attribute, where the value is not stored in the persistent configuration and can change due to activity on the server.

allowed

The list of valid values.

alternatives

Defines an exclusive relationship between attributes. If this attribute’s value is set, the attributes listed in the alternatives field should be undefined, even if those attributes state that they are required.

capability-reference

Indicates that this attribute’s value specifies the dynamic portion of the name of the specified capability provided by another resource. This indicates the attribute is a reference to another area of the management model.

default

The default value to use for the attribute if a value is not provided.

description

The text description of the attribute.

deprecated

Whether this attribute is deprecated. It also provides the version that it was deprecated in and reason for the deprecation.

expressions-allowed

Whether the attribute’s value can be an expression.

max

The maximum value of a numeric attribute.

max-length

The maximum length of an attribute of type STRING, LIST, or BYTES.

min

The minimum value of a numeric attribute.

min-length

The minimum length of an attribute of type STRING, LIST, or BYTES.

nillable

Whether it is allowed for the attribute to not have a defined value. An attribute can be undefined either because it is not required or because it is required but has alternatives and an alternative is defined. This field helps users easily understand whether they need to account for the possibility of an undefined value.

required

Whether the attribute must have a defined value. If true, a value must be defined or an alternative must be defined. If false, the value may be undefined.

requires

Indicates that, if this attribute has a defined value, the attributes defined in this list must also have a value.

restart-required

Defines which services must be restarted upon execution of a write-attribute operation. This field allows the following values.

  • no-services - No services must be restarted.
  • all-services - All services must be restarted.
  • resource-services - Some services associated with the resource must be restarted.
  • jvm - The entire JVM must be restarted.

storage

Whether the attribute’s value is stored in the persistent configuration file or only exists as long as the resource is running. The value can be either configuration or runtime.

type

The type of the attribute’s value. The allowed values are BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BYTES, DOUBLE, INT, LIST, LONG, OBJECT, PROPERTY, and STRING.

value-type

Defines additional type information for attributes of type LIST or OBJECT. A value-type of INT for a LIST attribute is analogous to a Java List<Integer>. A value-type of STRING for an OBJECT attribute is analogous to a Java Map<String, String>. If all elements in an OBJECT attribute are not of the same type, the value-type represents a fully-defined complex object that defines that object’s fields and values.

unit

The unit of the attribute’s value, if appropriate.





Revised on 2019-12-05 13:41:15 UTC