• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Failed to Update Schema

    Scheduled Pinned Locked Moved
    FOG Problems
    2
    3
    1.2k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jmdgfc
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Tom ElliottT
        Tom Elliott
        last edited by

        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]

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        1 Reply Last reply Reply Quote 0
        • J
          jmdgfc
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post

          180

          Online

          12.1k

          Users

          17.3k

          Topics

          155.3k

          Posts
          Copyright © 2012-2024 FOG Project