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

FOG Client Authentication after cloning Windows

Scheduled Pinned Locked Moved
FOG Problems
2
6
1.0k
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.
  • A
    altitudehack
    last edited by Apr 1, 2021, 2:20 PM

    Cloned a VM through ESXi and can’t get the FOG service to register the new clone. I reset the authentication token on the original VM, uninstalled/reinstalled the client on the clone, but get this in the fog.log:

    
    ------------------------------------------------------------------------------
    --------------------------------Authentication--------------------------------
    ------------------------------------------------------------------------------
     4/1/2021 7:59:14 AM Client-Info Version: 0.12.0
     4/1/2021 7:59:14 AM Client-Info OS:      Windows
     4/1/2021 7:59:14 AM Middleware::Authentication Waiting for authentication timeout to pass
     4/1/2021 8:01:14 AM Middleware::Communication Download: https://fogserver.my-domain.com/fog/management/other/ssl/srvpublic.crt
     4/1/2021 8:01:14 AM Data::RSA FOG Server CA cert found
     4/1/2021 8:01:14 AM Middleware::Authentication Cert OK
     4/1/2021 8:01:14 AM Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before
     4/1/2021 8:01:14 AM Middleware::Authentication ERROR: Could not get security token
     4/1/2021 8:01:14 AM Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'.
     4/1/2021 8:01:14 AM Middleware::Communication POST URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&authorize&newService
     4/1/2021 8:01:14 AM Middleware::Response Invalid host
     4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/register.php?hostname=hostname&mac=00:50:56:xx:xx:xx|54:31:FA:xx:xx:xx&newService&json
    
    
     4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&configure&newService&json
     4/1/2021 8:01:14 AM Middleware::Response Success
     4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/management/index.php?sub=requestClientInfo&mac=00:50:56:xx:xx:xx|54:31:FA:xx:xx:xx&newService&json
     4/1/2021 8:01:14 AM Middleware::Response Invalid host
     4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/getversion.php?clientver&newService&json
     4/1/2021 8:01:14 AM Middleware::Communication URL: https://fogserver.my-domain.com/fog/service/getversion.php?newService&json
    
     4/1/2021 8:01:14 AM Service Creating user agent cache
     4/1/2021 8:01:14 AM Middleware::Response Module is disabled on the host
     4/1/2021 8:01:14 AM Middleware::Response Module is disabled on the host
     4/1/2021 8:01:14 AM Middleware::Response Module is disabled globally on the FOG server
     4/1/2021 8:01:14 AM Service Initializing modules
    
    ------------------------------------------------------------------------------
    ---------------------------------ClientUpdater--------------------------------
    ------------------------------------------------------------------------------
     4/1/2021 8:01:15 AM Client-Info Client Version: 0.12.0
     4/1/2021 8:01:15 AM Client-Info Client OS:      Windows
     4/1/2021 8:01:15 AM Client-Info Server Version: 1.5.9.63
     4/1/2021 8:01:15 AM Middleware::Response Success
    ------------------------------------------------------------------------------
    
    1 Reply Last reply Reply Quote 0
    • A
      altitudehack
      last edited by Apr 1, 2021, 5:17 PM

      I followed the steps here to reset encryption data for all clients:
      https://wiki.fogproject.org/wiki/index.php?title=FOG_Client#Reset_encryption_data

      [Cent-7:root@fog ~]# mysql -uroot -p
      Enter password: 
      Welcome to the MariaDB monitor.  Commands end with ; or \g.
      Your MariaDB connection id is 184497
      Server version: 10.5.9-MariaDB MariaDB Server
      
      Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
      
      Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
      
      MariaDB [(none)]> use fog;
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A
      
      Database changed
      MariaDB [fog]> UPDATE hosts SET hostPubKey="", hostSecToken="", hostSecTime="0000-00-00 00:00:00";
      Query OK, 61 rows affected (0.001 sec)
      Rows matched: 66  Changed: 61  Warnings: 0
      
      MariaDB [fog]> quit
      Bye
      

      and waited a couple hours but still don’t see the client under pending.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by Apr 2, 2021, 6:45 AM

        @altitudehack Probably a duplicate MAC issue. Search the forums for this to find instructions in how to dig into this.

        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

        A 1 Reply Last reply Apr 8, 2021, 1:16 PM Reply Quote 1
        • A
          altitudehack @Sebastian Roth
          last edited by altitudehack Apr 8, 2021, 7:16 AM Apr 8, 2021, 1:16 PM

          @sebastian-roth I searched the forums for duplicate MAC and found this thread that pointed to the database maintenance commands, which I ran. I replaced DELETE with SELECT * to get some idea of what would change, however all results were Empty set:

          MariaDB [fog]> select * FROM `hosts` WHERE `hostID` = '0';
          Empty set (0.000 sec)
          
          MariaDB [fog]> select * FROM `hostMAC` WHERE hmID = '0' OR `hmHostID` = '0';
          Empty set (0.000 sec)
          
          MariaDB [fog]> select * FROM `groupMembers` WHERE `gmID` = '0' OR `gmHostID` = '0' OR `gmGroupID` = '0';                                                   
          Empty set (0.000 sec)
          
          MariaDB [fog]> SELECT * FROM `snapinGroupAssoc` WHERE `sgaID` = '0' OR `sgaSnapinID` = '0' OR `sgaStorageGroupID` = '0';                                   
          Empty set (0.001 sec)
          
          MariaDB [fog]> SELECT * from `snapinAssoc` WHERE `saID` = '0' OR `saHostID` = '0' OR `saSnapinID` = '0';                                                   
          Empty set (0.015 sec)
          
          MariaDB [fog]> SELECT * FROM `hosts` WHERE `hostID` NOT IN (SELECT `hmHostID` FROM `hostMAC` WHERE `hmPrimary` = '1');                                     
          Empty set (0.001 sec)
          
          MariaDB [fog]> SELECT * FROM `hostMAC` WHERE `hmhostID` NOT IN (SELECT `hostID` FROM `hosts`);
          Empty set (0.000 sec)
          
          MariaDB [fog]> SELECT * FROM `snapinAssoc` WHERE `saHostID` NOT IN (SELECT `hostID` FROM `hosts`);
          Empty set (0.000 sec)
          
          MariaDB [fog]> SELECT * FROM `groupMembers` WHERE `gmHostID` NOT IN (SELECT `hostID` FROM `hosts`);
          Empty set (0.000 sec)
          
          MariaDB [fog]> SELECT * FROM `tasks` WHERE `taskStateID` IN ("1","2","3");
          Empty set (0.000 sec)
          
          MariaDB [fog]> SELECT * FROM `snapinTasks` WHERE `stState` in ("1","2","3");
          Empty set (0.000 sec)
          
          MariaDB [fog]> TRUNCATE TABLE multicastSessions; 
          Query OK, 0 rows affected (0.011 sec)
          
          MariaDB [fog]> TRUNCATE TABLE multicastSessionsAssoc;
          Query OK, 0 rows affected (0.020 sec)
          
          MariaDB [fog]> SELECT * FROM tasks WHERE taskTypeId=8;
          Empty set (0.000 sec)
          
          MariaDB [fog]> TRUNCATE TABLE history;
          Query OK, 0 rows affected (0.025 sec)
          
          MariaDB [fog]> TRUNCATE TABLE userTracking;
          Query OK, 0 rows affected (0.016 sec)
          

          I also found my old thread on adding exclusions to the MAC table and added an entry for the VPN software, however the newly cloned host is still not showing up.

          1 Reply Last reply Reply Quote 0
          • S
            Sebastian Roth Moderator
            last edited by Apr 8, 2021, 7:09 PM

            @altitudehack Maybe this topic is helpful: https://forums.fogproject.org/topic/14392/fog-client-error-middleware-authentication-error-could-not-get-security-token/15

            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

            A 1 Reply Last reply Apr 8, 2021, 7:54 PM Reply Quote 1
            • A
              altitudehack @Sebastian Roth
              last edited by Apr 8, 2021, 7:54 PM

              @sebastian-roth Yes, you’re absolutely right! The original had a secondary MAC matching the clone. I deleted it and expect the clone to show up shortly. Thanks for your patience! 🙂

              1 Reply Last reply Reply Quote 1
              • 1 / 1
              1 / 1
              • First post
                5/6
                Last post

              258

              Online

              12.0k

              Users

              17.3k

              Topics

              155.2k

              Posts
              Copyright © 2012-2024 FOG Project