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

FOG Client error: Middleware::Authentication ERROR: Could not get security token

Scheduled Pinned Locked Moved Solved
FOG Problems
3
15
1.8k
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 16, 2020, 8:25 PM

    Updated the server and reinstalled the client on this host and I cannot seem to get the client to connect and auto-register. Maybe I could push it manually from a pxe boot but believe I had the process automated before. It is not listed under Pending Hosts either.


    FOG.log on the client

    ------------------------------------------------------------------------------
    --------------------------------Authentication--------------------------------
    ------------------------------------------------------------------------------
     4/16/2020 3:11:10 PM Client-Info Version: 0.11.19
     4/16/2020 3:11:10 PM Client-Info OS:      Windows
     4/16/2020 3:11:10 PM Middleware::Authentication Waiting for authentication timeout to pass
     4/16/2020 3:11:10 PM Middleware::Communication Download: http://fogserver/fog/management/other/ssl/srvpublic.crt
     4/16/2020 3:11:10 PM Data::RSA FOG Server CA cert found
     4/16/2020 3:11:10 PM Middleware::Authentication Cert OK
     4/16/2020 3:11:10 PM Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before
     4/16/2020 3:11:10 PM Middleware::Authentication ERROR: Could not get security token
     4/16/2020 3:11:10 PM Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'.
     4/16/2020 3:11:10 PM Middleware::Communication POST URL: http://fogserver/fog/management/index.php?sub=requestClientInfo&authorize&newService
     4/16/2020 3:11:10 PM Middleware::Response Invalid security token
    
    ------------------------------------------------------------------------------
    --------------------------------Authentication--------------------------------
    ------------------------------------------------------------------------------
     4/16/2020 3:11:10 PM Client-Info Version: 0.11.19
     4/16/2020 3:11:10 PM Client-Info OS:      Windows
     4/16/2020 3:11:10 PM Middleware::Authentication Waiting for authentication timeout to pass
     4/16/2020 3:13:10 PM Middleware::Communication Download: http://fogserver/fog/management/other/ssl/srvpublic.crt
     4/16/2020 3:13:10 PM Data::RSA FOG Server CA cert found
     4/16/2020 3:13:10 PM Middleware::Authentication Cert OK
     4/16/2020 3:13:10 PM Middleware::Authentication No token found at C:\Program Files (x86)\FOG\token.dat, this is expected if the client has not authenticated before
     4/16/2020 3:13:10 PM Middleware::Authentication ERROR: Could not get security token
     4/16/2020 3:13:10 PM Middleware::Authentication ERROR: Could not find file 'C:\Program Files (x86)\FOG\token.dat'.
     4/16/2020 3:13:10 PM Middleware::Communication POST URL: http://fogserver/fog/management/index.php?sub=requestClientInfo&authorize&newService
     4/16/2020 3:13:10 PM Middleware::Response Invalid security token
    
    ------------------------------------------------------------------------------
    --------------------------------Authentication--------------------------------
    ------------------------------------------------------------------------------
     4/16/2020 3:13:10 PM Client-Info Version: 0.11.19
     4/16/2020 3:13:10 PM Client-Info OS:      Windows
     4/16/2020 3:13:10 PM Middleware::Authentication Waiting for authentication timeout to pass
    

    apache access_log on fogserver

    <Client_IP_Address> - - [16/Apr/2020:15:11:09 -0500] "GET /fog/management/other/ssl/srvpublic.crt HTTP/1.1" 200 1744 "-" "-"
    <Client_IP_Address> - - [16/Apr/2020:15:11:10 -0500] "POST /fog/management/index.php?sub=requestClientInfo&authorize&newService HTTP/1.1" 200 15 "-" "-"
    <Client_IP_Address> - - [16/Apr/2020:15:13:09 -0500] "GET /fog/management/other/ssl/srvpublic.crt HTTP/1.1" 200 1744 "-" "-"
    <Client_IP_Address> - - [16/Apr/2020:15:13:09 -0500] "POST /fog/management/index.php?sub=requestClientInfo&authorize&newService HTTP/1.1" 200 15 "-" "-"
    
    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Apr 16, 2020, 8:53 PM

      @altitudehack said in FOG Client error: Middleware::Authentication ERROR: Could not get security token:

      Middleware::Response Invalid security token

      This message in the log tells us that there seems to be an existing host with the MAC this address and a security token set in the DB for this host. Try to find that in the database:

      shell> mysql -u fogmaster -p
      ...
      mysql> use fog;
      ...
      mysql> SELECT hostID,hostName,hostSecToken FROM hosts WHERE hostID IN (SELECT hmHostID FROM  hostMAC WHERE hmMAC LIKE '%00:00:00:00:00:01%');
      ...
      

      Put in the hosts MAC address instead of 00:00:00:00:00:01. You can find the DB credentials in /opt/fog/.fogsettings.

      If you can’t find anything in the DB using the primary MAC address of this host you might need to look at other MAC addresses, like wireless or VPN adapters. If you still can’t find it you might need to run wireshark on the host and capture the full HTTP traffic to find out what MAC addresses it sends over via POST parameters.

      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
      • A
        altitudehack
        last edited by Apr 17, 2020, 11:58 AM

        Hi Sebastian, thanks for the rapid and accurate response! I did find a duplicate of the MAC address which is because the clients all use a VPN.

        I added the first three parts of the MAC address (0A:00:27) into FOG Configuration -> FOG Settings -> FOG Client - Host Register -> QUICKREG PENDING MAC FILTER:
        Screenshot from 2020-04-17 06-55-27.png
        Isn’t that supposed to make it ignore the duplicate?

        In the meantime, I will try ignoring it via the duplicate host’s Additional MACs screen:
        Screenshot from 2020-04-17 06-56-56.png

        Please let me know if there’s a better or different approach I can take.

        1 Reply Last reply Reply Quote 0
        • S
          Sebastian Roth Moderator
          last edited by Apr 18, 2020, 7:08 AM

          @altitudehack Yeah, that pending MAC filter is supposed to do exactly that. Maybe there is an issue in that. Which version of FOG do you run?

          Just to make sure, please check to see if you have pending hosts in the list: http://x.x.x.x/fog/management/index.php?node=host&sub=pending (put in your FOG server’s IP instead of x.x.x.x)

          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 2 Replies Last reply Apr 20, 2020, 1:11 PM Reply Quote 0
          • A
            altitudehack @Sebastian Roth
            last edited by Apr 20, 2020, 1:11 PM

            @Sebastian-Roth Thanks for confirming the function of the pending MAC filter. Are the MAC addresses in the comma-separated list case-sensitive by chance?

            The computer was listed under Pending when I checked this morning with the primary MAC with the correct value but it also had an Additional MACs entry labeled Not found which matches the filter (I added the checkmarks):

            addl_MAC.png
            quickreg_filter.png
            Maybe I need to enter it again as 54:ea:3f?

            1 Reply Last reply Reply Quote 0
            • A
              altitudehack @Sebastian Roth
              last edited by Apr 20, 2020, 1:13 PM

              @Sebastian-Roth
              My version: Your version of FOG is up to date.
              You're running the latest dev-branch version: 1.5.8.28

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by Apr 20, 2020, 8:39 PM

                @altitudehack I will try to replicate the issue in the next days when I have a bit more time.

                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
                • S
                  Sebastian Roth Moderator
                  last edited by May 5, 2020, 9:41 PM

                  @altitudehack I still have this on my list. Sorry for taking so long. Will get to it soon.

                  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
                  • S
                    Sebastian Roth Moderator
                    last edited by May 11, 2020, 9:16 PM

                    @altitudehack I am very sorry it took so long to answer. I knew this one would be complicated and so I kept on putting it off. 😞

                    Have had a play with it just now and I found why the pending MAC filter isn’t working as expected. Though I wanna check with Tom about this before we fix it.

                    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
                    • A
                      altitudehack
                      last edited by altitudehack May 12, 2020, 9:29 AM May 12, 2020, 3:28 PM

                      @Sebastian-Roth, not a problem at all. I manually added the affected client.
                      Thank you for your genuine efforts and good luck sleuthing it out!

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by May 12, 2020, 3:48 PM

                        @altitudehack Ok this should be fixed in latest dev-branch now. Would you give it a try?

                        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

                        I 1 Reply Last reply May 21, 2020, 7:42 PM Reply Quote 0
                        • I
                          ITHand @Sebastian Roth
                          last edited by May 21, 2020, 7:42 PM

                          @Sebastian-Roth Hi, I had the same problem, and I had push the update 1.5.9-RC2 on my server, but the error still appear. I had reinstall the client to check if it’s the problem, with no changes…

                          A idea? I have more that 300 clients in this situation, it’s work when you made it manually, but …

                          Thank you!

                          ------------------------------------------------------------------------------
                          --------------------------------Authentication--------------------------------
                          ------------------------------------------------------------------------------
                           2020-05-21 15:30:36 Client-Info Version: 0.11.19
                           2020-05-21 15:30:36 Client-Info OS:      Windows
                           2020-05-21 15:30:36 Middleware::Authentication Waiting for authentication timeout to pass
                           2020-05-21 15:33:21 Main Overriding exception handling
                           2020-05-21 15:33:22 Main Bootstrapping Zazzles
                           2020-05-21 15:33:22 Controller Initialize
                           2020-05-21 15:33:22 Controller Start
                          
                           2020-05-21 15:33:22 Service Starting service
                           2020-05-21 15:33:27 Bus Became bus server
                           2020-05-21 15:33:27 Bus Emmiting message on channel: Status
                           2020-05-21 15:33:27 Service Invoking early JIT compilation on needed binaries
                          
                          ------------------------------------------------------------------------------
                          --------------------------------Authentication--------------------------------
                          ------------------------------------------------------------------------------
                           2020-05-21 15:33:27 Client-Info Version: 0.11.19
                           2020-05-21 15:33:27 Client-Info OS:      Windows
                           2020-05-21 15:33:27 Middleware::Authentication Waiting for authentication timeout to pass
                           2020-05-21 15:33:27 Middleware::Communication Download: http://172.xx.xx.xx/fog/management/other/ssl/srvpublic.crt
                           2020-05-21 15:33:27 Data::RSA FOG Server CA cert found
                           2020-05-21 15:33:27 Middleware::Authentication Cert OK
                           2020-05-21 15:33:27 Middleware::Communication POST URL: http://172.xx.xx.xx/fog/management/index.php?sub=requestClientInfo&authorize&newService
                           2020-05-21 15:33:27 Middleware::Response Invalid security token
                          
                          ------------------------------------------------------------------------------
                          --------------------------------Authentication--------------------------------
                          ------------------------------------------------------------------------------
                           2020-05-21 15:33:27 Client-Info Version: 0.11.19
                           2020-05-21 15:33:27 Client-Info OS:      Windows
                           2020-05-21 15:33:27 Middleware::Authentication Waiting for authentication timeout to pass
                          
                          
                          
                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by May 21, 2020, 9:27 PM

                            @ITHand Is this log from a client that is registered to the FOG server already or a new one?

                            What do you mean by “it’s work when you made it manually”??

                            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

                            I 1 Reply Last reply May 22, 2020, 7:10 PM Reply Quote 0
                            • I
                              ITHand @Sebastian Roth
                              last edited by May 22, 2020, 7:10 PM

                              @Sebastian-Roth It’s for a new client, and the registring work well when we process in the ipxe menu. It’s the “Auto register function” of the client that doesn’t work… I had made a clean install of the client, without success. About this, the SmartInstaller.exe -u for the uninstallation doesn’t work, nothing append. Thank you!

                              1 Reply Last reply Reply Quote 0
                              • S
                                Sebastian Roth Moderator
                                last edited by May 23, 2020, 2:03 PM

                                @ITHand Have you read through this topic start to end? May I ask you to do the database queries mentioned below and see if you can find out if one of the MAC addresses is already in the DB and which one it is. Take a very close look at all the network interfaces you have in your network manager on Windows - also tunnel interfaces and such.

                                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
                                • 1 / 1
                                • First post
                                  Last post

                                156

                                Online

                                12.0k

                                Users

                                17.3k

                                Topics

                                155.2k

                                Posts
                                Copyright © 2012-2024 FOG Project