SVN 4380 Cloud 5419 (on Ubuntu 14.04.3) - Fog Client (404) Not Found.



  • Ubuntu 14.04.3
    SVN 4380 Cloud 5419

    On a fresh install, an upgrade to newer trunk version, or a reinstall of the existing fog_trunk contents, FOG clients will begin to throw 404 errors for everything;

    11/18/2015 12:50 PM Middleware::Communication URL: http://fog-server/fog/service/servicemodule-active.php?moduleid=clientupdater&mac=90:B1:1C:7D:6B:FF||00:00:00:00:00:00:00:E0&newService=1
     11/18/2015 12:50 PM Middleware::Communication ERROR: Could not contact FOG server
     11/18/2015 12:50 PM Middleware::Communication ERROR: The remote server returned an error: (404) Not Found.
    

    Going off of constant refreshing the folder view while running a couple installs, I’m guessing the symbolic link (which I had to manually create in the first place) gets wiped out right around this area here:

     * Backing up old data.........................................OK
     * Copying back old web folder as is...........................OK
     * Copying new files to web folder.............................OK
    

    Here’s the fix, just needs to be run once install.sh has finished completely:

    Make a symbolic link at /var/www/html for fog, and point it at /var/www/fog

    ln -s /var/www/fog /var/www/html/fog
    

    Ta-da, no more 404s!


  • Moderator

    @Malos said in SVN 4380 Cloud 5419 (on Ubuntu 14.04.3) - Fog Client (404) Not Found.:

    Here’s the fix, just needs to be run once install.sh has finished completely:

    Make a symbolic link at /var/www/html for fog, and point it at /var/www/fog

    ln -s /var/www/fog /var/www/html/fog
    

    Ta-da, no more 404s!

    Thankyou!!!



  • @Tom-Elliott Ah, ok very nice.

    ./install.sh -?
    

    indicates that I can use the following to install fog trunk with a correct DocRoot on Ubuntu 14.04.3

    ./install.sh -D /var/www/html/
    

    Thanks!


  • Senior Developer

    Installer can accept arguments to specify webroot and docroot as you see fit.

    The installer tries to take the best guess of information, but it’s all a guessing game.



  • @Tom-Elliott Will some kind of change be made within the installer to reflect a new document root for fog? I don’t know when apache2 changed their doc root, or if that’s an ubuntu thing



  • @Tom-Elliott
    As you suggested, changing in opt/fog/.fogsettings

    docroot="/var/www/";
    

    to

    docroot="/var/www/html/";
    

    and then r erunning the installer does create /var/www/html/fog, and creates a link to said folder at /var/www/fog

    After re-running the installer, clients are able to connect no problem.


  • Senior Developer

    @Malos can you change the document root in fogsettings file to /var/www/html and rerun the installer?



  • @Tom-Elliott Running a

    grep -n -e "DocumentRoot"  /etc/apache2/sites-available/*
    

    results in

    /etc/apache2/sites-available/000-default.conf:12:       DocumentRoot /var/www/html
    /etc/apache2/sites-available/001-fog.conf:4:    DocumentRoot /var/www/
    /etc/apache2/sites-available/001-fog.conf:12:    DocumentRoot /var/www/
    /etc/apache2/sites-available/default-ssl.conf:5:                DocumentRoot /var/www/html
    

    /opt/fog/.fogsettings has

    docroot="/var/www/";
    

  • Senior Developer

    I make a link from /var/www/html/fog to /var/www/fog and I also make a link from /var/www/html/fog/ to /var/www/html/fog/fog

    This way even if hte webroot is not with a /fog, clients don’t have to adjust anything.

    My best guess is that the /var/www/ is your current document root, but the /var/www/html is the “real” document root of your server.

    You can verify this in the /opt/fog/.fogsetting and look for the docroot= setting in the file.



  • @Tom-Elliott This is reproducible, here’s the steps that I have recorded in my wiki;

    • Install Ubuntu Server 14.04.3 LTS from iso
    • sudo passwd root
    • set your static IP info
    • su - up to root, and run
    • apt-get update && apt-get -y dist-upgrade && shutdown -r now
    • once it’s back up:
    • apt-get install -y subversion && svn co https://svn.code.sf.net/p/freeghost/code/trunk@4393 /root/fog_trunk && cd ~/fog_trunk/bin/ && ./installfog.sh

    Run through the install as usual, and perform a
    ls /var/www/html
    Result: no fog folder/link. Creating it manually does resolve client connectivity, but a re-running of installfog.sh wipes out the manual link.



  • @Tom-Elliott no it’s not. The server itself is named fogserver at the OS level, and I have DNS entries that resolve fog-server, fogserver and fog (just covering my bases), all resolve to the correct IP.

    That fog-server entry in the logs is due to me being lazy and next nexting with installing the client in this case.


  • Senior Developer

    @Malos said:

    http://fog-server/fog/service/servicemodule-active.php?moduleid=clientupdater&mac=90:B1:1C:7D:6B:FF||00:00:00:00:00:00:00:E0&newService=1

    Is your fogserver actually named fog-server?



  • @Tom-Elliott I can tell you that after upgrading to the SVN 4393 (latest as of this post) , /var/www/html only contains the default apache2 index.html, still consistent with the behavior noted in my OP


  • Senior Developer

    I’m pretty sure I do this already but in reverse . Apache moved from var www to var www html with Ubuntu 14 so I now move data there unless told otherwise . It does a double link it creates a link to itself inside itself so /var/www/html/fog/fog as well as create a link from /var/www/html/fog to /var/www/fog


Log in to reply
 

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