Update FOG to 1.4.4 from 1.3.x and FOG can't load
-
Server
- FOG Version: 1.4.4.4
- OS: Ubuntu
Description
When running the installer I got the “Database Backup… failed line”.
Tried to load FOG webpage (using Chrome) and I get HTTP ERROR 500.
I can access the filesystem and my images are there, how do I fix this or go back to the backup (made by the installer)??? -
george1421 managed to fix my setup. For some reason there were concurrent mysql daemons running. After closing all mysqld’s, we tried again and everything went perfectly with the installer. Thank you so much george1421 for your help!
-
@elias-santiago has the database password changed for some reason? Have you changed the root user mysql password?
If you look in the file /opt/fog/.fogsettings. There should be the mysql user ID and password listed there. See if you can use that to login to the mysql console with
mysql -u root -p fog
and when prompted use the mysql password listed in the .fogsettings file.Since you are also running ubuntu you may want to review this post: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
-
@Elias-Santiago For the HTTP error 500 you better check the apache error logs on your FOG server console. See my signature on where to find those. Post the log here and I am sure we’ll be able to figure this one out.
-
@george1421 NO, database password (or any password) have been changed. I tried your command and I can login to the mysql database without problem. I will try the link you posted about Ubuntu and see if that’s it.
-
@elias-santiago Just wondering, do you use a proxy server to access the internet or does your fog server have direct access to the internet?
-
@george1421 NO, database password (or any password) have been changed. I tried your command and I can login to the mysql database without problem.
-
@george1421 No proxy. It does connect to the internet but it is an internal IP. Not accesible from outside the network.
-
@sebastian-roth Here is my apache2 error log. The 500 Server error just comes up as we try to access the server page on the browser. Before trying to update, everything was working fine!
[Tue Aug 15 11:58:39.186277 2017] [mpm_prefork:notice] [pid 2174] AH00163: Apache/2.4.27 (Ubuntu) OpenSSL/1.1.0f configured – resuming normal operations
[Tue Aug 15 11:58:39.186357 2017] [core:notice] [pid 2174] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Aug 15 11:58:41.413870 2017] [php7:error] [pid 2179] [client 10.10.1.5:52613] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/fog/lib/fog/reportmaker.class.php(75): HookManager->processEvent(‘REPORT_TYPES’, Array)\n#3 [internal function]: ReportMaker->__construct()\n#4 /var/www/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/fog/maintenance/backup_db.php(23): FOGBase::getClass(‘ReportMaker’)\n#6 {main}\n thrown in /var/www/fog/lib/db/pdodb.class.php on line 443
[Tue Aug 15 11:58:58.611333 2017] [php7:error] [pid 2177] [client 10.10.2.28:18047] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent(‘SEARCH_PAGES’, Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/fog/management/index.php(23): FOGBase::getClass(‘FOGPageManager’)\n#6 {main}\n thrown in /var/www/fog/lib/db/pdodb.class.php on line 443
[Tue Aug 15 11:59:03.516960 2017] [php7:error] [pid 2178] [client 10.10.2.28:18051] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent(‘SEARCH_PAGES’, Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/fog/management/index.php(23): FOGBase::getClass(‘FOGPageManager’)\n#6 {main}\n thrown in /var/www/fog/lib/db/pdodb.class.php on line 443
[Tue Aug 15 11:59:06.877776 2017] [php7:error] [pid 2192] [client 10.10.2.28:18055] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent(‘SEARCH_PAGES’, Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/fog/management/index.php(23): FOGBase::getClass(‘FOGPageManager’)\n#6 {main}\n thrown in /var/www/fog/lib/db/pdodb.class.php on line 443 -
No matter how many times I retry the installer, everything seems to go smoothly until this line comes up: Database backup… failed.
-
@elias-santiago My question was more about, does your fog server use a proxy to reach the internet, where you set
http_proxy=<server_ip>:<port>
if that was the case then you need to be sure to include theno_proxy
clause or you will get the backup error. But since your fog server can reach the internet directly this isn’t the cause of your error. -
@elias-santiago In the same directory as the installfog.sh script, there is a log directory. In that directory there should be an error log file for the version you are currently installing. See if that log file contains why the backup failed.
-
@george1421 I have never set the proxy setting, in what file do I find it?
The fog server connects directly to internet.
-
@george1421 There seems to be some issue with mysql (never had it before), there is a line in the installer error log that says:
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: YES)
How do I fix that? I know my way around servers and everything, but in Unix I’m still somewhat of a novice.
-
@george1421 said in Update FOG to 1.4.4 from 1.3.x and FOG can't load:
@elias-santiago has the database password changed for some reason? Have you changed the root user mysql password?
If you look in the file /opt/fog/.fogsettings. There should be the mysql user ID and password listed there. See if you can use that to login to the mysql console with
mysql -u root -p fog
and when prompted use the mysql password listed in the .fogsettings file.Since you are also running ubuntu you may want to review this post: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
I already did what you recommended about Ubuntu.
-
@elias-santiago just to confirm one more time. You know the password to log into mysql using
mysql -u root -p fog
right? If you can have your confirmed in your /opt/fog/.fogsettings file thatsnmysqluser='root'
andsnmysqlpass=
the password you used to login to mysql andsnmysqlhost='127.0.0.1'
There is something wrong here. The error says the .fogsettings file is wrong.
-
@george1421 said in Update FOG to 1.4.4 from 1.3.x and FOG can't load:
@elias-santiago just to confirm one more time. You know the password to log into mysql using
mysql -u root -p fog
right? If you can have your confirmed in your /opt/fog/.fogsettings file thatsnmysqluser='root'
andsnmysqlpass=
the password you used to login to mysql andsnmysqlhost='127.0.0.1'
There is something wrong here. The error says the .fogsettings file is wrong.
snmysqlhost = ‘localhost’
NOT ‘127.0.0.1’
-
@george1421 something weird is going on. After I did the Ubuntu stuff you mentioned (removing the unattended-updates) I can’t login to mysql using the same line and password as before!
How do I fix that?
-
@george1421 I tried mysql -u root -p fog now and can’t login! This was after removing the “unattended-updates” from Ubuntu.
-
@elias-santiago As part of that post did you also execute the
ALTER user
command? If so the password for the root user is now <blank>.If you can no longer log into the mysql server using a known password (or blank) then you will need to follow the process to reset the root account for mysql: https://support.rackspace.com/how-to/mysql-resetting-a-lost-mysql-root-password/
-
@george1421 I did run the ALTER user part.
I’m trying the mysql reset password, it should be the mysql password in the .fogsettings file or it should be ‘fog’ (since the line shows “mysqld -u root -p fog” ??