HTTP 500 error when creating new image



  • Firstly let me just say I’ve been using FOG for years under many different installs, but I just can’t get this to work for some reason.

    I installed fog 1.2.0 and when I goto create a new image in the web interface, it just errors straight away with a HTTP 500 error. I removed the whole installation and started again and got the same results. I then decided just on a whim to install the latest fog trunk just to see if it fixed the issue - it did not.

    Installation is on Ubuntu 12.04 LTS which is fully up-to-date. It is not a clean install, it has been supporting a network monitoring program for a little while and I wanted to use the same server for FOG as well purely as it’s the only server available to me here to host it on, and it’s not going to be used a lot - more for backing up workstation images rather than mass distribution.

    Puzzled by this one as I’ve installed FOG plenty of times and I’ve been using it since 2008, this is the first time I’ve ever had a problem that I’ve not been able to solve.

    Any help appreciated!

    Mike.


  • Senior Developer

    @rstrofton what version of fog are you using? Maybe you could update to the more current release or even the RC series? This thread was over a year old so bringing it back from the dead is a strange site lol. This is also why I ask for version. I am pretty sure current fog is less restrictive in this (not that the issue couldn’t still exist but still.)



  • For anyone else (like me) who found this post while searching google for help…

    I had no Master storage location configured, because I had deleted my master and forgotten to configure a new one. After ticking the master box for the default location, the “Add new image” page started working again


  • Moderator

    @mjredman Open a new topic please.



  • I started from scratch with the machine, and it’s now working so who knows what the issue was. It’s co-existing with netXMS perfectly happily now.

    I do however have an issue with it backing up a Dell 9020 workstation, I think because of the recovery partition on the disk it keeps saying “invalid partition data!” when using the multi partition image type, but this is a totally separate issue. A block-by-block RAW copy works fine so the FOG program is working OK and the issue seems specific that that particular workstation. Annoying as it’s the one I was using for testing and it had me stumped for a little while thinking there was another problem with FOG when it was actually a problem with the workstation.

    Thanks for the help.

    Mike.


  • Developer

    @Wayne-Workman said:

    Can you try with Ubuntu 15.04, or better yet, Debian 8 ? or CentOS 7 or Fedora 22 ?

    I can’t guarantee fog trunk works with Ubuntu 12.04, and if it does, I don’t know how to make it work.

    For most people, new installations of FOG mean a new server build. With limited volunteers and time, the developers / beta testers just focus on the latest stable releases.

    i run and do development of fog on 12.04. as far as i know, there are no issues with running fog on 12.04 that are not already well documented with known fixes.


  • Moderator

    netXMS might be interfering somehow…

    I would strongly suggest separating that from your FOG server.

    Because if something goes wrong… both FOG and netXMS might break… and troubleshooting what’s wrong will be like 500 times harder.



  • @Wayne-Workman said:

    You can export all your images (copy them to somewhere), and inside of FOG Configuration -> Configuration Save, export your database there.

    With the images and database safely backed up, you can rebuild this box and put the latest Ubuntu 15.04 or Debian 8 on it, and then import your images and database, set permissions on your images, and all should be well.

    Just write down what revision your using now (top right corner, number on the cloud), and then install that exact revision on the new build.

    With any luck, you can have all this done in 2 or 3 hours.

    It’s a clean install, that’s the thing. The box is currently running netXMS for network monitoring which shared the MySQL database which I have backed up anyway before removing and reinstalling MySQL, so I might just start again. The issue is the hardware it’s running on is very old so the newest versions of Ubuntu could struggle and I’m not the most experienced Linux user in the world. It might be an easier option that trying to troubleshoot the issue.

    Thanks for all the help.

    Mike.


  • Moderator

    @mjredman I looked at the function which raises problem and saw nothing strange. Maybe @Tom-Elliott could help you.


  • Moderator

    The only thing I can think of is some feature on that page doesn’t support the methods that Ubuntu 12.04 uses.

    It’s bizarre that only this specific feature doesn’t work, but everything else does…

    You can export all your images (copy them to somewhere), and inside of FOG Configuration -> Configuration Save, export your database there.

    With the images and database safely backed up, you can rebuild this box and put the latest Ubuntu 15.04 or Debian 8 on it, and then import your images and database, set permissions on your images, and all should be well.

    Just write down what revision your using now (top right corner, number on the cloud), and then install that exact revision on the new build.

    With any luck, you can have all this done in 2 or 3 hours.



  • Many thanks for the suggestion.

    I un-installed each service individually and re-installed and it made no difference.

    Then, just in case I un-installed all those services and removed the entire fog installation, restarted the server and then re-installed fog 1.2.0 using the install script. After all that I’m still getting exactly the same result and error when I go to create a new image. It is only this part of the process that’s causing a problem, everything else in the web interface works just fine, but without the ability to create a new image definition I can’t use the product of course which is a shame.

    Regards,

    Mike.


  • Moderator

    I think we should remove some services, and then reinstall those services.

    Just do these one by one, and check if it works after each.

    PHP

    sudo apt-get remove php5
    sudo apt-get install php5
    

    Apache

    sudo apt-get remove apache2
    sudo apt-get install apache2
    

    MySQL stuff

    sudo apt-get remove mysql-server libapache2-mod-auth-mysql php5-mysql
    sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
    


  • I don’t have a spare machine to do this with unfortunately, and it’s not really good enough to start running virtual machines on. I have a working install of 1.2.0 on the same OS elsewhere that wasn’t a bother and just worked out of the box.

    The Apache logs do reveal an error, I should have looked at this before.

    [Tue Jun 09 13:54:51 2015] [error] [client 132.140.1.18] PHP Fatal error:  Call to a member function get() on a non-object in /var/www/fog/lib/pages/ImageManagementPage.class.php on line 181, referer: http://132.140.0.83/fog/management/index.php?
    

    It’s generated when calling the page http://132.140.0.83/fog/management/index.php?node=image&sub=add from my server to create a new image definition. It would be great if I can get this to work!

    For the observant among you, please ignore the silly IP address range this network has, I inherited this network 4 weeks ago and re-addressing it is one of many things that need doing here (along with wanting to use FOG on this site as well if I can get it working!)

    Regards,

    Mike.


  • Moderator

    @mjredman Have you check your apache logs ?


  • Moderator

    Can you try with Ubuntu 15.04, or better yet, Debian 8 ? or CentOS 7 or Fedora 22 ?

    I can’t guarantee fog trunk works with Ubuntu 12.04, and if it does, I don’t know how to make it work.

    For most people, new installations of FOG mean a new server build. With limited volunteers and time, the developers / beta testers just focus on the latest stable releases.


Log in to reply
 

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