• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Is this a problem in my database?

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    7
    2.3k
    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.
    • johnomazJ
      johnomaz
      last edited by

      fog.hosts
      warning  : Found row where the auto_increment column has the value 0
      status   : OK
      
      
      
      fog.moduleStatusByHost
      warning  : Found row where the auto_increment column has the value 0
      status   : OK
      
      

      Are those warnings ok to ignore? I checked the integrity of my database in preparation of replacing my fog server and those two came up.

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        We should first start out with what version of FOG are you using? Are you using the 1.2.0 release or a SVN trunk version. If it is a SVN trunk version what is the version number?

        As for is this a problem, I’ll have to defer to the developers. Just off the top of my head, I would have to say yes this should be concerning.

        1. Since they are checking for it, there may have been a problem in the past with this being set to 0
        2. The function of an auto increment column is to generate a sequential number, typically starting at 1.

        But, only the @Developers know if it WILL BE a problem moving forward.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • johnomazJ
          johnomaz
          last edited by

          Sorry, yes I’m running an SVN version. 5171 to be exact. I’m staying on this version for now until I get my new hardware. My current machine is limping along.

          I’ve googled the error and read both its ok to ignore and not ok to ignore. I know auto_increments shouldn’t be zero but am unsure if thats something set by the devs on purpose or if its an error.

          Wayne WorkmanW 1 Reply Last reply Reply Quote 0
          • Wayne WorkmanW
            Wayne Workman @johnomaz
            last edited by Wayne Workman

            @johnomaz

            mysql
            use fog
            select * from hosts where hostID = 0;
            

            That will give you a little list of the problem hosts.

            If the host is also in a group, you’ll need to remove it first:

            DELETE FROM groupMembers WHERE gmHostID = (SELECT hostId FROM hosts WHERE hostName="HOSTNAME") AND gmGroupID = (SELECT groupID FROM groups WHERE groupName="GROUPNAME");
            

            Reference: https://forums.fogproject.org/topic/5478/can-t-delete-host-from-group/5

            You can delete the individual hosts like this:

            delete from hosts where hostID = 0;
            

            Reference: https://forums.fogproject.org/topic/5479/invalid-host-id-0-has-name-and-imageid-no-mac-address/3

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
            Daily Clean Installation Results:
            https://fogtesting.fogproject.us/
            FOG Reporting:
            https://fog-external-reporting-results.fogproject.us/

            johnomazJ 1 Reply Last reply Reply Quote 0
            • johnomazJ
              johnomaz @Wayne Workman
              last edited by

              @Wayne-Workman I removed the row from both tables that had teh value of 0 and those appear to be fine. the hostID was of a computer from a group of computers I had to remove manually before but probably missed that one. I now get this:

              fog.userTracking
              error    : Found key at page 29025280 that points to record outside datafile
              error    : Corrupt
              
              

              I know what that table is used for and where the data is displayed but no sure how to remove that entry. Also, could I simply empty the table since I don’t worry about who logs into and out of the computers. I’ve had to refer to it maybe twice in the last 8 or so years.

              Wayne WorkmanW 1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman @johnomaz
                last edited by

                @johnomaz These are the columns in the userTracking table.

                MariaDB [fog]> show columns in userTracking;
                +------------+--------------+------+-----+-------------------+----------------+
                | Field      | Type         | Null | Key | Default           | Extra          |
                +------------+--------------+------+-----+-------------------+----------------+
                | utID       | int(11)      | NO   | PRI | NULL              | auto_increment |
                | utHostID   | int(11)      | NO   | MUL | NULL              |                |
                | utUserName | varchar(50)  | NO   | MUL | NULL              |                |
                | utAction   | varchar(2)   | NO   | MUL | NULL              |                |
                | utDateTime | timestamp    | NO   | MUL | CURRENT_TIMESTAMP |                |
                | utDesc     | varchar(250) | NO   |     | NULL              |                |
                | utDate     | date         | NO   |     | NULL              |                |
                | utAnon3    | varchar(2)   | NO   |     | NULL              |                |
                +------------+--------------+------+-----+-------------------+----------------+
                8 rows in set (0.00 sec)
                

                See how I used the command show columns in userTracking; ? this works with any table. There is also show tables; too.

                Why not search that table for a hostID that is 0? What would the SQL query be? Look at the field names in the table, look at the examples from my last post.

                Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                johnomazJ 1 Reply Last reply Reply Quote 0
                • johnomazJ
                  johnomaz @Wayne Workman
                  last edited by johnomaz

                  @Wayne-Workman I get that and I used describe userTracking. There is no utID or utHostID equal to 0 in the table userTracking.

                  I ran

                  select * from userTracking where utHostID = 0;
                  

                  It returns Empty set.

                  I also checked to see if there was a utID of 29025280 since that is the row its referencing and it returns Empty set too. I realize now that the page number changes since users are logging in constantly on my site.


                  Just emptied that table. the data in it wasn’t relavent to me and I turned off the usertracking service for the time being too. The error is gone now. However, a machine that has been in FOG for a very long time has changed its ID to zero now. Not sure how or why but it did. It is also no longer listed in the host lists on the website but I know it was this summer when I imaged the thing.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post

                  208

                  Online

                  12.0k

                  Users

                  17.3k

                  Topics

                  155.2k

                  Posts
                  Copyright © 2012-2024 FOG Project