How to know if Tomcat (catalina.bat run) has finished booting all applications?









up vote
-1
down vote

favorite












Im creating automated scripts for application deployment. Due to I cant redeploy an application on a hot Tomcat (more info here), I need to stop Tomcat to delete the necessary files and be able to deploy it as if it were the first one.



I dont see the correct way to know when the catalina.bat run command has finished, since it is a command that never ends. I have seen many questions like this, but I think it's not the most correct way because the Tomcat port starts as soon as the command is executed, not when it ends. Does anyone know any way to do this with less margin for error?? Thanks.










share|improve this question

















  • 1




    Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
    – jwdonahue
    Nov 10 at 19:40






  • 1




    I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
    – Jack White
    Nov 12 at 22:19














up vote
-1
down vote

favorite












Im creating automated scripts for application deployment. Due to I cant redeploy an application on a hot Tomcat (more info here), I need to stop Tomcat to delete the necessary files and be able to deploy it as if it were the first one.



I dont see the correct way to know when the catalina.bat run command has finished, since it is a command that never ends. I have seen many questions like this, but I think it's not the most correct way because the Tomcat port starts as soon as the command is executed, not when it ends. Does anyone know any way to do this with less margin for error?? Thanks.










share|improve this question

















  • 1




    Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
    – jwdonahue
    Nov 10 at 19:40






  • 1




    I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
    – Jack White
    Nov 12 at 22:19












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











Im creating automated scripts for application deployment. Due to I cant redeploy an application on a hot Tomcat (more info here), I need to stop Tomcat to delete the necessary files and be able to deploy it as if it were the first one.



I dont see the correct way to know when the catalina.bat run command has finished, since it is a command that never ends. I have seen many questions like this, but I think it's not the most correct way because the Tomcat port starts as soon as the command is executed, not when it ends. Does anyone know any way to do this with less margin for error?? Thanks.










share|improve this question













Im creating automated scripts for application deployment. Due to I cant redeploy an application on a hot Tomcat (more info here), I need to stop Tomcat to delete the necessary files and be able to deploy it as if it were the first one.



I dont see the correct way to know when the catalina.bat run command has finished, since it is a command that never ends. I have seen many questions like this, but I think it's not the most correct way because the Tomcat port starts as soon as the command is executed, not when it ends. Does anyone know any way to do this with less margin for error?? Thanks.







batch-file tomcat tomcat7 catalina






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 3:09









pjgarci

235




235







  • 1




    Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
    – jwdonahue
    Nov 10 at 19:40






  • 1




    I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
    – Jack White
    Nov 12 at 22:19












  • 1




    Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
    – jwdonahue
    Nov 10 at 19:40






  • 1




    I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
    – Jack White
    Nov 12 at 22:19







1




1




Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
– jwdonahue
Nov 10 at 19:40




Take the tour, read How to Ask, and Minimal, Complete, and Verifiable example. Treated as a black-box, there's no way to know what phase the script is in, while it is running. If you know of certain visible activities you can wait on those. Why don't you modify the catalina.bat file to signal when whatever epoch you're waiting on has started? You could always drop a file somewhere and then wait on that.
– jwdonahue
Nov 10 at 19:40




1




1




I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
– Jack White
Nov 12 at 22:19




I suggest using wget or similar to periodically execute an REST API request to the web application (or similar). Another option would be to read the logs. Since you did not specify what the application is we have no idea what exactly does finished mean in your scenario, and the OS does not know either. You should start with the documentation for the web application you are trying to run. If that does not provide any evidence it finished, scripts cannot help you either.
– Jack White
Nov 12 at 22:19

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235698%2fhow-to-know-if-tomcat-catalina-bat-run-has-finished-booting-all-applications%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53235698%2fhow-to-know-if-tomcat-catalina-bat-run-has-finished-booting-all-applications%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Use pre created SQLite database for Android project in kotlin

Darth Vader #20

Ondo