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.
batch-file tomcat tomcat7 catalina
add a comment |
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.
batch-file tomcat tomcat7 catalina
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 usingwget
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 doesfinished
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
add a comment |
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.
batch-file tomcat tomcat7 catalina
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
batch-file tomcat tomcat7 catalina
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 usingwget
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 doesfinished
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
add a comment |
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 usingwget
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 doesfinished
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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 doesfinished
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