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

    Traffic totals error (call this solved)

    Scheduled Pinned Locked Moved Traffic Monitoring
    11 Posts 6 Posters 7.2k 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.
    • chpalmerC
      chpalmer
      last edited by

      2.3.3-DEVELOPMENT (amd64)
      built on Wed Dec 21 15:29:53 CST 2016

      Status Traffic Totals (1.2.1)  Package shows-

      Error: {"vnstatversion":"1.15","jsonversion":"1","interfaces":[Error: Database load failed even when using backup (No such file or directory). Aborting.

      related?-  [url=https://forum.pfsense.org/index.php?topic=122771.0]https://forum.pfsense.org/index.php?topic=122771.0

      Triggering snowflakes one by one..
      Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

      1 Reply Last reply Reply Quote 0
      • chpalmerC
        chpalmer
        last edited by

        latest snap  2.3.3-DEVELOPMENT (amd64)
        built on Mon Dec 26 08:33:12 CST 2016

        traffic.jpg_thumb
        traffic.jpg

        Triggering snowflakes one by one..
        Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          Is this still happening to you? It's working fine for me on 2.3.3 snapshots.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • chpalmerC
            chpalmer
            last edited by

            Nope-  once I hit the "reset graphing data" button everything works.

            Either a loose nut behind the wheel or something on a snapshot early on..??  This particular box stayed on snaps after the last release.

            Triggering snowflakes one by one..
            Intel(R) Core(TM) i5-4590T CPU @ 2.00GHz on an M400 WG box.

            1 Reply Last reply Reply Quote 0
            • W
              wizz
              last edited by

              Same here with 2.3.2-RELEASE-p1 (amd64)

              Error: {"vnstatversion":"1.14","jsonversion":"1","interfaces":[{"id":"igb0","nick":"WAN1","created":
              xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

              Error: Database load failed even when using backup (No such file or directory). Aborting.

              Reset & update Graphs did not work for me

              1 Reply Last reply Reply Quote 0
              • B
                brandur
                last edited by

                I had the exact same error and pressing the "Reset Graphing Data" button solved it for me.
                Running pfSense 2.3.2-RELEASE-p1

                SG-4860 w/128GB SSD & 8GB RAM

                1 Reply Last reply Reply Quote 0
                • R
                  romainp
                  last edited by

                  Same issue for me. To solve that, I did in a shell:

                  cd /var/db/vnstat
                  rm -fr *
                  

                  then back to the webgui and do a reset graph and then tada! everything since to work again this time.

                  Romain

                  1 Reply Last reply Reply Quote 0
                  • R
                    romainp
                    last edited by

                    BTW, I know that if the very easy and worst way to solve the issue. I am pretty sure you can delete and reacreate the database for each interfaces one by one and find the one that is corrupted. But well, feel lazy today ;)

                    1 Reply Last reply Reply Quote 0
                    • W
                      wizz
                      last edited by

                      It works !
                      Thank you so much romainp

                      1 Reply Last reply Reply Quote 0
                      • W
                        wizz
                        last edited by

                        I thought it was ok but it is not
                        Graph is here but all my interfaces are at 0 even an hour later (no poll/save)

                        So I uninstall Status_Traffic_Totals package , delete one by one any files in /var/db/vnstat/ & reinstall the package
                        at the end of the installation I saw this message :

                        Message from vnstat-1.14:
                        ###########################################################################
                        vnstat has been installed.
                        
                        A sample configuration file has been installed in /usr/local/etc/
                        Please add your default network interface in the 'Interface' line there
                        before starting vnstat service.
                        You can add any number of additional interfaces either in
                        vnstat_additional_ifaces variable in /etc/rc.conf, or with this command:
                        su -m vnstat -c "/usr/local/bin/vnstat --create --iface <your interface="">"
                        and restart vnstat service:
                        service vnstat restart
                        
                        For more information about vnStat use "man vnstat" or visit:
                        http://humdi.net/vnstat/
                        ###########################################################################
                        >>> Cleaning up cache... done.
                        Success</your> 
                        

                        Then, cat  /usr/local/etc/vnstat.conf  (seems very empty)

                        # vnStat 1.13 config file
                        ##
                        
                        # location of the database directory
                        DatabaseDir "/var/db/vnstat"
                        
                        # on which day should months change
                        MonthRotate 1
                        
                        # vnstati
                        ##
                        
                        # image colors
                        CBackground     "FFFFFF"
                        CEdge           "AEAEAE"
                        CHeader         "606060"
                        CHeaderTitle    "FFFFFF"
                        CHeaderDate     "FFFFFF"
                        CText           "000000"
                        CLine           "B0B0B0"
                        CLineL          "-"
                        CRx             "92CF00"
                        CTx             "606060"
                        CRxD            "-"
                        CTxD            "-"
                        

                        Then modify it with the help of /usr/local/etc/vnstat.conf.sample, so my vnstat.conf  looks like that now:

                        # vnStat 1.13 config file
                        ##
                        
                        # default interface
                        Interface "igb0"
                        
                        # location of the database directory
                        DatabaseDir "/var/db/vnstat"
                        
                        # locale (LC_ALL) ("-" = use system locale)
                        Locale "-"
                        
                        # on which day should months change
                        MonthRotate 1
                        
                        # date output formats for -d, -m, -t and -w
                        # see 'man date' for control codes
                        DayFormat    "%x"
                        MonthFormat  "%b '%y"
                        TopFormat    "%x"
                        
                        # characters used for visuals
                        RXCharacter       "%"
                        TXCharacter       ":"
                        RXHourCharacter   "r"
                        TXHourCharacter   "t"
                        
                        # how units are prefixed when traffic is shown
                        # 0 = IEC standard prefixes (KiB/MiB/GiB/TiB)
                        # 1 = old style binary prefixes (KB/MB/GB/TB)
                        UnitMode 0
                        
                        # output style
                        # 0 = minimal & narrow, 1 = bar column visible
                        # 2 = same as 1 except rate in summary and weekly
                        # 3 = rate column visible
                        OutputStyle 3
                        
                        # used rate unit (0 = bytes, 1 = bits)
                        RateUnit 1
                        
                        # try to detect interface maximum bandwidth, 0 = disable feature
                        # MaxBandwidth will be used as fallback value when enabled
                        BandwidthDetection 1
                        
                        # maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
                        # (unless interface specific limit is given)
                        MaxBandwidth 1000
                        
                        # interface specific limits
                        #  example 8Mbit limit for 'ethnone':
                        #MaxBWethnone 8
                        
                        # how many seconds should sampling for -tr take by default
                        Sampletime 5
                        
                        # default query mode
                        # 0 = normal, 1 = days, 2 = months, 3 = top10
                        # 4 = exportdb, 5 = short, 6 = weeks, 7 = hours
                        QueryMode 0
                        
                        # filesystem disk space check (1 = enabled, 0 = disabled)
                        CheckDiskSpace 1
                        
                        # database file locking (1 = enabled, 0 = disabled)
                        UseFileLocking 1
                        
                        # how much the boot time can variate between updates (seconds)
                        BootVariation 15
                        
                        # log days without traffic to daily list (1 = enabled, 0 = disabled)
                        TrafficlessDays 1
                        
                        # vnstatd
                        ##
                        
                        # switch to given user when started as root (leave empty to disable)
                        DaemonUser ""
                        
                        # switch to given user when started as root (leave empty to disable)
                        DaemonGroup ""
                        
                        # how often (in seconds) interface data is updated
                        UpdateInterval 30
                        
                        # how often (in seconds) interface status changes are checked
                        PollInterval 5
                        
                        # how often (in minutes) data is saved to file
                        SaveInterval 5
                        
                        # how often (in minutes) data is saved when all interface are offline
                        OfflineSaveInterval 30
                        
                        # how often (in minutes) bandwidth detection is redone when
                        # BandwidthDetection is enabled (0 = disabled)
                        BandwidthDetectionInterval 5
                        
                        # force data save when interface status changes (1 = enabled, 0 = disabled)
                        SaveOnStatusChange 1
                        
                        # enable / disable logging (0 = disabled, 1 = logfile, 2 = syslog)
                        UseLogging 2
                        
                        # create dirs if needed (1 = enabled, 0 = disabled)
                        CreateDirs 1
                        
                        # update ownership of files if needed (1 = enabled, 0 = disabled)
                        UpdateFileOwner 1
                        
                        # file used for logging if UseLogging is set to 1
                        LogFile "/var/log/vnstat/vnstat.log"
                        
                        # file used as daemon pid / lock file
                        PidFile "/var/run/vnstat/vnstat.pid"
                        
                        # vnstati
                        ##
                        
                        # title timestamp format
                        HeaderFormat "%x %H:%M"
                        
                        # show hours with rate (1 = enabled, 0 = disabled)
                        HourlyRate 1
                        
                        # show rate in summary (1 = enabled, 0 = disabled)
                        SummaryRate 1
                        
                        # layout of summary (1 = with monthly, 0 = without monthly)
                        SummaryLayout 1
                        
                        # transparent background (1 = enabled, 0 = disabled)
                        TransparentBg 0
                        
                        # image colors
                        CBackground     "FFFFFF"
                        CEdge           "AEAEAE"
                        CHeader         "606060"
                        CHeaderTitle    "FFFFFF"
                        CHeaderDate     "FFFFFF"
                        CText           "000000"
                        CLine           "B0B0B0"
                        CLineL          "-"
                        CRx             "92CF00"
                        CTx             "606060"
                        CRxD            "-"
                        CTxD            "-"
                        

                        Then : service vnstat onerestart
                        Now I have this error message:

                        vnstat not running? (check /var/run/vnstat/vnstat.pid).
                        Starting vnstat.
                        Bad -c option
                        /usr/local/etc/rc.d/vnstat: WARNING: failed to start vnstat
                        

                        I search over the Internet,
                        I saw there is another location for NIC database (ie. https://doc.pfsense.org/index.php/Vnstat) in : /conf/vnstat but it doesn't help
                        seems I'm the only one in this situation…

                        So vnstat do not want to start, and I really don't know where is this -c option ?

                        BTW how looks your /usr/local/etc/vnstat.conf ?

                        –-
                        2.3.2-RELEASE-p1 (amd64)
                        built on Fri Sep 30 14:36:56 CDT 2016
                        FreeBSD 10.3-RELEASE-p9

                        1 Reply Last reply Reply Quote 0
                        • R
                          rcienfuegos
                          last edited by

                          what if i didn't want to loose data :(

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