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



  • 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



  • @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 :)


  • Senior Developer

    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.



  • @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.


  • Developer

    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.



  • @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.


  • Developer

    @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…


  • Testers

    @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.


  • Developer

    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.


  • Testers

    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.


Log in to reply
 

395
Online

38748
Users

10575
Topics

100103
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.