Navigation

    FOG Project

    • Register
    • Login
    • Search
    • Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. kek
    K
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    kek

    @kek

    2
    Reputation
    25
    Posts
    460
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    kek Follow

    Best posts made by kek

    • RE: Incredibly slow logins to web interface

      @SNP said:

      I have the same problem in 1.20, can some one help me where i find where this javascrip are in 1.20.
      (From a big fan of fog, fog has saved us a lot of time.)

      For fog 1.20, files are located at:
      fog/management/ajax/login.info.php <- Comment out entire page after <?php
      fog/lib/fog/ProcessLogin.class.php <- Comment out lines 230-233 and 244

      posted in FOG Problems
      K
      kek
    • RE: FOGImageReplicator runs in a loop

      @Sebastian-Roth Thank you very much for your help! After you pointed me to the right file, i found a very easy and good working solution.

      /var/www/html/fog/lib/fog/fogbase.class.php:

      Changed line 2305 from:

      $size = filesize($file);
      

      to:

      $size = exec("stat -c %s ".$file);
      

      I found this nice solution over here:

      stackoverflow

      Reverted my changes that i showed in the last post, restarted FOGImageReplicator service, and it works perfect!

      We know that this can’t work for forever, and Updates are also nice and good, so we need to change a few internal things, and also reinstall this Server with x64 Debian.

      Thanks for your great support. Keep up this very very nice project!

      posted in FOG Problems
      K
      kek

    Latest posts made by kek

    • RE: FOG-Client suddenly stopped working

      @sebastian-roth said in FOG-Client suddenly stopped working:

      Is the srvpublic.crt still valid?

      Was the first thought, but no, its valid.

      Sorry for the late answer, very busy at the moment.

      posted in Linux Problems
      K
      kek
    • RE: FOG-Client suddenly stopped working

      I re-checked with my colleagues, not all clients have this Problem, just a few servers, so no problem to replace the Zazzles.dll, but with HTTPS, 1 in settings.json, (and newest 0.12.0 Version fog-client) we get:

      ------------------------------------------------------------------------------
      --------------------------------Authentication--------------------------------
      ------------------------------------------------------------------------------
       1/11/2021 12:34:34 PM Client-Info Version: 0.12.0
       1/11/2021 12:34:34 PM Client-Info OS:      Linux
       1/11/2021 12:34:34 PM Middleware::Authentication Waiting for authentication timeout to pass
       1/11/2021 12:34:34 PM Middleware::Communication Download: https://<fogdomain>/fog/management/other/ssl/srvpublic.crt
       1/11/2021 12:34:36 PM Data::RSA FOG Server CA cert found
       1/11/2021 12:34:36 PM Data::RSA ERROR: Certificate validation failed
       1/11/2021 12:34:36 PM Data::RSA ERROR: Trust chain did not complete to the known authority anchor. Errors: PartialChain (PartialChain)
       1/11/2021 12:34:36 PM Middleware::Communication SSL certificate chain error: NotTimeValid
       1/11/2021 12:34:36 PM Middleware::Communication ERROR: Could not download file
       1/11/2021 12:34:36 PM Middleware::Communication ERROR: Error: TrustFailure (Authentication failed, see inner exception.)
      
      posted in Linux Problems
      K
      kek
    • RE: FOG-Client suddenly stopped working

      @sebastian-roth said in FOG-Client suddenly stopped working:

      It’s strange/interesting you get this error just now. Possibly a Mono update on your Linux systems??

      No we use a fixed Version of Mono (Mono Repository with specific Version specified), but can’t tell you at the moment what version we are using exactly. We did no Updates on both Server and Client.

      Maybe we can find the Problem, with the new Information provided. I will try to manually replace the Zazzles.dll on one Client just to see if it works. We also have an Internal Repository, we could update the Mono-Package and create a package for the FOG-Client. But because we Updating our Clients also via FOG-Client we still need to touch them all, but with this solution we have at least a GUI to Update.

      posted in Linux Problems
      K
      kek
    • FOG-Client suddenly stopped working

      FOG-Client suddenly stopped working this Year. Nothing was changed. Output of the Client fog.log:

      Middleware::Communication Download: https://<fogdomain>/fog/management/other/ssl/srvpublic.crt
      Middleware::Communication ERROR: Could not download file
      Middleware::Communication ERROR: Error: TrustFailure (Authentication failed, see inner exception.)
      

      On Windows it is working without problems.
      We have about 100 Linux Clients, is there a server solution without touching them all?

      Thanks in advance!

      posted in Linux Problems
      K
      kek
    • RE: FOGImageReplicator runs in a loop

      @Sebastian-Roth Thank you very much for your help! After you pointed me to the right file, i found a very easy and good working solution.

      /var/www/html/fog/lib/fog/fogbase.class.php:

      Changed line 2305 from:

      $size = filesize($file);
      

      to:

      $size = exec("stat -c %s ".$file);
      

      I found this nice solution over here:

      stackoverflow

      Reverted my changes that i showed in the last post, restarted FOGImageReplicator service, and it works perfect!

      We know that this can’t work for forever, and Updates are also nice and good, so we need to change a few internal things, and also reinstall this Server with x64 Debian.

      Thanks for your great support. Keep up this very very nice project!

      posted in FOG Problems
      K
      kek
    • RE: FOGImageReplicator runs in a loop

      @Sebastian-Roth said in FOGImageReplicator runs in a loop:

      Do you have a 32 bit build of PHP installed on your FOG master server? What Linux OS is installed? Manually installed PHP e.g. from external repos?

      Yes back when the server was installed, the wrong ISO was picked because someone putted it in the x64 folder… It’s Debian 10 Buster (4.19.0-6-686-pae). PHP was installed via the foginstaller.

      For how long do you want to keep back on updating? Asking for things to get fixed but only updating partially is not playing nicely. You better find a good way to keep track of your customization to be able to merge this with new code or you might even share this and ask for it to be added to the official code.

      On our company we don’t update our linux infrastructure very often, and have much undocumented things, but thats an internal problem, that needs to be changed (and will hopefully in some time).

      Most of the customisation is also very company-specific.

      I temporarily set the filesequal variable to true to stop the loop. Code:

      $filesequal = true;
                              if ($filesequal != true) {
                                  $allsynced = false;
                                  self::outall(sprintf('  # %s: %s %s', $name, _('Deleting remote file'), $filename));
                                  self::$FOGFTP->delete($remotefilename);
                              } else {
                                  self::outall(sprintf(
                                      '  # %s: %s %s (%s)',
                                      $name,
                                      _('No need to sync. Temporarily turned off deletion...'),
                                      $filename,
                                      $nodename
                                  ));
                                  continue;
                              }
      
      
      posted in FOG Problems
      K
      kek
    • RE: FOGImageReplicator runs in a loop

      Sorry, i provided the wrong log:

      [10-20-20 6:51:04 pm] * Starting Image Replication.
      [10-20-20 6:51:04 pm] * We are group ID: 1. We are group name: Company
      [10-20-20 6:51:04 pm] * We are node ID: 1. We are node name: Location
      [10-20-20 6:51:04 pm] * Attempting to perform Group -> Group image replication.
      [10-20-20 6:51:04 pm] | Replicating postdownloadscripts
      [10-20-20 6:51:04 pm] * Found Image to transfer to 1 node
      [10-20-20 6:51:04 pm] | File Name: postdownloadscripts
      [10-20-20 6:51:06 pm] # postdownloadscripts: No need to sync fog.postdownload (LocationID2)
      [10-20-20 6:51:06 pm] * All files synced for this item.
      [10-20-20 6:51:06 pm] | Replicating postinitscripts
      [10-20-20 6:51:07 pm] * Found Image to transfer to 1 node
      [10-20-20 6:51:07 pm] | File Name: dev/postinitscripts
      [10-20-20 6:51:07 pm] | Location2 does not appear to be online.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I1
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I2
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I3
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I4
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I5
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Not syncing Image between groups
      [10-20-20 6:51:07 pm] | Image Name: I6
      [10-20-20 6:51:07 pm] | There are no other members to sync to.
      [10-20-20 6:51:07 pm] * Attempting to perform Group -> Nodes image replication.
      [10-20-20 6:51:07 pm] * Found Image to transfer to 1 node
      [10-20-20 6:51:07 pm] | Image Name: I1
      [10-20-20 6:51:10 pm] # I1: No need to sync I1.000 (Location2)
      [10-20-20 6:51:10 pm] * All files synced for this item.
      [10-20-20 6:51:10 pm] * Found Image to transfer to 1 node
      [10-20-20 6:51:10 pm] | Image Name: I2
      [10-20-20 6:51:13 pm] # I2: No need to sync I2.000 (Location2)
      [10-20-20 6:51:14 pm] * All files synced for this item.
      [10-20-20 6:51:14 pm] * Found Image to transfer to 1 node
      [10-20-20 6:51:14 pm] | Image Name: I3
      [10-20-20 6:51:15 pm] # I3: No need to sync d1.fixed_size_partitions (Location2)
      [10-20-20 6:51:17 pm] # I3: No need to sync d1.has_grub (Location2)
      [10-20-20 6:51:17 pm] # I3: No need to sync d1.mbr (Location2)
      [10-20-20 6:51:19 pm] # I3: No need to sync d1.minimum.partitions (Location2)
      [10-20-20 6:51:20 pm] # I3: No need to sync d1.original.fstypes (Location2)
      [10-20-20 6:51:21 pm] # I3: No need to sync d1.original.swapuuids (Location2)
      [10-20-20 6:51:22 pm] # I3: No need to sync d1.partitions (Location2)
      [10-20-20 6:51:22 pm] # I3: File size mismatch - d1p1.img: -2040571859 != 2254395437
      [10-20-20 6:51:22 pm] # I3: Deleting remote file d1p1.img
      [10-20-20 6:51:23 pm] * Starting Sync Actions
      [10-20-20 6:51:23 pm] | CMD: lftp -e 'set xfer:log 1; set xfer:log-file /opt/fog/log/fogreplicator.I3.transfer.Location2.log;set ftp:list-options -a;set net:max-retries 10;set net:timeout 30; mirror -c --parallel=20 -R --ignore-time -vvv --exclude ".srvprivate" "/images/I3" "/images/I3"; exit' -u fogproject,[Protected] xx.xx.xx.xx
      [10-20-20 6:51:23 pm] | Started sync for Image I3 - Resource id #4294
      

      Is there a way to not upgrade, because we customized a few files…
      It would be perfect if we could just replace the files.
      BTW: I updated the file /var/www/html/fog/lib/service/fogservice.class.php, still not working…
      FOG Master Server Version: 1.5.7
      FOG Storage Node Version: 1.5.8

      Thanks for the Help.

      posted in FOG Problems
      K
      kek
    • FOGImageReplicator runs in a loop

      We recently deployed a new storage node, it works fine except for the replicator service. At first it runs fine but before the files got fully replicated it seems that they’re got deleted and got replicated again, and again… In the logs are PHP Warnings about the fclose() function.

      Oct 19 19:49:22 srv020 FOGImageReplicator[14732]: Transferring file `d1p2.img'
      Oct 19 19:49:36 srv020 FOGImageReplicator[14732]: Transferring file `d1p4.img'
      Oct 19 20:00:33 srv020 FOGImageReplicator[14732]: Finished transfer `d1p1.img' (486.0 KiB/s)
      Oct 19 20:00:33 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose() expects parameter 1 to be resource, array given in /var/www/fog/lib/service/fogservice.class.php on line 995
      Oct 19 20:00:33 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose(): supplied resource is not a valid stream resource in /var/www/fog/lib/service/fogservice.class.php on line 997
      Oct 19 20:04:23 srv020 FOGImageReplicator[14732]: Finished transfer `d1p2.img' (613.3 KiB/s)
      Oct 19 20:04:23 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose() expects parameter 1 to be resource, array given in /var/www/fog/lib/service/fogservice.class.php on line 995
      Oct 19 20:04:23 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose(): supplied resource is not a valid stream resource in /var/www/fog/lib/service/fogservice.class.php on line 997
      Oct 19 20:09:19 srv020 FOGImageReplicator[14732]: Transferring file `d1p1.img'
      Oct 19 20:09:27 srv020 FOGImageReplicator[14732]: Transferring file `d1p2.img'
      Oct 19 21:27:36 srv020 FOGImageReplicator[14732]: Finished transfer `d1p1.img' (457.1 KiB/s)
      Oct 19 21:27:37 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose() expects parameter 1 to be resource, array given in /var/www/fog/lib/service/fogservice.class.php on line 995
      Oct 19 21:27:37 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose(): supplied resource is not a valid stream resource in /var/www/fog/lib/service/fogservice.class.php on line 997
      Oct 19 21:29:33 srv020 FOGImageReplicator[14732]: Transferring file `d1p1.img'
      Oct 19 21:33:55 srv020 FOGImageReplicator[14732]: Finished transfer `d1p2.img' (337.8 KiB/s)
      Oct 19 21:33:55 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose() expects parameter 1 to be resource, array given in /var/www/fog/lib/service/fogservice.class.php on line 995
      Oct 19 21:33:55 srv020 FOGImageReplicator[14732]: PHP Warning:  fclose(): supplied resource is not a valid stream resource in /var/www/fog/lib/service/fogservice.class.php on line 997
      

      Thanks for the help in advance.

      posted in FOG Problems
      K
      kek
    • RE: FOG Login with spaces in username

      I’m sorry I haven’t answered for so long, but I’ve been busy a lot and haven’t been able to address this issue until now.

      First i only got the login of the FOG local users to work with the solution provided by @Tom-Elliott.
      I could login with usernames the contain spaces with the following changes:

      user.class.php:
      Line 214:
      Change the relevant regex from:

      (?=^.{3,40}$)^[\w][\w0-9]*[._-]?[\w0-9]*[._-]?[\w0-9]+$
      

      to:

      (?=^.{3,40}$)^[\w][\w0-9]*[ ._-]?[\w0-9]*[ ._-]?[\w0-9]+$
      

      fog.user.js
      Comment out:

      //regex: /^[\w][\w0-9]*[._-]?[\w0-9]*[.]?[\w0-9]+$/
      

      When i tried to login with a domain user that contains spaces (users without spaces worked already) i got the same problem, no error but no login.

      Then i figured out that the LDAP plugin uses the same check and regex so i had to edit this too:

      ldap.class.php
      Comment out:

              /**
               * Test the username for funky characters and return
               * immediately if found.
               */
      //        $test = preg_match(
      //            '/(?=^.{3,40}$)^[\w][\w0-9]*[._-]?[\w0-9]*[.]?[\w0-9]+$/i',
      //            $user
      //        );
      //        if (!$test) {
      //            return false;
      //        }
      

      Now it works like a charm. 😃

      Thanks to all people that were involved in this.

      This can be marked as solved.

      posted in General Problems
      K
      kek
    • RE: FOG Login with spaces in username

      @Tom-Elliott Thank you for providing a solution for this. I will test it tomorrow. I think if i found the right file before, i could have fixed it myself :). Thanks to all for the great support. I will reply tomorrow containing the results.

      posted in General Problems
      K
      kek