Duplicate argument '--command'/'--commands' exception while executing CLI command in JBoss EAP 6 ?

Solution Unverified - Updated -

Issue

We are trying to connect to JBoss EAP instance using the jboss-cli.sh script specifying a username, password, and command on the command line, but it failed with exception

Duplicate argument '--command'/'--commands' 

Can you tell me how to run a command like the following from a non-interactive command line?

$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=host:9999 --command="undeploy" --username=user --password=password
$JBOSS_HOME/bin/jboss-cli.sh --connect --controller=host:9999 --user=user --password=pass  --file /home/cli_input

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.