HOWTO detect when JBOSS is fully up and running and ready to accept deployments?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying



 "WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => "server-group" => "main-server-group" => "host" => "master" => "master-1-server-1" => "WFLYCTL0379: System boot is in process; execution of remote management operations is not currently available"


How can I detect that JBoss is really ready to handle deployments?



Alternatively, is there a mechanism by which I can autodeploy something on startup?










share|improve this question

















  • 1




    Tail the log file, there will be an entry along the line of "startup completed in n seconds".
    – DopeGhoti
    Mar 22 '17 at 15:30










  • @Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
    – user674669
    1 hour ago














up vote
2
down vote

favorite












I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying



 "WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => "server-group" => "main-server-group" => "host" => "master" => "master-1-server-1" => "WFLYCTL0379: System boot is in process; execution of remote management operations is not currently available"


How can I detect that JBoss is really ready to handle deployments?



Alternatively, is there a mechanism by which I can autodeploy something on startup?










share|improve this question

















  • 1




    Tail the log file, there will be an entry along the line of "startup completed in n seconds".
    – DopeGhoti
    Mar 22 '17 at 15:30










  • @Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
    – user674669
    1 hour ago












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying



 "WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => "server-group" => "main-server-group" => "host" => "master" => "master-1-server-1" => "WFLYCTL0379: System boot is in process; execution of remote management operations is not currently available"


How can I detect that JBoss is really ready to handle deployments?



Alternatively, is there a mechanism by which I can autodeploy something on startup?










share|improve this question













I have a simple "sanity-check" webapp that I wish to deploy on a JBoss EAP server as soon as it is started. But what does "started" mean? If my script that calls the jboss cli is launched too soon after JBoss reports it's done, I get a message saying



 "WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => "server-group" => "main-server-group" => "host" => "master" => "master-1-server-1" => "WFLYCTL0379: System boot is in process; execution of remote management operations is not currently available"


How can I detect that JBoss is really ready to handle deployments?



Alternatively, is there a mechanism by which I can autodeploy something on startup?







jboss






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 22 '17 at 14:46









Steve Cohen

18617




18617







  • 1




    Tail the log file, there will be an entry along the line of "startup completed in n seconds".
    – DopeGhoti
    Mar 22 '17 at 15:30










  • @Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
    – user674669
    1 hour ago












  • 1




    Tail the log file, there will be an entry along the line of "startup completed in n seconds".
    – DopeGhoti
    Mar 22 '17 at 15:30










  • @Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
    – user674669
    1 hour ago







1




1




Tail the log file, there will be an entry along the line of "startup completed in n seconds".
– DopeGhoti
Mar 22 '17 at 15:30




Tail the log file, there will be an entry along the line of "startup completed in n seconds".
– DopeGhoti
Mar 22 '17 at 15:30












@Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
– user674669
1 hour ago




@Steve Cohen, did you figure out a better way to know when Jboss is really ready? I have the exact issue. Thank you.
– user674669
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
0
down vote













#!/bin/bash

while true
do
wildflyStarted=$(grep -ic "Wildfly.*started in.*ms.*Started.*of.*services" /opt/wildfly/standalone/log/server.log)
if [[ "$wildflyStarted" -eq "1" ]]; then
break;
else
sleep 1;
fi
done

while true
do
ejbcaStatus=$(/opt/wildfly/bin/jboss-cli.sh -c --commands="cd deployment,cd ejbca.ear,read-attribute status")
if [[ "$ejbcaStatus" -eq "OK" ]]; then
break;
else
sleep 5;
fi
done


This script worked for me.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f353095%2fhowto-detect-when-jboss-is-fully-up-and-running-and-ready-to-accept-deployments%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    #!/bin/bash

    while true
    do
    wildflyStarted=$(grep -ic "Wildfly.*started in.*ms.*Started.*of.*services" /opt/wildfly/standalone/log/server.log)
    if [[ "$wildflyStarted" -eq "1" ]]; then
    break;
    else
    sleep 1;
    fi
    done

    while true
    do
    ejbcaStatus=$(/opt/wildfly/bin/jboss-cli.sh -c --commands="cd deployment,cd ejbca.ear,read-attribute status")
    if [[ "$ejbcaStatus" -eq "OK" ]]; then
    break;
    else
    sleep 5;
    fi
    done


    This script worked for me.






    share|improve this answer
























      up vote
      0
      down vote













      #!/bin/bash

      while true
      do
      wildflyStarted=$(grep -ic "Wildfly.*started in.*ms.*Started.*of.*services" /opt/wildfly/standalone/log/server.log)
      if [[ "$wildflyStarted" -eq "1" ]]; then
      break;
      else
      sleep 1;
      fi
      done

      while true
      do
      ejbcaStatus=$(/opt/wildfly/bin/jboss-cli.sh -c --commands="cd deployment,cd ejbca.ear,read-attribute status")
      if [[ "$ejbcaStatus" -eq "OK" ]]; then
      break;
      else
      sleep 5;
      fi
      done


      This script worked for me.






      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        #!/bin/bash

        while true
        do
        wildflyStarted=$(grep -ic "Wildfly.*started in.*ms.*Started.*of.*services" /opt/wildfly/standalone/log/server.log)
        if [[ "$wildflyStarted" -eq "1" ]]; then
        break;
        else
        sleep 1;
        fi
        done

        while true
        do
        ejbcaStatus=$(/opt/wildfly/bin/jboss-cli.sh -c --commands="cd deployment,cd ejbca.ear,read-attribute status")
        if [[ "$ejbcaStatus" -eq "OK" ]]; then
        break;
        else
        sleep 5;
        fi
        done


        This script worked for me.






        share|improve this answer












        #!/bin/bash

        while true
        do
        wildflyStarted=$(grep -ic "Wildfly.*started in.*ms.*Started.*of.*services" /opt/wildfly/standalone/log/server.log)
        if [[ "$wildflyStarted" -eq "1" ]]; then
        break;
        else
        sleep 1;
        fi
        done

        while true
        do
        ejbcaStatus=$(/opt/wildfly/bin/jboss-cli.sh -c --commands="cd deployment,cd ejbca.ear,read-attribute status")
        if [[ "$ejbcaStatus" -eq "OK" ]]; then
        break;
        else
        sleep 5;
        fi
        done


        This script worked for me.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 12 mins ago









        user674669

        1011




        1011



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f353095%2fhowto-detect-when-jboss-is-fully-up-and-running-and-ready-to-accept-deployments%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay