4 Replies Latest reply on Apr 19, 2019 6:20 AM by Jase_L

    VMware Appliance Monitoring Service (vmware-statsmonitor) doesn't start automatically

    yannbizeul Enthusiast

      I'm not really sure when I started, I think with 6.7, but I realized it when troubleshooting automatic backups couldn't be setup.

       

      Every time I restart the VCSA, I have tu manually start VMware Appliance Monitoring Service through the Appliance Management UI, or through the console. It starts with no issue manually, but not at boot.

       

      The service is correctly set as Automatic.

       

      Not sure where this service is logged, any idea?

        • 1. Re: VMware Appliance Monitoring Service (vmware-statsmonitor) doesn't start automatically
          Boyan Enthusiast

          Same here, it won't start on boot but it will start manually once the appliance it up and running? Following message repeated many times during boot:

           

          <statsmonitor> Service api-health command's stderr: Error getting service health. Error: Failed to read health xml file: /var/vmware/applmgmt/statsmonitor_health.xml. Error: [Errno 2] No such file or directory: '/var/vmware/applmgmt/statsmonitor_health.xml'

           

          The funny thing is that once I manually start the service then /var/vmware/applmgmt/statsmonitor_health.xml shows up just fine:

           

          root@oakvcntr1 [ /var/vmware/applmgmt ]# ls -la

          total 108132

          drwxr-xr-x 5 root root      4096 Jan 24 13:12 .

          drwxr-xr-x 5 root root      4096 Oct  6 17:19 ..

          -rw-r--r-- 1 root root         0 Jan 10 19:49 appliance.stats

          -rw-r--r-- 1 root root 108183552 Jan 24 12:55 appliance_stats.sqlite

          -rw-r--r-- 1 root root     32768 Jan 24 13:14 appliance_stats.sqlite-shm

          -rw-r--r-- 1 root root   2467912 Jan 24 13:14 appliance_stats.sqlite-wal

          drwxr-xr-x 2 root root      4096 Jan 24 08:01 metadata

          drwxr-xr-x 2 root root      4096 Jan 24 08:03 patch-history

          -rw-r--r-- 1 root root       992 Jan 10 19:49 ResourceBundle.zip

          drwx------ 2 root root      4096 Jan 24 13:14 session

          -rw-r--r-- 1 root root      1071 Oct  6 18:01 statsMonitor-alarm-creation-marker

          -rw-r--r-- 1 root root       369 Jan 24 13:12 statsmonitor_health.xml

          root@oakvcntr1 [ /var/vmware/applmgmt ]#

          • 2. Re: VMware Appliance Monitoring Service (vmware-statsmonitor) doesn't start automatically
            Boyan Enthusiast

            Increasing the boot-up start delay appears to fix the issue,

             

            I hope this defect is addressed in the next release of VCSA.

             

            1. Modify statsmonitor service config for vMon to set higher startup timeout:

            sed -i '/StartTimeout/d' /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json
            sed -i '/ApiHealthFile/a "StartTimeout": 600,' /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json

             

            2.  kill -HUP $(cat /var/run/vmon.pid)

             

            3.  # Stop and start statsmonitor service explicitly.

              /usr/lib/vmware-vmon/vmon-cli -k statsmonitor
              /usr/lib/vmware-vmon/vmon-cli -i statsmonitor

             

            Now reboot the VCSA and check after 10-15 mins and the Statsmonitor Service should start up automatically.

             

            Proper credit to Raj1988 VCSA 6.5 statsmonitor service stops unexpectedly

            • 3. Re: VMware Appliance Monitoring Service (vmware-statsmonitor) doesn't start automatically
              yannbizeul Enthusiast

              Thank you for the tip.

               

              I do have the following line in /etc/vmware/vmware-vmon/svcCfgfiles/statsmonitor.json :

               

                 "ApiHealthFile" : "/var/vmware/applmgmt/statsmonitor_health.xml",
                 "StartTimeout": 600,
                 "RecoveryActionProfiles" :
              

               

              But still after a reboot the service isn't running after 15 minutes, I have to start it manually

              • 4. Re: VMware Appliance Monitoring Service (vmware-statsmonitor) doesn't start automatically
                Jase_L Lurker

                The VMware Appliance Monitoring Service still isn't automatically starting for me after installing 6.7 U2.