{"id":10370,"date":"2021-04-12T05:57:04","date_gmt":"2021-04-12T12:57:04","guid":{"rendered":"https:\/\/www.coretechnologies.com\/blog\/?p=10370"},"modified":"2021-04-12T05:57:04","modified_gmt":"2021-04-12T12:57:04","slug":"application-not-restarted","status":"publish","type":"post","link":"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/application-not-restarted\/","title":{"rendered":"Q&#038;A: Why Doesn&#8217;t AlwaysUp Restart my Application?"},"content":{"rendered":"<div align=\"center\"><img decoding=\"async\" src=\"\/blog\/images\/qa-alwaysup-not-restarting-application.png\" style=\"margin-bottom:20px;\" title=\"Q&#038;A: Why Doesn't AlwaysUp Restart my Application?\" alt=\"Q&#038;A: Why Doesn't AlwaysUp Restart my Application?\" border=\"0\"><\/div>\n<div class=\"blog-qa-question-box\">\n<img decoding=\"async\" src=\"\/images\/quotes-transparent-21x21.png\">&nbsp;&nbsp;My company uses <a href=\"\/products\/AlwaysUp\/\">AlwaysUp<\/a> to run 4 applications on our lab server. Every few weeks, one of the applications stops running and I have to log in and restart it. Why doesn&#8217;t AlwaysUp automatically restart it?<\/p>\n<p>Here is what I see in the logs:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/qa-alwaysup-not-restarting-activity.png\" class=\"zoomPopup\" title=\"AlwaysUp not restarting: Activity\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/qa-alwaysup-not-restarting-activity.png\" title=\"AlwaysUp not restarting: Activity (click to enlarge)\" alt=\"AlwaysUp not restarting: Activity\" border=\"0\" width=\"520\" \/><\/a><\/div>\n<p align=\"right\">&mdash; Sandy<\/p>\n<\/div>\n<p>Hi Sandy, thanks for reaching out. The whole point of using AlwaysUp is to keep your application running 24\/7\/365 so you are right to be puzzled!<\/p>\n<p>Before digging into the details, let&#8217;s review the basics of AlwaysUp.<\/p>\n<h2 class=\"blog-caption\">How AlwaysUp works (a quick summary)<\/h2>\n<p>When you configure an application in AlwaysUp, a true <a href=\"\/WindowsServices\/FAQ.html#WhatIsAWindowsService\">Windows Service<\/a> is created. Let&#8217;s call it the <b>AlwaysUp service<\/b>.<\/p>\n<p>For example, if you setup Dropbox in AlwaysUp, you will see an AlwaysUp service called &#8220;Dropbox (managed by AlwaysUpService)&#8221; in the <a href=\"\/blog\/windows-services\/essential-tools-windows-services-msc\/\">Services<\/a> utility:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/dropbox-alwaysup-service.png\" class=\"zoomPopup\" title=\"Dropbox (managed by AlwaysUpService)\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/dropbox-alwaysup-service.png\" title=\"Dropbox (managed by AlwaysUpService) (click to enlarge)\" alt=\"Dropbox (managed by AlwaysUpService)\" border=\"0\" \/><\/a><\/div>\n<p>When your computer boots, the AlwaysUp service:<\/p>\n<ol>\n<li>\n<p>Starts before anyone logs in<\/p>\n<\/li>\n<li>\n<p>Launches your application<\/p>\n<\/li>\n<li>\n<p>Constantly monitors your application, quickly restarting it if it crashes or dies for any reason.<\/p>\n<\/li>\n<\/ol>\n<p>The AlwaysUp service is the key to running your application 24&#215;7.<\/p>\n<p>(If you are curious to find out more about the inner workings of AlwaysUp, check out our detailed <a href=\"\/products\/AlwaysUp\/HowAlwaysUpWorks.html\">How AlwaysUp Works<\/a> explainer.)<\/p>\n<h2 class=\"blog-caption\">What your logs tell us<\/h2>\n<p>The activity report shows AlwaysUp running your application continuously for a few days. Then at 7:03:11 AM, your application suddenly stops. And soon after, the AlwaysUp service stops as well.<\/p>\n<p>Your application is not crashing or failing in any way. No errors or warnings were reported and nothing out of the ordinary occurred.<\/p>\n<p>From that benign sequence, we can conclude that <b>someone (or something) intentionally stopped your AlwaysUp service<\/b>.<\/p>\n<p>And with the service stopped, the only way to restart your application is to restart the AlwaysUp service.<\/p>\n<h2 class=\"blog-caption\">Who stopped your AlwaysUp Windows Service?<\/h2>\n<p>Unfortunately the logs don&#8217;t say who (or what) stopped the service.<\/p>\n<p>However, there are at least 4 ways that the service could have been stopped:<\/p>\n<ol>\n<li>\n<p>From the Services application.<\/p>\n<p>For example, clicking the <b>Stop<\/b> button will terminate the AlwaysUp Dropbox service:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/dropbox-alwaysup-service-stop-button.png\" class=\"zoomPopup\" title=\"Stop the service\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/dropbox-alwaysup-service-stop-button.png\" title=\"Stop the service (click to enlarge)\" alt=\"Stop the service\" border=\"0\" \/><\/a><\/div>\n<\/li>\n<li>\n<p>With the <a href=\"\/blog\/windows-services\/essential-tools-for-windows-services-net-command\/\">NET STOP<\/a> command.<\/p>\n<\/li>\n<li>\n<p>With the <a href=\"\/blog\/windows-services\/essential-tools-windows-services-sc-exe\/\">SC STOP<\/a> command.<\/p>\n<\/li>\n<li>\n<p>From an application leveraging the <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/services\/service-functions\" target=\"_blank\" rel=\"noopener\">Windows Services API<\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>Do you know who would stop the service?<\/p>\n<p>Are there any batch files that manipulate services? <\/p>\n<p>Watch out for maintenance scripts and other background tasks.<\/p>\n<h2 class=\"blog-caption\">Investigate with Windows Service Auditor<\/h2>\n<p>If it&#8217;s time to put your detective hat on and figure out who&#8217;s stopping the service, our free <a href=\"\/products\/WindowsServiceAuditor\/\">Windows Service Auditor<\/a> tool should be able to help. It will record all operations performed on the AlwaysUp service.<\/p>\n<p>After downloading and starting Windows Service Auditor, enable extended auditing for the AlwaysUp service. Periodically review the service&#8217;s security events, watching for &#8220;Stop the service&#8221; operations, like this:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/windows-service-auditor-stop-event.png\" class=\"zoomPopup\" title=\"Windows Service Auditor: Stop event\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/windows-service-auditor-stop-event.png\" title=\"Windows Service Auditor: Stop event (click to enlarge)\" alt=\"Windows Service Auditor: Stop event\" border=\"0\" width=\"520\" \/><\/a><\/div>\n<p>Good hunting!<\/p>\n<h2 class=\"blog-caption\">Keep the service running with Service Protector<\/h2>\n<p>If you are unable to prevent the service from shutting down, consider deploying <a href=\"\/products\/ServiceProtector\/\">Service Protector<\/a> as a second layer of defense.<\/p>\n<p>Install Service Protector, select <b>Protector &gt; Add<\/b> and choose your AlwaysUp service from the list:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/protect-alwaysup-service.png\" class=\"zoomPopup\" title=\"Select your AlwaysUp service\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/protect-alwaysup-service.png\" title=\"Select your AlwaysUp service (click to enlarge)\" alt=\"Select your AlwaysUp service\" border=\"0\" \/><\/a><\/div>\n<p>After you save, Service Protector will babysit the AlwaysUp service &mdash; to quickly restart it if someone stops it:<\/p>\n<div align=\"center\"><a href=\"\/blog\/images\/alwaysup-service-protected.png\" class=\"zoomPopup\" title=\"Service Protector protecting the AlwaysUp service\" target=\"_blank\" rel=\"noopener noreferrer\"><img decoding=\"async\" class=\"image-padding\" src=\"\/blog\/images\/alwaysup-service-protected.png\" title=\"Service Protector protecting the AlwaysUp service (click to enlarge)\" alt=\"Service Protector protecting the AlwaysUp service\" border=\"0\" \/><\/a><\/div>\n<p style=\"margin-top:30px\">\nHopefully you will get to the bottom of this unwelcome behavior soon. Please be sure to <a href=\"\/support\/\">get in touch<\/a> if you notice any errors or warnings in the activity reports.<\/p>\n<!-- relpost-thumb-wrapper --><div class=\"relpost-thumb-wrapper\"><!-- filter-class --><div class=\"relpost-thumb-container\"><style>.relpost-block-single-image, .relpost-post-image { margin-bottom: 10px; }<\/style><h3>You may also like...<\/h3><div style=\"clear: both\"><\/div><div style=\"clear: both\"><\/div><!-- relpost-block-container --><div class=\"relpost-block-container relpost-block-column-layout\" style=\"--relposth-columns: 3;--relposth-columns_t: 2; --relposth-columns_m: 2\"><a href=\"https:\/\/www.coretechnologies.com\/blog\/service-protector\/version-11-released\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"Service Protector 11: Resource Monitoring, Help for Slow Services, and More\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/new-release-150x150-2.webp\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">Service Protector 11: Resource Monitoring, Help for Slow Services, and More<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/alwaysup-feature-spotlight-run-your-app-without-admin-rights\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"AlwaysUp Feature Spotlight: Run your App Without Admin Rights\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/windows-service-no-admin-rights-150x150-1.webp\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">AlwaysUp Feature Spotlight: Run your App Without Admin Rights<\/h2><\/div><\/div><\/a><a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/how-to-move-alwaysup-services-new-server\/\"class=\"relpost-block-single\" ><div class=\"relpost-custom-block-single\"><img decoding=\"async\" loading=\"lazy\" class=\"relpost-block-single-image\" alt=\"How do I Move my AlwaysUp\/Windows Services to a New Server?\"  src=\"https:\/\/www.coretechnologies.com\/blog\/wp-content\/uploads\/transfer-alwaysup-to-new-server-150x150.png\" style=\"aspect-ratio:1\/1\" style=\"aspect-ratio:1\/1\"><\/img><div class=\"relpost-block-single-text\"  style=\"height: 75px;font-family: Arial;  font-size: 12px;  color: #333333;\"><h2 class=\"relpost_card_title\">How do I Move my AlwaysUp\/Windows Services to a New Server?<\/h2><\/div><\/div><\/a><\/div><!-- close relpost-block-container --><div style=\"clear: both\"><\/div><\/div><!-- close filter class --><\/div><!-- close relpost-thumb-wrapper -->","protected":false},"excerpt":{"rendered":"<p>&nbsp;&nbsp;My company uses AlwaysUp to run 4 applications on our lab server. Every few weeks, one of the applications stops running and I have to log in and restart it. Why doesn&#8217;t AlwaysUp automatically restart it? Here is what I &hellip; <a href=\"https:\/\/www.coretechnologies.com\/blog\/alwaysup\/application-not-restarted\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":10377,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[26,127,147,170,240,196],"class_list":["post-10370","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-alwaysup","tag-alwaysup-tag","tag-qa","tag-service-protector-tag","tag-troubleshooter","tag-windows-service-auditor","tag-windows-services-2"],"_links":{"self":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10370","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=10370"}],"version-history":[{"count":11,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10370\/revisions"}],"predecessor-version":[{"id":10405,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/10370\/revisions\/10405"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media\/10377"}],"wp:attachment":[{"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=10370"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=10370"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.coretechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=10370"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}