Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Traffic Totals DB corruption

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    8 Posts 5 Posters 2.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      TauCeti
      last edited by

      I've had this happen to me twice now. The database file that stores the Traffic Totals data becomes corrupted and all the of the data disappears. Also, the stats stop collecting all together you have to "Reset Graphing" to get it going again.

      UI displays this error message:

      
      Error: {"vnstatversion":"1.15","jsonversion":"1","interfaces":[Error: Database load failed even when using backup (No such file or directory). Aborting.
      [code]
      
      To my knowledge the traffic totals using vnstat. When I did a search for the database files they were all zero size:
      [code]
      drwxr-xr-x   2 root  wheel   512 Apr 29 20:38 .
      drwxr-xr-x  18 root  wheel  1024 Jul 17 08:18 ..
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 .cpsw1
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 .ovpns2
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 .pppoe0
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 cpsw1
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 ovpns2
      -rw-r--r--   1 root  wheel     0 Jun 25 14:20 pppoe0
      [/code]
      Calling vnstat from shell gives:
      [code]
      Error: Database load failed even when using backup (No such file or directory). Aborting.
      [/code]
      
      My current suspicion is that it is corrupted when I have to hard reset pfsense for another unrelated issue. But I cannot verify if a reset occurred on 25 June.
      
      Was wondering if anyone has had something similar so and any info that I could trace the problem better.
      
      Cheers
      
      1 Reply Last reply Reply Quote 0
      • H
        Hugovsky
        last edited by

        Are you using ZFS file system? What's your hardware?

        1 Reply Last reply Reply Quote 0
        • T
          TauCeti
          last edited by

          Ah yes sorry I forgot to include that:
          Hardware: SG-1000
          Filesystem: UFS (SG-1000 does not support ZFS :( )
          Version: almost always latest 2.4 build

          1 Reply Last reply Reply Quote 0
          • H
            Hugovsky
            last edited by

            Try to make a backup and reinstall from zero. Then restore the backup. Maybe an update corrupted your install.

            1 Reply Last reply Reply Quote 0
            • C
              C0RR0SIVE
              last edited by

              Traffic Totals is working for you?  It's been borked for me since updating from 2.3.x to 2.4.x

              1 Reply Last reply Reply Quote 0
              • w0wW
                w0w
                last edited by

                It's working for me about 4 weeks, but on clean install, upgraded every 1-3 days and I have no problems found.

                1 Reply Last reply Reply Quote 0
                • T
                  TauCeti
                  last edited by

                  Traffic Totals is working for you?  It's been borked for me since updating from 2.3.x to 2.4.x

                  .

                  Yup I installed it about two or three months ago and with the exception of the DB dying, it's been running fine.

                  Try to make a backup and reinstall from zero. Then restore the backup. Maybe an update corrupted your install.

                  Yeah I was worried about having to do that. I can't think of anything else to do especially when it claims it cannot recover the back up DB. I'll try monitoring it for a while longer and see if I catch any potential triggers.

                  1 Reply Last reply Reply Quote 0
                  • H
                    highc
                    last edited by

                    I'm having the same issue. Every couple of months, the database gets corrupted. The hints from https://forum.pfsense.org/index.php?topic=123008.0 help to get it working, but usually at the expense of the database having been deleted and starting from scratch.

                    Is there any solution to this problem, yet?

                    pfSense+ 24.03 on Netgate SG-2100 (replaced SG-2440)
                    pfSense 2.6 on Super Micro 5018D-FN4T (retired)

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.