Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10
-
How do I remove the php5 package from the install script?
When I try to upgrade or otherwise reinstall Fog now, it fails at
"installing package: php5… failed (will try later)
.
.
…
“Installing now everything is updated…failed”
Package php5 is not available, but is referred to by another package.I’m currently on Debian 9 after having reverted to a previous snapshot
When I attempt to reinstall Fog I do the following
cd /root/fogproject/
git checkout dev-branch
git pull
cd bin/
./installfog.shThe git pull command returns, says it’s already up to date
-
I’m about ready to give up on old Debian.
I’m going to upgrade to Debian 10, and then to 11 before I attempt another FoG reinstall/upgrade
-
Now on Debian 11, those upgrades went without error.
Now when I try to reinstall FoG I get a different error:
Setting up Apache and PHP files…failed
PHP failed to install properly
Could not find /etc/php/7.4/fpm/php.iniI’m going to create an empty pnp.ini with the touch command at the location where FoG is expecting to see it
-
@carl-d
I was able to get the Fog installer to run and complete.
During the installation it told me to update the database but the Web page won’t load so I skipped that step and made it through to the end without any other errors or warnings.Still, the Web page won’t load so I’m thinking either I ruined Apache2 or I have to do something with mysql.
-
@sebastian-roth
On Debian11 after having attempted to upgrade FOG to 1.5.9.222 the http://fogserver/fog/management/index.php page wont load (500 error)I’m looking at the Apache2 error.log and here’s the last line:
%timestamp% [proxy_fcgi:error] [pid #####] [client %LAN-IP%:%port%] AH1071: Got error ‘PHP message: PHP Fatal error: Uncaught Exception: Missing one or more extensions. in /var/www/html/fog/commons/init.php:439\nStack trace:\n#0 /var/www/html/fog/commons/init.php(306): Initiator::_extCheck()\n#1 /var/www/html/fog/commons/base.inc.php(46): Initiator::startInit()\n#2 /var/www/html/fog/management/index.php(22): require(’/var/www/html/f…‘)\n#3 {main}\n thrown in /var/www/html/fog/commons.init.php on line 439’Please advise, thank you!
-
@carl-d @Sebastian-Roth @george1421
I’m sorry for being a pain in the ass and I very much appreciate your advice.
Reading another post, I made the info.php file and saved it as instructed. I can browse to that at http://fogserver/fog/info.php - lots of info on that page - please advise!
-
@carl-d Just to be clear you installed FOG 1.5.9.110 or later from the dev branch and not 1.5.9GA?
I will spin up a test debian 11 instance tonight and test to see if I get the same error during an install. Your issues are new so I’m concerned that something got missed. I’ll let you know what I find.
-
@george1421
Yes, I installed FOG 1.5.9.xxx from the dev branch - what command can I run to confirm the fogserver version?I updated the password to the fogstorage user, in the /opt/fog/.fogsettings file because it didn’t match what I was given during the upgrade.
After doing that, I can get to the schema update page however I get the following errors when trying to update the schema:
Database Error:
Failed to query: Error: SQLSTATE[42000]: Syntax error or access violation: 1142 UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’ Error Message: Error Code: “42000”, Error Message: [“42000”,1142,“UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’”], Debug: SQL: [266] UPDATE
globalSettings
SETsettingDesc
='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHEREsettingKey
=‘FOG_EMAIL_ADDRESS’
Params: 0
Variable contains:Array
( [0] => UPDATEglobalSettings
SETsettingDesc
='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHEREsettingKey
=‘FOG_EMAIL_ADDRESS’
)
Database SQL:UPDATE
globalSettings
SETsettingDesc
='Email address(s) to send the reports to. Separate multiple emails by comma (e.g. user_a@domain.com, user_b@domain2.com). Token ${user-name} is replaced by the task creators username.'WHEREsettingKey
=‘FOG_EMAIL_ADDRESS’ -
@carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:
“UPDATE command denied to user ‘fogstorage’@‘localhost’ for table ‘globalSettings’”
This tells me the password you configured for fogstorage doesn’t match what the install created in the database.
Something bad happened during the install. Its going to be tough to fix but not impossible.
On the fog server linux console, switch to root with
sudo su -
Then we are going to follow this document https://linuxize.com/post/how-to-change-mysql-user-password/Login to the mysql database as root
mysql -u root -p
then in mysql we will need to issue this command
ALTER USER 'fogstorage'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';
FLUSH PRIVILEGES;
GRANT ALL PRIVILEGES ON fog.* TO 'fogstorage'@'localhost';
Where
NEW_USER_PASSWORD
is the password you changed into the .fogsettings file.That should fix the mysql access permissions.
…
For some reason fogstorage looks wrong. The next bit was I was going to check what password the fog program uses to talk to the database. Looking at /var/www/html/fog/lib/fog/config.class.php I see the fog php code uses the fogmaster user account not fogstorage. I wonder if its going to be easier to fix this by blowing away the current fog install and reinstalling things again. The install of 1.5.9.110 or later should install cleanly on debian 11. So I’m not sure which will be quicker, trying to fix a botched install or just starting over again. -
@george1421
Ahhhh George thank you so much!!!I had to create the fogstorage account within mysql and then apply the password, but after doing so I was able to update the schema and now I’m also able to login!
I’m going to download and upload a couple of images to test that functionality but this is further than I’ve gotten and it feels great!
I greatly appreciate your assistance!
-
I’m getting ready to test download & capture (upload), though I did notice the storage usage chart in the upper right corner of the dashboard has gone missing.
Also, from within the FoG configuration page the kernel update, and log viewer, sub-pages give me a 500 error. From the home section of the fog configuration page, the fog version information section reads “Failed to get version info”.
These are mere annoyances that I can certainly live without as long as I’m able to image new machines and upload new images.
-
I had a capture already in progress from last night that was failing (it couldn’t write back to the database that the capture task had completed, so it was stuck in a loop of uploading and then failing to update the task status then rebooting and uploading again), it succeeded!
This failure was the catalyst for me trying to upgrade to Debian 11 and FoG 1.5.9. So I’m very happy with this result.
I see now that when I click the blue task button to begin a download or upload task, the task gets created but I’m taken to a broken page (500 error). So I hit my back button and went back to my hosts that way.
-
@carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:
I see now that when I click the blue task button to begin a download or upload task, the task gets created but I’m taken to a broken page (500 error).
Please check the apache and PHP logs (see my signature) and post relevant information here.
-
Here’s what I’m seeing in the Apache2 error.log:
%Date&TimeStamp% [proxy_fcgi:error] [pid ####] [client LAN-IP:port] AH01071: Got error ‘PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYPEER - assumed ‘CURLOPT_SSL_VERIFYPEER’ (this will throw an Error in future version of PHP) in /var/www/html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYHOST -assumed ‘CURLOPT_SSL_SERIFYHOST’ (this will throw an Error in a future version of PHP) in /var/www/html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed ‘CURLOPT_RETURNTRANSFER’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogbase.class.php on line 481PHP message: PHP Warning: Use of undefined constant ‘CURLOPT_CONNECTTIMEOUT - assumed ‘CURLOPT_CONNECTTIMEOUT’ (this will throw an Error in a future version of PHP) in /var/www/html/fog/lib/fog/fogurlrequests.class.php on line 146PHP message: PHP Warning: Use of undefined constant CURLOPT_TIMEOUT -assumed ‘CURLOPT_TIMEOUT’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 147PHP message: PHP Warning: Use of undefined constant CURLOPT_SSL_VERIFYPEER’ (this will throw an Error in future version of PHP) /var/www//html/fog/lib/fog/fogbase.class.php on line 158PHP message: PHP Warning CURLOPT_SSL_VERIFYHOST -assumed ‘CURLOPT_SSL_SERIFYHOST’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 159PHP message: PHP Warning: Use of undefined constant CURLOPT_RETURNTRANSFER - assumed ‘CURLOPT_RETURNTRANSFER’ (this will throw an Error in a future version of PHP) in /var/www//html/fog/lib/fog/fogurlrequests.class.php on line 160’
Checking PHP 7.4 logs, not much there but here are the last two lines;
%Date&TimeStamp% NOTICE: [pool www] child 22019 exited with code 0 after 1476.###### seconds >
%Date&TimeStamp% NOTICE: [pool www] child 24654 started -
@carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:
Use of undefined constant CURLOPT_SSL_VERIFYPEER
Please make sure the package
php-curl
is being installed:dpkg | grep curl
and if you don’t see the package to be installed thenapt install php-curl
(restart your FOG server after that). -
I did have to install php-curl, and now everything is working properly. Thank you very, very much sebastian-roth! I greatly appreciate your help!
-
@carl-d said in Unable to see current FoG Version Info After Upgrading Debian from 8 to 9, then from 9 to 10:
I did have to install php-curl, and now everything is working properly.
Probably a good idea to manually edit the “packages” line in
/opt/fog/.fogsettings
and add thephp-curl
to that as well.