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

Error with SVN 6017 and HTTP 500

Scheduled Pinned Locked Moved Unsolved
FOG Problems
4
10
2.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.
  • S
    svalding
    last edited by Wayne Workman Nov 28, 2016, 9:09 PM Nov 28, 2016, 4:23 PM

    Server
    • FOG Version: SVN 6017
    • OS: Debian 8 (Jessie)
    Client
    • Service Version:
    • OS:
    Description

    Updated to SVN 6017, now getting 500 Server errors…according to apache logs it seems to be coming from fogmanagercontroller.class.php on line 506, but I am no php guy and can’t make heads or tails of it.

        public function count(
            $findWhere = array(),
            $whereOperator = 'AND',
            $compare = '='
        ) {
            if (empty($findWhere)) {
                $findWhere = array();
            }
            if (empty($whereOperator)) {
                $whereOperator = 'AND';
            }
            if (empty($compare)) {
                $compare = '=';
            }
            $whereArray = array();
            $countVals = $countKeys = array();
            if (count($findWhere)) {
                foreach ((array) $findWhere as $field => &$value) {
                    $field = trim($field);
                    if (is_array($value)) {
                        foreach ((array) $value as $index => &$val) {
                            $key = sprintf(
                                '%s_%d',
                                $field,
                                $index
                            );
                            $countKeys[] = sprintf(':%s', $key);
                            $countVals[$key] = $val;
                            unset($val);
                        }
                        $whereArray[] = sprintf(
                            '`%s` IN (%s)',
                            $this->databaseFields[$field],
                            implode(',', $countKeys)
                        );
                        unset($countKeys);
                    } else {
                        $countVals[$field] = $value;
                        $whereArray[] = sprintf(
                            '`%s` %s :%s',
                            $this->databaseFields[$field],
                            (
                                preg_match(
                                    '#%#',
                                    $value
                                ) ?
                                'LIKE' :
                                trim($compare)
                            ),
                            $field
                        );
                    }
                    unset($value, $field);
                }
            }
            $knownEnable = array(
                'Image',
                'Snapin',
                'StorageNode',
            );
            $nonEnable = !(in_array($this->childClass, $knownEnable));
            $isEnabled = array_key_exists(
                'isEnabled',
                $this->databaseFields
            );
            if ($nonEnable && $isEnabled) {
                $isEnabled = sprintf(
                    '`%s`=1',
                    $this->databaseFields['isEnabled']
                );
            }
            $query = sprintf(
                $this->countQueryTemplate,
                $this->databaseTable,
                $this->databaseFields['id'],
                $this->databaseTable,
                (
                    count($whereArray) ?
                    sprintf(
                        ' WHERE %s%s',
                        implode(
                            sprintf(
                                ' %s ',
                                $whereOperator
                            ),
                            (array) $whereArray
                        ),
                        (
                            $isEnabled ?
                            sprintf(
                                ' AND %s',
                                $isEnabled
                            ) :
                            ''
                        )
                    ) :
                    (
                        $isEnabled ?
                        sprintf(
                            ' WHERE %s',
                            $isEnabled
                        ) :
                        ''
                    )
                )
            );
    
            return (int) self::$DB
                ->query($query, array(), $countVals)
                ->fetch()
                ->get('total');
        }
    

    Apache log:

    PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:08:39.063515 2016] [:error] [pid 17582] [client 10.20.100.4:60145] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:09:13.324410 2016] [:error] [pid 17817] [client 131.123.128.69:45113] PHP Warning:  fopen(/var/log/apache2/error.log): failed to open stream: Permission denied in /var/www/fog/status/logtoview.php on line 60
    [Mon Nov 28 11:09:20.723001 2016] [:error] [pid 17767] [client 131.123.128.69:45134] PHP Warning:  fopen(/var/log/apache2/error.log): failed to open stream: Permission denied in /var/www/fog/status/logtoview.php on line 60
    [Mon Nov 28 11:09:34.061501 2016] [:error] [pid 17819] [client 10.20.100.4:60189] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:09:38.978830 2016] [:error] [pid 17888] [client 10.20.100.8:62603] PHP Fatal error:  Uncaught exception 'Exception' with message 'StorageNode must be a valid node' in /var/www/fog/lib/fog/fogbase.class.php:1218\nStack trace:\n#0 /var/www/fog/lib/pages/imagemanagementpage.class.php(279): FOGBase->getFTPByteSize(Object(StorageNode), '/SurfacePro3S16')\n#1 /var/www/fog/lib/pages/imagemanagementpage.class.php(372): ImageManagementPage->{closure}('SurfacePro3S16', Object(StorageNode))\n#2 [internal function]: ImageManagementPage->{closure}(Object(Image), 18)\n#3 /var/www/fog/lib/pages/imagemanagementpage.class.php(476): array_walk(Array, Object(Closure))\n#4 /var/www/fog/lib/fog/fogpagemanager.class.php(256): ImageManagementPage->index()\n#5 /var/www/fog/management/index.php(49): FOGPageManager->render()\n#6 {main}\n  thrown in /var/www/fog/lib/fog/fogbase.class.php on line 1218, referer: http://fog.tusc.kent.edu/fog/management/index.php?node=image
    [Mon Nov 28 11:09:44.072496 2016] [:error] [pid 17819] [client 10.20.100.4:60189] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:09:49.156332 2016] [:error] [pid 17819] [client 10.20.100.4:60189] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:09:54.072569 2016] [:error] [pid 17819] [client 10.20.100.4:60189] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    [Mon Nov 28 11:09:57.133602 2016] [:error] [pid 18017] [client 10.20.100.1:56409] PHP Fatal error:  Uncaught exception 'Exception' with message 'StorageNode must be a valid node' in /var/www/fog/lib/fog/fogbase.class.php:1218\nStack trace:\n#0 /var/www/fog/lib/pages/imagemanagementpage.class.php(279): FOGBase->getFTPByteSize(Object(StorageNode), '/960F16')\n#1 /var/www/fog/lib/pages/imagemanagementpage.class.php(372): ImageManagementPage->{closure}('960F16', Object(StorageNode))\n#2 [internal function]: ImageManagementPage->{closure}(Object(Image), 1)\n#3 /var/www/fog/lib/pages/imagemanagementpage.class.php(476): array_walk(Array, Object(Closure))\n#4 /var/www/fog/lib/fog/fogpagemanager.class.php(256): ImageManagementPage->index()\n#5 /var/www/fog/management/index.php(49): FOGPageManager->render()\n#6 {main}\n  thrown in /var/www/fog/lib/fog/fogbase.class.php on line 1218, referer: http://fog.tusc.kent.edu/fog/management/index.php?node=image
    [Mon Nov 28 11:11:04.327490 2016] [:error] [pid 18056] [client 10.20.100.4:60227] PHP Warning:  implode(): Invalid arguments passed in /var/www/fog/lib/fog/fogmanagercontroller.class.php on line 506, referer: http://fog.tusc.kent.edu/fog/management/index.php
    
    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Nov 28, 2016, 5:35 PM

      What’s the exact error you’re seeing?

      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
      • S
        svalding
        last edited by Nov 28, 2016, 6:06 PM

        0_1480356335636_upload-69117193-80ed-4ece-b1c8-4861ab4b83b6

        0_1480356285788_upload-05909c63-e03c-4a66-8636-e9b84feb9cb3

        then go to images and get this
        The fog.tusc.kent.edu page isn’t working
        fog.tusc.kent.edu is currently unable to handle this request.
        HTTP ERROR 500

        T 1 Reply Last reply Nov 28, 2016, 10:54 PM Reply Quote 0
        • T
          Tom Elliott @svalding
          last edited by Nov 28, 2016, 10:54 PM

          @svalding What’s the error from the error logs?

          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

          W 1 Reply Last reply Nov 29, 2016, 3:10 AM Reply Quote 0
          • W
            Wayne Workman @Tom Elliott
            last edited by Wayne Workman Nov 28, 2016, 9:17 PM Nov 29, 2016, 3:10 AM

            @Tom-Elliott He did post them in the OP, but nodeBB has forever not placed the tripple back-ticks on a new line when it is closing a code block. I fixed his post so the logs are now visible above.

            @svalding Could you please check the below things:

            • Everything inside of /opt/fog/log is owned by root:root. check with ls -la /opt/fog/log There should be 12 individual logs in there.
            • See if there are any fog related logs appearing in the root directory.
              ** There should only be one directory that returns with this command and not any logs: ls -la / | grep fog
            • Manually verify that your FTP credentials for your fog server (which I assume is a stand-alone server) are indeed correct. There’s a testing FTP section in this wiki article: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_FTP

            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/

            T 1 Reply Last reply Nov 29, 2016, 11:17 AM Reply Quote 0
            • T
              Tom Elliott @Wayne Workman
              last edited by Nov 29, 2016, 11:17 AM

              @Wayne-Workman Sorry, we don’t know that. There isn’t a way to know 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! 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
              • S
                svalding
                last edited by Nov 29, 2016, 2:15 PM

                0_1480428071049_upload-eb1d2aae-ef46-45c6-ae2c-54990296a6e8

                0_1480428113206_upload-05d541df-5d7e-4aa6-8bd2-a7a7ca177d71

                Here are some screen shots from those two commands listed above. I’m testing FTP right now.

                1 Reply Last reply Reply Quote 0
                • S
                  svalding
                  last edited by Nov 29, 2016, 2:26 PM

                  0_1480429547013_upload-68de493c-d98f-4960-9f83-f985b8633b46

                  Is that double slash normal on the FTP path? I’m quite sure that I have had to remove it before. That could possibly be the cause of my issue!

                  Q 1 Reply Last reply Nov 29, 2016, 2:31 PM Reply Quote 0
                  • Q
                    Quazz Moderator @svalding
                    last edited by Nov 29, 2016, 2:31 PM

                    @svalding Double slash shouldn’t cause issues though (try adding a double slash in an url, it will resolve just fine)

                    Could you update to the latest version? Might help.

                    1 Reply Last reply Reply Quote 1
                    • W
                      Wayne Workman
                      last edited by Nov 30, 2016, 1:05 AM

                      I agree with Quazz about updating to the latest RC. Every new RC has fixes.

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

                      147

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project