HTTP 500 error when creating new image
-
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.
-
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
[CODE]sudo apt-get remove php5
sudo apt-get install php5[/CODE]Apache
[CODE]sudo apt-get remove apache2
sudo apt-get install apache2[/CODE]MySQL stuff
[CODE]sudo apt-get remove mysql-server libapache2-mod-auth-mysql php5-mysql
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql[/CODE] -
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.
-
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.
-
@mjredman I looked at the function which raises problem and saw nothing strange. Maybe @Tom-Elliott could help you.
-
@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.
-
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:
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.
-
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.
-
@mjredman Open a new topic please.
-
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
-
@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.)