Announcement

Collapse
No announcement yet.

Oh WOW, having database issues

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

    Oh WOW, having database issues

    I'm not sure what to do here. I go to the log and find pages of this...

    Oct-27 11:37:33 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:37:12 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:37:12 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:36:41 AM Log Error 1642862 failed to be deleted from the logging database - check the log for details or restart HS3 to attempt to resolve this issue.
    Oct-27 11:36:41 AM Error Delete (Log/Date) Error: database disk image is malformed database disk image is malformed
    Oct-27 11:36:25 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:36:04 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:36:04 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:35:34 AM Log Error 1642483 failed to be deleted from the logging database - check the log for details or restart HS3 to attempt to resolve this issue.
    Oct-27 11:35:34 AM Error Delete (Log/Date) Error: database disk image is malformed database disk image is malformed
    Oct-27 11:35:18 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:34:59 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:34:59 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:34:29 AM Log Error 1642094 failed to be deleted from the logging database - check the log for details or restart HS3 to attempt to resolve this issue.
    Oct-27 11:34:29 AM Error Delete (Log/Date) Error: database disk image is malformed database disk image is malformed
    Oct-27 11:34:03 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:33:43 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:33:13 AM Log Error 1641718 failed to be deleted from the logging database - check the log for details or restart HS3 to attempt to resolve this issue.
    Oct-27 11:33:13 AM Error Delete (Log/Date) Error: database disk image is malformed database disk image is malformed
    Oct-27 11:32:57 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:32:38 AM Warning Log Database failed to open, waiting then retrying...database is locked database is locked
    Oct-27 11:32:06 AM Log Error 1641355 failed to be deleted from the logging database - check the log for details or restart HS3 to attempt to resolve this issue.
    Oct-27 11:32:06 AM Error Delete (Log/Date) Error: database disk image is malformed database disk image is malformed
    Oct-27 11:31:50 AM Error Log Database Vacuum Error: database disk image is malformed database disk image is malformed
    Oct-27 11:31:22 AM Error SQL Exception adding record(s) to the LOG database(0): database is locked database is locked, Code=5 SQL=

    How can I correct this please...

    #2
    Looks like it is the HS log database rather than the core HS database which is good at least, I'd stop HS, delete your HomeSeerLog.hsd file in your logs director and start it back up again. You lose your past logs but hopefully it will create a new one that behaves itself.

    Comment


      #3
      Ok that messed things up

      Well I deleted the log.hsd file in the data directory. I lost most of my scene controllers. And countless other devices. Arduino boards gone, Alexa doesn't recognize system anymore.

      So I grabbed one of the numbered log.hsd files and renamed it. rebooted and most items were there. Still getting database errors but system works.

      Any other ideas? Is there any way to repair existing database?

      Comment


        #4
        Is there any way to repair existing database?

        Yes Brad.

        Shut down Homeseer 3 and utilize a SQLite database editor.

        Easiest to do is just a check and compress of the database. Guessing that might work.

        I run Linux here and found more Linux based SQLite database free programs than Windows based SQLite database free programs.

        Homeseer 3 will leave the database locked if not closed properly.

        Default extension for HS3 is hsd. I change the extension to a default SQLite extension SQLite database file name (*.db *.sqlite *.sqlite3 *.db3)
        Last edited by Pete; October 28, 2017, 08:15 AM.
        - Pete

        Auto mator
        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
        HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

        HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
        HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

        Comment


          #5
          Originally posted by bsnedek View Post
          Well I deleted the log.hsd file in the data directory. I lost most of my scene controllers. And countless other devices. Arduino boards gone, Alexa doesn't recognize system anymore.

          So I grabbed one of the numbered log.hsd files and renamed it. rebooted and most items were there. Still getting database errors but system works.

          Any other ideas? Is there any way to repair existing database?
          You deleted the HS database, not the log. That file contains all of your devices and events. There are not numbered backups of the log database. The database is in \data. The log database is in \logs and is called HomeSeerLog.hsd. This is the file that has become corrupted. It is better to move or rename a file than to delete it, until you are sure it won’t hurt the system. Unless old log data is important to you, I wouldn’t bother trying to repair it. The symptom you are seeing has happened on my system once and deleting the log fixed it. Mine happened when Windows did an update last year. I disabled automatic updates and it hasn’t happened since.
          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

          Comment


            #6
            Nice!!!

            Now that I got that straight. I renamed the log.hsd to logold.hsd. Restarted HS3, it loaded faster. The web is faster.

            Is there some kind of maintenance plan I am missing out on?

            I have been running HS for a long time, many years.

            Thanks Much

            Comment


              #7
              Apologies did not see that you had deleted the wrong hsd file earlier.

              Here keep my HS3 logging to 5Mb and 14 days.

              Only maintenance I ever did for HS2 logs was deleting them when they got too big.

              Switched over to UltraLog in Homeseer 2.

              Personally here using mysql on Homeseer 3 these days (Linux) and I do not think that Ultralog uses mysql these days.

              The HS3 Pro box today is a Linux LAMP server.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

              HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
              HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

              Comment


                #8
                Originally posted by bsnedek View Post
                Now that I got that straight. I renamed the log.hsd to logold.hsd. Restarted HS3, it loaded faster. The web is faster.

                Is there some kind of maintenance plan I am missing out on?

                I have been running HS for a long time, many years.

                Thanks Much
                The best plan is to do daily backups of the entire HS directory structure. I use BLBackup. I also use Macirum reflect to image the entire computer nightly. That way I have a backup of HomeSeer if I have a problem or have an entire image of the PC hard drive in the event of a hardware failure.

                I disabled the Windows update service so there are no automatic updates. I enable it monthly and do planned updates.

                I have the PC on a UPS with software to effect an orderly shutdown in the event of a power failure.

                I like to store a fair amount of log history, but do not keep more than 7 days in the HomeSeerLog.hsd. I use UltraLog3 for storing archival log data and syslog reports from a couple of sources. You can adjust the log maximum size and days to retain on the General tab of setup.

                I back up my Z-Wave controllers on a regular basis, since the network is only stored in the controller. These backups allow me to restore the Z-Wave network in the event of a controller failure. These backups are stored in the HS directory structure by default, so my nightly backups save these on the remote NAS as well. Zwolfpack posted a nifty Python script that backs up my Z-Nets automatically from an event. It should work on other controllers.

                I keep an eye on available space on my servers hard drive (SSD) to make sure it is not filled by some runaway process, either by the O/S or something related to HomeSeer.

                My HomeSeer server is dedicated to HomeSeer and my Vivotek security camera software only. I never use the computer for anything else. It is run headless and only accessed by RDP.

                You could store your backups to a cloud service, but I feel that if I suffer a problem that would destroy local backups, getting HomeSeer back up would be the least of my problems.

                The UPS and disabling automatic Windows updates are the most important to prevent corruption of database files.
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment

                Working...
                X