Updating Database....Failed
-
Why is it asking for a password? Where did you copy/paste this from? What OS & version is FOG running on?
-
@Wayne-Workman Under the error logs folder under /root/fogproject/bin/error_logs. I am running Ubuntu 15.10 and Fog trunk version 7959.
Thanks
-
@nickkcsd Is the database password protected?
-
@Wayne-Workman Yes it is. However I was able to connect to it using the instructions in this Wiki.
https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL
-
@nickkcsd Ok, so if the DB is password protected, you need to define the user and password inside of
/opt/fog/.fogsettings
There are fields in there for this called something likesnmysqluser
and such. Then after this is done and saved, re-run your installer.More information on fog passwords is here:
https://wiki.fogproject.org/wiki/index.php?title=Password_Central -
@Wayne-Workman So “snmysqluser” is set to root and the password is set to what I tested the connection with. Any other suggestions?
-
@nickkcsd and you re-run the installer?
-
@Wayne-Workman Yes, it is still failing on setting up and starting MySQL.
-
@nickkcsd would you be interested in doing a TeamViewer session?
-
@Wayne-Workman Yeah I would be interested in that. Thanks.
-
I remoted in to take a look around. After dredging through the source code and stepping through and figuring out what is going on,
systemctl is getting set to
yes
. That’s what’s causing the issue.I hard-coded a line after line 920 to read
systemctl="no"
into the configureMySQL function inside oflib/common/functions.sh
and it worked. This lead me to hunting what is setting systemctl to yes…The line that is setting it to yes is this one inside of
bin/installfog.sh
Line 65 and 66 in the current:command -v systemctl >>$workingdir/error_logs/fog_error_${version}.log 2>&1 [[ $? -eq 0 ]] && systemctl="yes"
This server was running Ubuntu 15. Here’s a snapshot of the results of the command, and the server OS version:
Immediately after line 66, systemctl is set to
yes
. And then restarting mysql with systemctl in Ubuntu 15 fails. And it produces those crazy errors. -
@Wayne-Workman What’s the output of:
systemctl restart mysql systemctl -l status mysql
-
@Tom-Elliott I tried the systemctl restart mysql one, it fails with exactly the errors in the error log he posted. I didn’t try the other. I’m not remoted in anymore. Maybe @nickkcsd can provide the output?
-
Maybe this will help?
http://askubuntu.com/questions/615129/systemd-mysql-wont-stop
-
@Tom-Elliott ah-ha… Wonder if he updated from older Ubuntu?
-
@Wayne-Workman Yes, I did update from a older version of Ubuntu (13.10).
-
@nickkcsd And this is why I strongly advise against “upgrading” to a newer OS. I’ll always advise a clean fresh (and beautiful) new install.
So, you can try to fix it, or rebuild. If you rebuild, just go with Ubuntu 16. There are some steps here (just two small extra steps) to get FOG Trunk going on Ubuntu 16:
https://forums.fogproject.org/topic/7131/fog-on-ubuntu-16-04-php7/27 -
@Wayne-Workman What would you suggest I do at this point?
-
@nickkcsd Well right now your server should be running fine. The issue isn’t pressing anymore.
You can either try to fix the systemctl issue and get that working properly, or build a separate new server (Ubuntu 16), or blast this server and build Ubuntu 16 with fog trunk.
Again though, you’re up and running so it’s not pressing - so schedule this when you have an open window large enough to work on it. If you’ve got imaging to do, do that first.
-
@Wayne-Workman Thanks for your help. Yes, definitely have imaging to do. We will probably build from scratch in the fall.