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

Ubuntu 14.04 - From 1.2.0 to trunk. Webaccess does not work.

Scheduled Pinned Locked Moved Solved
FOG Problems
4
10
2.3k
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.
  • M
    MadsMagnus
    last edited by MadsMagnus May 18, 2016, 6:55 AM May 18, 2016, 12:42 PM

    Hi guys

    I just updated my fog to trunk by following the SVN wiki guide. Now my fog is broken/webacces does not work. When I try to reinstall it simply just ends at “Restarting Apache2 for fog vhost… Failed!”. I have tried restarting apache, mysql and tftpd-hpa with no succes. I remember updating via SVN broken my last attempt at FOG on Ubuntu 12 too. As a part of my search to find a solution, I deleted the /var/www/fog folder - as the trunk SVN installer makes a new folder in /var/www/fog/html/fog <-- which I also had purged/removed before installing via SVN.

    I honestly do not know what is up here. Just connecting to ip (e.g. http://10.0.0.100) works fine, but shows the apache default page. Before the SVN attempt, I was able to connect via /fog on the URL.

    Does anyone know what to do here? Is there a symbolic link that doesn’t work or what.

    -Madsmagnus

    1 Reply Last reply Reply Quote 0
    • I
      ITSolutions Testers
      last edited by May 18, 2016, 12:55 PM

      When going from 1.2 to trunk it is best to do a clean install, trunk has changed quite a bit and I have seen going straight from 1.2 to trunk cause many issues, someone else this morning also had the same problem. I would recommend doing a clean install of trunk and restoring the DB and images to the new install.

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by May 18, 2016, 6:52 PM

        Sorry @ITSolutions but I have to vote against what you are saying about upgrading. Sure not every FOG trunk version is working perfectly but upgrading (from pretty much any version between 1.2.0 and current) is supported and ideally should work.

        @MadsMagnus At some point in time one of the linux distos changed their default web root from /var/www to /var/www/html. To keep things as close to the distro default and make FOG work pretty much the same on all systems the installer adds the symlink. It’s not perfect I know! Somewhere on my todo list back in my mind I have this. I’d love to get rid of the link but there are still too many other important things to fix.
        Probably best to delete the FOG web stuff completely and re-run the installer. If you still have issues to access the web gui you’ll find the paths to the apache error logs in the signature below my message. In there you should see what’s going wrong.

        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 18, 2016, 7:14 PM Reply Quote 1
        • I
          ITSolutions Testers @Sebastian Roth
          last edited by May 18, 2016, 7:14 PM

          @Sebastian-Roth I am not saying that you cannot upgrade from 1.2 to trunk. I just have seen it break things, mostly on Ubuntu, which is not surprising due to them changing everything in each major revision. That is who your thinking about changing the web root in 14.04. In this case the OP is using Ubuntu. In my opinion it is rather painless to back up the DB and images(granted that is if you have a location to hold them all) and then do a ground up rebuild of trunk. I also usually advise using a separate drive/partition for the images, so that would mostly rule out the need for baking up the images. I guess it all depends on what your preference is or what is possible in your environment.

          1 Reply Last reply Reply Quote 1
          • S
            Sebastian Roth Moderator
            last edited by May 18, 2016, 7:50 PM

            @ITSolutions Thanks a lot for responding to my rather stroppy comment! I am absolutely with you there. Doing a fresh install is always a good idea I reckon. But as we have a lot of users who are kind of new to the linux world I doubt that most of them can handle that kind of advanced administrative tasks that you just outlined in your last post. Easy stuff for people like you and me but…

            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

            M 1 Reply Last reply May 19, 2016, 9:25 AM Reply Quote 1
            • M
              MadsMagnus @Sebastian Roth
              last edited by May 19, 2016, 9:25 AM

              @Sebastian-Roth

              To both of you: Yes I realized that the web root had changed from /www/ to /www/html - but as a part of my attempt to fix it all I deleted the /www/fog folder, since trunk apparently uses /www/html/fog.

              It seems the log file is showing warning and fatal errors:
              [Thu May 19 09:03:52.926480 2016] [:error] [pid 11720] [client 10.0.66.6:51887] PHP Warning: array_shift() expects parameter 1 to be array, string given in /var/www/html/fog/lib/fog/fogcore.class.php on line 83

              Which then is:
              self::$DB->query(sprintf(“ALTER TABLE %s.%s ENGINE=MyISAM”,DATABASE_NAME,array_shift($table)));

              [Thu May 19 09:03:52.304044 2016] [:error] [pid 11721] [client 10.0.66.58:54121] PHP Fatal error: Call to a member function fetch() on boolean in /var/www/html/fog/lib/fog/fogmanagercontroller.class.php on line 128

              Which then is:
              return (int)self::$DB->query($query)->fetch()->get(‘total’);

              Obviously the machine IPs are on our local network but is it just clients “popping past” the PXE boot, and therefore engaging with the PHP? Seems a bit weird. I just checked hostname on one of the many IPs on the error list (which is very full, it seems new IPs are popping up on the list with similar errors within minutes) - and they are indeed some of the machines I administrate here.

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by May 23, 2016, 9:25 AM

                Thanks for reminding me. Sure I lost track of this issue. Did you upgrade to the latest version before re-running the installer? I am just wondering if this is a bug in the code, a possible miss-configuration or just on old version of the code you are trying.

                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

                M 1 Reply Last reply May 23, 2016, 10:59 AM Reply Quote 0
                • M
                  MadsMagnus @Sebastian Roth
                  last edited by May 23, 2016, 10:59 AM

                  @Sebastian-Roth

                  Yeah I just followed the regular guide on https://wiki.fogproject.org/wiki/index.php/Upgrade_to_trunk

                  If I was to start 100% over, what would be needed to be done here? I am a bit of a Linux nab, so all I know is remove and purge atm.

                  1 Reply Last reply Reply Quote 0
                  • T
                    Tom Elliott
                    last edited by May 23, 2016, 11:25 AM

                    Can you just try updating first.

                    One of the issues, I noticed yesterday, is the php_ver variable wasn’t being defined. As Ubuntu/Debian variant’s add a major version to the php fpm checks, restarting was likely failing on this service.

                    The installer, now, add’s the php_ver and php_verAdds information to the .fogsettings.

                    If you still have issues, you will likely need to edit the current /opt/fog/.fogsettings.

                    Look for the packages= line.

                    Make the php-fpm in this line read as php5-fpm.

                    This should allow the installer to finish installing properly.

                    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

                    M 1 Reply Last reply May 23, 2016, 11:48 AM Reply Quote 1
                    • M
                      MadsMagnus @Tom Elliott
                      last edited by May 23, 2016, 11:48 AM

                      @Tom-Elliott

                      Updating to version 7785 seemed to do the trick. Webacces is now full functional. Moving on to the next problem.

                      Thank you all SO SO much for your help 🙂

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      1 / 1
                      • First post
                        1/10
                        Last post

                      134

                      Online

                      12.1k

                      Users

                      17.3k

                      Topics

                      155.3k

                      Posts
                      Copyright © 2012-2024 FOG Project