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

    Boot looping after attempted virus scan

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    2
    12
    1.9k
    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.
    • dolfD
      dolf
      last edited by

      Output of that link is attached:

      0_1461238767222_output1.txt

      I did not expect to see HTML… Parsing the HTML renders this beauty of an error message:
      0_1461238893617_Screenshot from 2016-04-21 13:41:00.png

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @dolf Anything in the apache error log (ubuntu/debian: /var/log/apache2/error.log, redhat/centos: /var/log/httpd/error_log) when you request this URL in your browser? Just asking because the “An error occurred while invoking the map callback in…” is not very much information they give us.

        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
        • dolfD
          dolf
          last edited by

          Same info there:

          [Thu Apr 21 15:28:18.306005 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP Stack trace:
          [Thu Apr 21 15:28:18.306011 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   1. {main}() /var/www/html/fog/service/ipxe/boot.php:0
          [Thu Apr 21 15:28:18.306016 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   2. FOGBase::getClass() /var/www/html/fog/service/ipxe/boot.php:13
          [Thu Apr 21 15:28:18.306021 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   3. ReflectionClass->newInstanceArgs() /var/www/html/fog/lib/fog/fogbase.class.php:86
          [Thu Apr 21 15:28:18.306027 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   4. BootMenu->__construct() /var/www/html/fog/lib/fog/fogbase.class.php:86
          [Thu Apr 21 15:28:18.306032 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   5. HookManager->processEvent() /var/www/html/fog/lib/fog/bootmenu.class.php:89
          [Thu Apr 21 15:28:18.306037 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   6. array_map() /var/www/html/fog/lib/fog/hookmanager.class.php:40
          [Thu Apr 21 15:28:18.306042 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   7. HookManager->{closure:/var/www/html/fog/lib/fog/hookmanager.class.php:36-40}() /var/www/html/fog/lib/fog/hookmanager.class.php:40
          [Thu Apr 21 15:28:18.306048 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   8. call_user_func:{/var/www/html/fog/lib/fog/hookmanager.class.php:38}() /var/www/html/fog/lib/fog/hookmanager.class.php:38
          [Thu Apr 21 15:28:18.306053 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP   9. ChangeItems->BootItemSettings() /var/www/html/fog/lib/fog/hookmanager.class.php:38
          [Thu Apr 21 15:28:18.306059 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  10. LocationAssociation->getStorageNode() /var/www/html/fog/lib/plugins/location/hooks/changeitems.hook.php:34
          [Thu Apr 21 15:28:18.306064 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  11. FOGBase::getClass() /var/www/html/fog/lib/plugins/location/class/locationassociation.class.php:27
          [Thu Apr 21 15:28:18.306069 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  12. ReflectionClass->newInstanceArgs() /var/www/html/fog/lib/fog/fogbase.class.php:86
          [Thu Apr 21 15:28:18.306074 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  13. FOGController->__construct() /var/www/html/fog/lib/fog/fogbase.class.php:86
          [Thu Apr 21 15:28:18.306079 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  14. FOGController->load() /var/www/html/fog/lib/fog/fogcontroller.class.php:26
          [Thu Apr 21 15:28:18.306084 2016] [:error] [pid 16715] [client 146.232.223.197:24145] PHP  15. array_map() /var/www/html/fog/lib/fog/fogcontroller.class.php:194
          
          

          Looking at the code:

              161     protected function load($field = 'id') {
              162         $this->info(sprintf(_('Loading data to field %s'),$field));
              163         try {
              164             if (!$this->get($field)) throw new Exception(sprintf(_('Operation Field not set: %s'),$field));
              165             list($join, $where) = $this->buildQuery();
              166             array_map(function(&$key) use ($join,$where) {
              167                 $key = $this->key($key);
              168                 if (!is_array($this->get($key))) {
              169                     $query = sprintf($this->loadQueryTemplateSingle,
              170                         $this->databaseTable,
              171                         $join,
              172                         $this->databaseFields[$key],
              173                         self::$DB->sanitize($this->get($key)),
              174                         count($where) ? ' AND '.implode(' AND ',$where) : ''
              175                     );
              176                 } else {
              177                     $fields = $this->get($key);
              178                     $fieldData = array();
              179                     array_map(function(&$fieldValue) use ($key,&$fieldData) {
              180                         $fieldData[] = sprintf("`%s`.`%s`='%s'",$this->databaseTable,$this->databaseFields[$key],self::$DB->sanitize($fieldValue));
              181                         unset($fieldValue,$key);
              182                     },(array)$fields);
              183                     $query = sprintf($this->loadQueryTemplateMultiple,
              184                         $this->databaseTable,
              185                         $join,
              186                         implode(' OR ', $fieldData),
              187                         count($where) ? ' AND '.implode(' AND ',$where) : ''
              188                     );
              189                 }
              190                 if (!($vals = self::$DB->query($query)->fetch('','fetch_all')->get())) throw new Exception(self::$DB->sqlerror());
              191                 $vals = @array_shift($vals);
              192                 $this->setQuery($vals);
              193                 unset($vals,$key,$join,$where);
              194             },(array)$field);
              195         } catch (Exception $e) {
              196             $this->debug(_('Load failed: %s'),array($e->getMessage()));
              197         }
              198         return $this;
              199     }
          

          This seems relevant: http://stackoverflow.com/a/5523561/836995 I don’t think you will get a more detailed error message using array_map(). I don’t have time to debug the code, but I can take a guess that this is happening: throw new Exception(self::$DB->sqlerror());

          Don’t know why, though.

          1 Reply Last reply Reply Quote 0
          • dolfD
            dolf
            last edited by

            Any ideas for a quick fix, while you’re solving this problem? I wish I could contribute a solution, but I don’t have the time / energy to dive into the FOG code base at the moment.

            1 Reply Last reply Reply Quote 0
            • dolfD
              dolf
              last edited by

              Updated to trunk version 7645: No difference.
              Changed LOCATION of PCs: Error message goes away and PC boot normally.

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @dolf said:

                Changed LOCATION of PCs: Error message goes away and PC boot normally.

                What exactly do you mean by that???

                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
                • dolfD
                  dolf
                  last edited by

                  Oops, my post was very unclear due to the excitement of finally fixing this.

                  I use the location plugin. After updating the “location” field on all hosts (simultaneously using a group, not one by one), the error disappeared, and the PCs started booting normally.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth

                    @dolf Did you have the location plugin installed/activated before? I am pretty sure this error shouldn’t happen on a clean fresh install - do you think?

                    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
                    • dolfD
                      dolf
                      last edited by

                      Yes, I installed the location plugin a few months ago. In March, I think. I never used the virusscan feature before installing the location plugin. Don’t have the resources to try that now, either.

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by

                        Ok thanks for letting us know. So I guess we are save to solve this now.

                        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

                        193

                        Online

                        12.0k

                        Users

                        17.3k

                        Topics

                        155.2k

                        Posts
                        Copyright © 2012-2024 FOG Project