CLI command to check deployment status in JBoss EAP

Solution Verified - Updated -

Environment

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

Issue

  • How to check if the deployment succeeded or not in JBoss EAP 6 using CLI interface.
  • We have a requirement to verify that all EARs within a domain are started. What is the best way to get that information?
  • How to run a health check of a deployed app via the command line

Resolution

  • To check the deployment status of the application use following CLI command:

For standalone Mode

[standalone@localhost:9999 /] deployment-info --name=Test_App.war           
NAME          RUNTIME-NAME  PERSISTENT ENABLED STATUS 
Test_App.war  Test_App.war  true       true    OK   

or

[standalone@localhost:9999 /] /deployment=Test_App.war:read-attribute(name=status)
{
    "outcome" => "success",
    "result" => "OK"
}

For Domain Mode

[domain@localhost:9999 /] deployment-info --name=Test_App.war  
NAME          RUNTIME-NAME  
Test_App.war  Test_App.war 

SERVER GROUP       STATE   
main-server-group  enabled 
other-server-group enabled 

or

[domain@localhost:9999 /] /host=master/server=server-one/deployment=Test_App.war:read-attribute(name=status)
{
    "outcome" => "success",
    "result" => "OK"
}

Diagnostic Steps

Below are the possible status of the deployment

OK:  indicates that the deploy is up and running.
FAILED:  indicates a dependency is missing or a service could not start.
STOPPED:  indicates that the deployment was not enabled or was manually stopped.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

3 Comments

I verified the given solution and it is giving the expected results.

Is there a way to test for EAP deployment on a windows machine ?

Bennet, absolutely, you can do all of the above in Windows, too. These are commands specific to the jboss-cli and there is both a jboss-cli.sh as well as a jboss-cli.bat. Run the jboss-cli, connect to your server, and try out the commands above.