Announcement

Collapse
No announcement yet.

HS3 Pro Shuts Itself Down - Solved!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HS3 Pro Shuts Itself Down - Solved!

    I have begun tracking an issue where HS3 Pro running on my dedicated Windows 7 machine just shuts itself down.

    This morning my watchdog app running on my ELK alarm panel let me know that HomeSeer was not running. When I went to Windows event log nothing really had errors or happened at the same time of the shutdown of HS3 (the PC was running fine).

    This was in he HS3 Log.

    Feb-20 4:58:04 AM Warning Request from UI to shutdown

    Any way to track more data on this for the future?
    ---------------------------------------------------
    Jean-Marie G. Vaneskahian
    jean@vaneskahian.com
    ---------------------------------------------------

    #2
    Have you checked for scripts that could be calling the shutdown command? Also check the event viewer for clues as well.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      Yup.. Things that I checked and found not to be the case:

      1 - No scripts that I have call shutdown at all

      2 - HomeSeer starts as a scheduled task 1 minute after the OS starts up and the automatic user logs in. The Scheduled task does NOT have any running time constraint.

      3 - There was nothing in the event log that happened that I can point to as a cause

      Is there any way to get more detail around this event? It does not happen often, but every now and then I find that HomeSeer is not running. I will start collecting all the data I can. I just need to know what to look for.
      ---------------------------------------------------
      Jean-Marie G. Vaneskahian
      jean@vaneskahian.com
      ---------------------------------------------------

      Comment


        #4
        HomeSeer does not perform a shutdown on itself without some script or event unless it crashed due to some issue. Or it certainly could be a third party application initiating the shutdown.

        Is it crashing or gracefully shutting down?

        A little more information would be helpful.

        Reading your post... "starts as a scheduled task 1 minute" gives me the thought that it is the task scheduler shutting down HomeSeer. I would recommend that you remove the task scheduled event from the equation and start HS manually to vet whether or not the issue continues. More than likely it will not if you start it manually.
        HomeSeer 2, HomeSeer 3, Allonis myServer, Amazon Alexa Dots, ELK M1G, ISY 994i, HomeKit, BlueIris, and 6 "4k" Cameras using NVR, and integration between all of these systems. Home Automation since 1980.

        Comment


          #5
          Let me give all the information I have at the moment and we can build from there moving forward:

          The system I am running is a dedicated i7 with 16 GB of RAM running Windows 7 for HomeSeer Pro.

          Every now and then (about once, maybe twice a week) I have noticed that HomeSeer is not running. So about 6 months ago I began having the computer dedicated to running HomeSeer do a graceful reboot at 4:00 AM in the hopes that this would address the random shutdown issue. It did not make any difference.

          I have HomeSeer setup to start automatically 1 minute after at system automatic login. (All that works great and HomeSeer in general works great)

          The problem is (and I am trying to build details around this) that every now and then (like I said once or twice a week, at random times I find that HomeSeer is no longer running. In the past all I would do is just restart the HS3 executable and did not dig any deeper. Now I am looking for some answers.

          So to that end I created about a week ago a watchdog on my Elk Alarm pane that would now announce when HomeSeer was no longer updating a system variable on the Elk (this indicates that HS was not running or crashed).

          at about 5:00 am this morning I got an alert that HomeSeer was not running. I logged into the machine and saw that the Speaker Client was running but not connected but HS3 was NOT running. I just restarted it as usual but this time I dug into the Windows Event logs (found nothing), Memory Dump files (not one there) and the HS3 log itself. In the HS3 log I found a graceful shutdown of HS3 at 4:58 AM:

          Feb-20 4:58:04 AM Warning Request from UI to shutdown
          And all the nice graceful shutdown of the plugins that would follow.

          I have no clue what would command the HS3 application to gracefully shutdown (in this case it did NOT crash).

          Where do I begin to look?
          What do I setup for the next time this happens to capture more data as to the root cause?
          What other information can I provide to help narrow this down?
          What would you do if this was happening to you?

          I am at a loss here...
          ---------------------------------------------------
          Jean-Marie G. Vaneskahian
          jean@vaneskahian.com
          ---------------------------------------------------

          Comment


            #6
            Do you still have a default user account enabled? If you load a new empty config file do you see this issue?
            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

            Comment


              #7
              I do not have the default user account. The only accounts I have enabled are those that I setup with complex passwords 1 locally and 1 for remote HS Connect access.

              A new empty config file would remove all my devices and events right? Would that not make my HomeSeer setup useless? Given that this issue is seemingly random and does not happen but once or twice in a week (statistically speaking), I would be going without HomeSeer for at least that long?

              What is the theory, a corrupt config file? If so, is there another way to test for that? I see no errors or warnings in the log. And so far the shutdown is graceful and not a crash.
              ---------------------------------------------------
              Jean-Marie G. Vaneskahian
              jean@vaneskahian.com
              ---------------------------------------------------

              Comment


                #8
                Task Scheduler might be doing this. In past versions of Windows, a new task created with Task Scheduler defaults to 'stop task after 72 hours'. Be sure that isn't configured. I got burned by that once so now I go through every single option when creating a new task to see what Microsoft currently uses as defaults.

                Comment


                  #9
                  Originally posted by jeanv View Post
                  I do not have the default user account. The only accounts I have enabled are those that I setup with complex passwords 1 locally and 1 for remote HS Connect access.

                  A new empty config file would remove all my devices and events right? Would that not make my HomeSeer setup useless? Given that this issue is seemingly random and does not happen but once or twice in a week (statistically speaking), I would be going without HomeSeer for at least that long?

                  What is the theory, a corrupt config file? If so, is there another way to test for that? I see no errors or warnings in the log. And so far the shutdown is graceful and not a crash.
                  Yes it would render HS3 unusable for a period of time but it would provide insight if the shut down is coming from within HS3 or outside which would then provide a path forward.
                  💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                  Comment


                    #10
                    Originally posted by Mountainman View Post
                    Task Scheduler might be doing this. In past versions of Windows, a new task created with Task Scheduler defaults to 'stop task after 72 hours'. Be sure that isn't configured. I got burned by that once so now I go through every single option when creating a new task to see what Microsoft currently uses as defaults.
                    Yup, I had long ago thought of that. In the post of this issue "2 - HomeSeer starts as a scheduled task 1 minute after the OS starts up and the automatic user logs in. The Scheduled task does NOT have any running time constraint."

                    I made sure the task scheduler was not ending after the task has been running. But beyond that, it would never make it to 72 hours anyhow since the system reboots itself everyday at 4:00 am by design to avoid this issue (which it did not).
                    ---------------------------------------------------
                    Jean-Marie G. Vaneskahian
                    jean@vaneskahian.com
                    ---------------------------------------------------

                    Comment


                      #11
                      Looks like my issue is not as crazy as it sounds. Others have experiences exactly the same thing.

                      https://forums.homeseer.com/showthread.php?t=179736

                      https://forums.homeseer.com/bugzilla...ug.cgi?id=1718

                      https://forums.homeseer.com/showthread.php?p=1336341

                      I am not quite ready to dump the config and run a useless clean HS install. There must be some way of knowing what is telling HS3 to shut down. Maybe its internal to HS3 maybe its the OS? I do not know but surely HS3 should be able to know where the command came from?
                      ---------------------------------------------------
                      Jean-Marie G. Vaneskahian
                      jean@vaneskahian.com
                      ---------------------------------------------------

                      Comment


                        #12
                        Just a thought... have you tried to shutdown the Windows Update service for a while to try and rule that out?

                        Robert
                        HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                        Comment


                          #13
                          The 'Warning Request from UI to shutdown' message means that on Windows, the UI was either shutdown manually (pressing close X) or automatically from an external application or Windows itself.

                          Do you run any of my Performance or Process Monitoring tools that have the ability to shutdown Homeseer?

                          Do you have any Restart plugins installed?

                          Do you have a list of events that ran just before it shutdown?
                          Jon

                          Comment


                            #14
                            There are some things that occur to me. This may or may not help. The fact that there is a notation in the log "Request from UI to shutdown" would rule out the Windows task being at the root the problem. This would seem to indicate that something is calling for the shutdown. If in doubt I would recommend R2 Studios Startup Delayer. IMO this is a much better way to start HomeSeer than using a Windows task.

                            Since you say this is a random occurrence I would recommend tracking the dates and times this happens to see if there is some rhythm to it. Is is always XX hours between occurrences, is it always in the early morning. I would look carefully at the log just before the request is logged to see if there is a common occurrence or event. You might want to increase your log retention to 30 days so you can search it. You should be able to search for the phrase "Request from UI to shutdown" and see the dates and times of the occurrences. Then you could narrow your log filter to 5 minutes before and after the time and date of the shutdown so that you can start looking for occurrences immediately preceding the shutdown.

                            In 2016 I had a similar problem of HS just stopping. It was different than yours because there was no entry in the log showing that an orderly shutdown had been called. It was just stopping. It turned out to be a bug in a HomeSeer Condition that was subsequently fixed. Tracking it down was a nightmare, because the Event that caused the failure was not logged because the execution of the Event caused HS to halt. I had to look through my Events for a last run date and time that just preceded the halt. That was how I found the event that was causing it. I am only mentioning this as a reference to digging deep for the problem, your problem is different because something is asking HomeSeer to shut down.

                            If it wasn't a situation where HS is being asked to shut down, I would recommend enabling HSSentry. HSSentry will restart HomeSeer if the web server quits running when there is no shutdown called within HomeSeer.
                            HSSentry will not restart HomeSeer after an orderly shutdown, only if crashes or halts.

                            I really think your problem is being caused by an Event. Externally caused shutdowns such as system updates do not generate the orderly shutdown request shown in your log. When I force a shutdown on my system without shutting down HomeSeer there is no log entry indicating HomeSeer was shut down only one from Jon00's Performance Monitor script:

                            Feb-21 9:30:00 AM Jon00_PerfMon Homeseer start/restart detected

                            A HomeSeer crash would not generate the log entry from Jon00's script.

                            It is going to take some sleuth work, but I really feel like the focus needs to be within HomeSeer, not from an external cause.
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #15
                              Originally posted by jon00 View Post
                              The 'Warning Request from UI to shutdown' message means that on Windows, the UI was either shutdown manually (pressing close X) or automatically from an external application or Windows itself.

                              Do you run any of my Performance or Process Monitoring tools that have the ability to shutdown Homeseer?

                              Do you have any Restart plugins installed?

                              Do you have a list of events that ran just before it shutdown?
                              Hmm. When mine is shutdown by Windows, I do not get that entry in the log. I just confirmed by asking for a restart of Windows without shutting down HomeSeer first. IIRC in the past before I disabled the Windows Update Service, an update caused restart did not create any HS generated log entries other than from your PerfMon script.

                              The restart plug-ins is a good call. If there is one, it can be disabled to see if it is the culprit.
                              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                              Comment

                              Working...
                              X