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

Disappearing hosts from host list

Scheduled Pinned Locked Moved Unsolved
General
7
82
28.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.
  • C
    cajos001
    last edited by Jan 10, 2017, 12:14 PM

    I upgraded from 1.2.0 to 1.3.0 yesterday and have the same problem as Foglalt. The hosts and printers are in the database but cannot be listed in the FOG web application. I’ve also done the steps detailed here https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL#Hosts_think_they_are_not_registered_.2F_can.27t_register_.2F_Already_Registered_.2F_other_weirdness
    without success.

    I would now like to try to get a fresh start as my database began it’s life in 2009. I’ve backed up my database and exported my hosts, printers etc to csv files so I can copy paste the information back into the FOG GUI. How do I make a fresh empty FOG database but keep my settings?

    W 1 Reply Last reply Jan 10, 2017, 11:58 PM Reply Quote 0
    • W
      Wayne Workman @cajos001
      last edited by Wayne Workman Jan 10, 2017, 5:58 PM Jan 10, 2017, 11:58 PM

      @cajos001 said in Disappearing hosts from host list:

      I’ve backed up my database and exported my hosts, printers etc to csv files so I can copy paste the information back into the FOG GUI. How do I make a fresh empty FOG database but keep my settings?

      I know you said you have copies of your data, but the instructions I give you will also include taking another backup.

      SSH to your fog server (or log into it and open terminal). Become root with sudo -i

      backup the fog db with mysqldump -D fog > /root/fogdbbackup.sql
      Then just drop the fog database as so:

      mysql
      drop database fog;
      exit
      

      Then re-run the fog 1.3.0 installer. It’ll rebuild the DB for you.

      If this goes south, you can always import the old db like this:

      mysql -D fog < /root/fogdbbackup.sql

      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/

      C 2 Replies Last reply Jan 11, 2017, 9:29 AM Reply Quote 0
      • C
        cajos001 @Wayne Workman
        last edited by Jan 11, 2017, 9:29 AM

        @Wayne-Workman Thanks Wayne, I have followed your instructions and have a new fresh installation to work with.

        1 Reply Last reply Reply Quote 0
        • C
          cajos001 @Wayne Workman
          last edited by Jan 11, 2017, 3:31 PM

          @Wayne-Workman It worked perfectly, Thanks.

          1 Reply Last reply Reply Quote 2
          • F
            Foglalt
            last edited by Feb 13, 2017, 9:00 AM

            Case reopened. I still use version 1.3.0 (well, have no time to test all versions in the last few subversions were fast to come out). Last time i could not register new host cos it said mac already used. not it says hostname exists, but i cant find it. (well, the new host lister part in gui is strange for me, but other hosts it list i search for but not this particular one).

            Do you maybe have another tip what is it? (i did what you suggested last time, but now it “affected zero rows” now).

            W 1 Reply Last reply Feb 14, 2017, 12:47 AM Reply Quote 0
            • W
              Wayne Workman @Foglalt
              last edited by Feb 14, 2017, 12:47 AM

              @Foglalt said in Disappearing hosts from host list:

              Do you maybe have another tip what is it? (i did what you suggested last time, but now it “affected zero rows” now).

              1.3.0 was such a massive improvement, but it does have issues. 1.3.4 is the current stable and it’s pretty good. I would first recommend upgrading to 1.3.4 to see if this solves your issue.

              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/

              1 Reply Last reply Reply Quote 0
              • F
                Foglalt
                last edited by Foglalt Feb 14, 2017, 4:47 AM Feb 14, 2017, 10:43 AM

                @Wayne-Workman

                I did upgrade, but sadly it says that “hostname exists already”. as i am not an sql pro, can you pls tell me what else can be done to find reason fo it? 🙂

                one more thing. as it first occured the colleague who found this issue uses his own “clone hosts” and when imaging comes, he only renew MAC of the new hw, changes image if needed, but hostname or host “item” is not deleted. it sounded absolutely working, but does it any wrong? (in my logic it doesnt, but pls confirm me)

                1 Reply Last reply Reply Quote 0
                • F
                  Foglalt
                  last edited by Feb 16, 2017, 11:54 AM

                  Additional information, until you can suggest me anything how to remove the unwanted “already registered” host i watched the database with a browser to see manually under the hood. host is actually there in hosts table. as i dont know the links of tables i wont delete it 🙂 but it may help if u need more info on this issue.

                  so, @Wayne-Workman or @Tom-Elliott 🙂 (or anyone ofc) what can i do with this “lost” host in the database?

                  W 1 Reply Last reply Feb 16, 2017, 2:22 PM Reply Quote 0
                  • W
                    Wayne Workman @Foglalt
                    last edited by Wayne Workman Feb 16, 2017, 8:26 AM Feb 16, 2017, 2:22 PM

                    @Foglalt

                    So, the only reason why a host would exist in the hosts table but not appear in the web interface is if it doesn’t have a MAC address or if it’s pending. Time to dig in.

                    Jot down the exact hostname on paper, case sensitive. Then do the below, replacing the hostname with the one you wrote down and later the hostID, at the CLI:

                    mysql -D fog
                    select * from hosts where hostname='theHostname';
                    

                    Note the hostID of the data returned (if any). Take that ID and then do this query:

                    select * from hostMAC where hmHostID='numberHere';
                    

                    Anything returned? Please share what you find, if you copy/paste then use the code tool when posting here, the button looks like this in the editing area: </>

                    You exit MySQL CLI with the command quit

                    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/

                    1 Reply Last reply Reply Quote 0
                    • F
                      Foglalt
                      last edited by george1421 Feb 16, 2017, 10:01 AM Feb 16, 2017, 3:43 PM

                      sorry for ugly output, from phone it is hard 🙂 seems it has mac associated. what does pending means in this context?

                      +------+----------+-------------------+--------+-----------+-----------+--------                                                                                                                                                             --------+-----------------+
                      | hmID | hmHostID | hmMAC             | hmDesc | hmPrimary | hmPending | hmIgnor                                                                                                                                                             eClient | hmIgnoreImaging |
                      +------+----------+-------------------+--------+-----------+-----------+--------                                                                                                                                                             --------+-----------------+
                      |  414 |      107 | 9c:5c:8e:93:ac:dc |        | 0         | 0         | 0                                                                                                                                                                           | 0               |
                      +------+----------+-------------------+--------+-----------+-----------+--------                                                                                                                                                             --------+-----------------+
                      1 row in set (0.00 sec)
                      
                      G 1 Reply Last reply Feb 16, 2017, 4:01 PM Reply Quote 0
                      • G
                        george1421 Moderator @Foglalt
                        last edited by Feb 16, 2017, 4:01 PM

                        @Foglalt I fixed your ugly output.

                        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
                        • Tom ElliottT
                          Tom Elliott
                          last edited by Feb 16, 2017, 4:33 PM

                          Pending means the mac address has been registered, but is not “official” yet.

                          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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          1 Reply Last reply Reply Quote 0
                          • F
                            Foglalt
                            last edited by Feb 17, 2017, 8:01 AM

                            @george1421 thx for helping me out!

                            @Tom-Elliott and what does “not official” means?

                            Btw if zero means it is not pending, how can i get rid of this host? As it has mac, mac is not pending is it a legit host playing hide and seek somehow? 🙂 Anyway i see one interesting thing. the problematic host’s mac has no primary flag. Can it be the problem? if i modify that from 0 to 1 maybe it comes back to visible? (can it be done with database browser anyway, or is it “rape” of the database integrity? 🙂

                            W 1 Reply Last reply Feb 18, 2017, 5:14 AM Reply Quote 0
                            • W
                              Wayne Workman @Foglalt
                              last edited by Wayne Workman Feb 17, 2017, 11:15 PM Feb 18, 2017, 5:14 AM

                              @Foglalt I just set all my MACs hmPending field to 0, everything is fine.

                              I need to see your problem myself. If you would message me via the forums messaging system, I can give you my email address and if you trust me enough, you can email me a copy of your database for me to look at. I should be able to very quickly figure out what’s wrong if I had a copy of your DB.

                              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/

                              1 Reply Last reply Reply Quote 0
                              • W
                                Wayne Workman @Foglalt
                                last edited by Wayne Workman Feb 21, 2017, 8:20 AM Feb 20, 2017, 5:19 PM

                                @Foglalt shared a copy of his DB with me, I have this figured out. It was related to the hmPrimary field in the hostMAC table.

                                FOG requires that each host have at least one MAC that is set to the primary. This host that is disappearing - for whatever reason - had a MAC associated to it that was not set as primary.

                                You can find all hosts that don’t have a primary MAC set with this command:

                                SELECT * FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1');
                                

                                And you can delete them with these commands:

                                DELETE FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1');
                                DELETE FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`);
                                

                                I’ve updated the wiki with this maintenance command

                                Also - I don’t know how you got a clear-text password into the hostADPass field inside the hosts table - that shouldn’t even be possible. I’m suspecting someone did some manual work in the database and did that.

                                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/

                                Tom ElliottT F 2 Replies Last reply Feb 20, 2017, 5:21 PM Reply Quote 0
                                • Tom ElliottT
                                  Tom Elliott @Wayne Workman
                                  last edited by Feb 20, 2017, 5:21 PM

                                  @Wayne-Workman Pretty much, yep. That’s the only way they could’ve done it. (The plain text password in the hostADPass field.)

                                  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! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 1
                                  • F
                                    Foglalt @Wayne Workman
                                    last edited by Feb 20, 2017, 7:51 PM

                                    @Wayne-Workman thx for the work. About primary. Can it be checked somehow by code that a host with no primary mac cannot be save? I think i have a guess how it came.

                                    That host field, the mac is normally updated when new cloning starts (we regularly do few hosts in pack as company now upgrades all pc “one by one”. I will check, but i think it is done as follows: new mac copied from hw library and pasted into for host record. Since now it has primary and other field, maybe colleague did it to other field, not the primary (he only deleted primary, then by mistake copied the new mac to nonpripary field.

                                    If possible, pls dont let it be updated if no primary mac entry exists. Maybe it prevents this. I will ask him how he does, but i fear he wont remember the exact process, as it is dont in “half robot” mode (tons of pcs are repared, etc).

                                    As for the hostADPass field. I forgot to ask it, but inspecting the problem i saw that, too. Is that field is for entering hosts to domain? I was not even aware that they use it. As far as i remember it is dont by scripting on the host, not by fog at all.

                                    @Tom-Elliott No, none did any manual work about that password 🙂 Those who use fog for imaging, well, dont even care how it works. 🙂 I will ask them, but i am totally sure they will be surprised even hearing it! (and shocked that password thing)

                                    F 1 Reply Last reply Feb 22, 2017, 12:46 PM Reply Quote 0
                                    • F
                                      Foglalt @Foglalt
                                      last edited by Feb 22, 2017, 12:46 PM

                                      Just for your intention: that strange user and password that was found in our database is even more strange. Those are actually fog users and passwords saved with host data. Fog client was never used in our environment and all (which would require ad passwords maybe).

                                      Even more, user for ad cannot be saved from host or image gui part. None of my colleagues use any of db manipulating software (actually never ever used for any purpose 🙂 ). This means that those fields are mysteriously got those info!

                                      This database was created with version 1.2.0, previous db was not used at all only as reference for the new database building (hosts are mass imported from newly created lists coming from other source).

                                      So, if our database is corrupted somehow, we dont have no clue how it was done.

                                      W 1 Reply Last reply Feb 22, 2017, 2:07 PM Reply Quote 0
                                      • W
                                        Wayne Workman @Foglalt
                                        last edited by Wayne Workman Feb 22, 2017, 8:08 AM Feb 22, 2017, 2:07 PM

                                        @Foglalt Is the original problem solved though? Were you able to register those disappeared hosts now?

                                        If you want to dig into the DB issues, that should be another thread.

                                        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/

                                        1 Reply Last reply Reply Quote 0
                                        • F
                                          Foglalt
                                          last edited by Foglalt Feb 24, 2017, 7:17 AM Feb 24, 2017, 1:17 PM

                                          Sorry, i wasnot aware that I didnt press post on my reaction to this topic (pc left on when i went home and family killed memory fagments :D)

                                          Yes, missing host issue was fixed. After that i could register that host again! THX for cooperation and kind help!

                                          Anyway can i “mark it solved” somehow?

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 5
                                          • 1 / 5
                                          • First post
                                            Last post

                                          176

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project