The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bandwidth SQLite errors moving from cPanel to cPanel

Discussion in 'Database Discussions' started by brt, Aug 30, 2016.

Tags:
  1. brt

    brt Well-Known Member

    Joined:
    Jul 9, 2015
    Messages:
    46
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    MN
    cPanel Access Level:
    Root Administrator
    I've been getting random warnings about the bandwidth sqlite database when moving accounts. Both servers are current RELEASE, 58.0.24.

    Warnings are as follows:

    RESTORE: 16 completed, 2 had warnings, and 0 failed.

    RESTORE: Account “xxxxxxxxxx”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID 9t5bkh) Database /var/cpanel/bandwidth/xxxxxxxxxx.sqlite Error: UNIQUE constraint failed: metadata.key

    RESTORE: Account “yyyyyyyyyy”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID rfu4s7) Database /var/cpanel/bandwidth/yyyyyyyyyy.sqlite Error: UNIQUE constraint failed: metadata.key


    As far as I know it doesn't actually cause any problem, but it seems like something that would be trivial to fix. Just making sure it's on someone's radar...
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Here's the section of the 11.52 release notes regarding bandwidth graphs that explains how it works:

    Thus, new bandwidth calculation should function normally for those transferred accounts. However, we should still investigate why those error messages occurred. Do those accounts still exist on the source server? If so, could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  3. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Did you find a solution about this. I made WHM to WHM transfer "cPanel & WHM 64.0 (build 29)" from a VDS to other, it gave these errors. Then I made the transfer from the VDS to a dedicated server after a couple of months, it gave almost the same errors again;

    Code:
    RESTORE: Account “diveandwalk”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID zcpb6m) The system received an error from the “SQLite” database “/var/cpanel/bandwidth/diveandwalk.sqlite”: SQLITE_CONSTRAINT (UNIQUE constraint failed: metadata.key)
    RESTORE: Account “metintopa”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID z3xxra) The system received an error from the “SQLite” database “/var/cpanel/bandwidth/metintopa.sqlite”: SQLITE_CONSTRAINT (UNIQUE constraint failed: metadata.key)
    RESTORE: Account “fahirozer”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID 8bc5yg) The system received an error from the “SQLite” database “/var/cpanel/bandwidth/fahirozer.sqlite”: SQLITE_CONSTRAINT (UNIQUE constraint failed: metadata.key)
    RESTORE: Account “rumelcng”: Warnings
    The system failed to import data from the RRDTool files into the user’s bandwidth database because of an error: (XID arf65e) The system received an error from the “SQLite” database “/var/cpanel/bandwidth/rumelcng.sqlite”: SQLITE_CONSTRAINT (UNIQUE constraint failed: metadata.key)
    
    Is there a solution for this?
     
    #3 hayridumanli, Jul 4, 2017
    Last edited by a moderator: Jul 5, 2017
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Those warning messages should not prevent the transfer from completing. It's a warning that indicates the transfer tool was unable to import the previous RRDTool bandwidth data into the user’s new bandwidth database. This can happen if the source server uses a different architecture (e.g. 32-bit) or if the SQLite files on the source server are corrupt. This will not prevent the calculation of new bandwidth data on the destination server.

    Thank you.
     
  5. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Thank you for your reply.
    1) Is there a way to repair these SQLite files?
    2) Or is there a way to delete all old bandwidth datas for corrupted accounts, so the bandwidth database starts from the zero
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You should not have to take any additional actions once the accounts are transferred. The warning message shouldn't prevent the transfer of the account from completing, and a new bandwidth file should automatically generate for the new account on the destination server.

    Thank you.
     
  7. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    All the accounts are already transferred. And all of them (websites, mail accounts, etc.) are working without any problem as you said. But as I said before, those errors happened twice, from first VDS to second VDS, then from second VDS to a dedicated server. I had noted at the end of first transfer to write this forum, but I had to make second transfer in a short time, same accounts gave same errors. So, it means that a new bandwidth file hasn't been generated automatically.
    Maybe it's not a big deal as you try to say, but small errors can cause bigger ones in the future, so I wanted to learn about it.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,037
    Likes Received:
    1,278
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look and see what's possibly corrupting the SQLite bandwidth files?

    Thank you.
     
  9. hayridumanli

    hayridumanli Member

    Joined:
    Jan 11, 2014
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    I opened a support ticket;
    Your Support Request ID is: 8694497
     
Loading...

Share This Page