Failed to Update Schema
-
Hello all. I’m looking for some guidance.
I have a new install of Fog on an existing Ubuntu machine, which is actually a VM.
So far, great. I copied the /opt folder from the physical machine which the VM is replacing. Everything should be the same. FOG installed just fine, but when I went to click the update schema button, everything fails and I get a long page full of failed MySQL commands.
Some pertinent information:
The machine has two interfaces: eth0 is the private interface and eth1 is the public interface.
Eth0 is on a VLAN with no DHCP server or outside inet access. Eth1 has a static DHCP configuration from the school’s internal network.The machine does not use the local MySQL installation, but instead utilizes a MySQL server that is not on the VLAN, but has a public IP.
The settings in /var/www/fog/lib/fog/Config.class.php are correct, as are the settings in /opt/fog/.fogsettings
When I change the settings to use the local SQL database, the schema updates just fine.
Now, I said everything is the same with the config files from the physical machine to the VM, but there is a difference, eth0 was on the public side of the network before and eth1 on the private side. I don’t know if this has any bearing, but /etc/network/interfaces has been updated to reflect eth0 as on a 192. network while eth1 is DHCP.
What I think is happening, but I don’t know how to find out if it is the case is that fog is trying to use the VLAN interface (eth0) to access the SQL server, which is only accessible from the public IP (eth1).
If you have read this far, thank you. Here is tail /var/log/apache2/error.log
[Wed Dec 17 15:39:13.053490 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::escape_string(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247
[Wed Dec 17 15:39:13.053507 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::escape_string(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247
[Wed Dec 17 15:39:13.053524 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 89
[Wed Dec 17 15:39:13.053534 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 180
[Wed Dec 17 15:39:13.054035 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::escape_string(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247
[Wed Dec 17 15:39:13.054061 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 89
[Wed Dec 17 15:39:13.054072 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 180
[Wed Dec 17 15:39:13.054114 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::escape_string(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 247
[Wed Dec 17 15:39:13.054171 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 89[Wed Dec 17 15:39:13.054184 2014] [:error] [pid 10329] [client 134.124.24.231:61753] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 180
-
What happens if you run:
If you set mysql password:
[code]mysql -u root -p’<yourpasswordhere>’ -h<yourmysqlhostiphere> fog[/code]If you have no mysql password to connect:
[code]mysql-u root -h<yourmysqlhostiphere> fog[/code] -
Hah! I tried your command and got the error Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’.
We ran that and voila! Our FOG server is back.
You guys are truly wonderful.