Fog error access web
-
Hi everyone,
I installed the 1.1.0 version of fog,
I can access the fog via [url]http://ip/fog/management[/url].
He then asked me to update, here is what appears:"Database Schema Installer / Updater
Your FOG database schema is not up to date, Either Because You-have updated or FOG FOG this is a new installation. If this is a upgrade, we highly recommend you backup your FOG That before updating the database schema (This Will allow you to return the previous installed version.)
If You Would like to backup your database FOG you can do so using my MySql Administrator or by running the command in a terminal Following window (Applications -> System Tools -> Terminal), This Will save sqldump in your home directory.cd ~; mysqldump - allow-keywords-x-v fog> fogbackup.sql
Are you sure you wish to install / update the FOG database?install / upgrade now> I click on the next page and it gives me a bunch of error messages:
"Database Schema Installer / Updater
Update / Install Failed!The following errors occured
Update ID: 1-0
Database Error:
SQL Database:
CREATE DATABASE fog
Update ID: 1-1
Database Error:
SQL Database:
CREATE TABLEfog
. GroupMembers(Gmid
int (11) NOT NULL auto_increment,GmHostIDint (11) NOT NULL,GmGroupID
int (11) NOT NULL,PRIMARY KEY (Gmid)KEY `new_index` (
gmHostID)KEYnew_index1
(gmGroupID)) ENGINE = MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET = latin1 ROW_FORMAT = DYNAMIC Update ID: 1-2 Database Error: SQL Database: CREATE TABLE `fog`. `Groups` (`GroupID` int (11) NOT NULL auto_increment,`GroupName` varchar (50) NOT NULL,GroupDesc
longtext NOT NULL,GroupDateTimedatetime NOT NULL,
GroupCreateBy varchar (50) NOT NULL,GroupBuildingint (11) NOT NULL,PRIMARY KEY (`groupID`),KEY `new_index` (`groupName`)) ENGINE = MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET = latin1 Update ID: 1-3 Database Error: SQL Database: CREATE TABLE `fog`. `History` (HID
int (11) NOT NULL auto_increment,HTextlongtext NOT NULL,Huser
varchar (200) NOT NULL,HTimedatetime NOT NULL,HIP
varchar (50) NOT NULL,PRIMARY KEY (HID)) ENGINE = MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET = latin1 Update ID: 1-4 Database Error: SQL Database: CREATE TABLE `fog`. `Hosts` (HostID
int (11) NOT NULL auto_increment,Hostname
varchar (16) NOT NULL,HostDesclongtext NOT NULL,
Hostip varchar (25) NOT NULL,HostImageint (11) NOT NULL,HostBuilding
int (11) NOT NULL,HostCreateDatedatetime NOT NULL,
HostCreateBy varchar (50) NOT NULL,HostMAC varchar (20) NOT NULL,Hostos
int (10) unsigned NOT NULL,PRIMARY KEY (hostID)KEY `new_index` (`hostname`)KEY `new_index1` (
hostip)KEYnew_index2
(hostMAC)KEY `new_index3` (
Hostos)) ENGINE = MyISAM AUTO_INCREMENT = 1 DEFAULT CHARSET = latin1Have you an idea of the problem? apparently this is related to the database, but should he do?
Best regards
-
Could you attach your install log for fog?
What OS is Fog installed on?It may be an issue with the config.php for your mysql settings. If you set a password you will need to change the /var/www/fog/commons/config.php to match your Database password.
-
is it me or /var/www/fog/commons/config.php file does not exist … I’m running the latest 1848 SVN version of fog , and having issues updating the schema …
[Mon Jun 16 10:55:12.423145 2014] [:error] [pid 12710] [client 172.29.0.11:57420] PHP Fatal error: Call to a member function get() on a non-object in /var/www/fog/commons/schemaupdater/index.php on line 1399, referer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
been searching for a location to change my sql password (it was left blank … but I thought maybe some revision overwrote that setting) … but can’t find this file ‘config.php’ …
(Linux fog2 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux)
PHP 5.5.9-1ubuntu4 (cli) (built: Apr 9 2014 17:08:27)
Copyright 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright 1998-2014 Zend Technologies -
So I updated to the latest SVN 1848 (in hopes of solving the issue where the images are not displayed if a master node is not present in the same imaging group as an image) … BUT after doing the latest install - noticed that the database schema will not migrate over.
Here are some logs:
[Mon Jun 16 11:05:16.251972 2014] [:error] [pid 14767] [client 172.29.0.11:57580] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on[B] line 89, ref[/B]erer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
[Mon Jun 16 11:05:16.251984 2014] [:error] [pid 14767] [client 172.29.0.11:57580] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on[B] line 180, refe[/B]rer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
[Mon Jun 16 11:05:16.252302 2014] [:error] [pid 14767] [client 172.29.0.11:57580] PHP Warning: mysqli::query(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.ph[B]p on line 89, r[/B]eferer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
[Mon Jun 16 11:05:16.252318 2014] [:error] [pid 14767] [client 172.29.0.11:57580] PHP Warning: MySQL::sqlerror(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.ph[B]p on line 180, r[/B]eferer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
[Mon Jun 16 11:05:16.252360 2014] [:error] [pid 14767] [client 172.29.0.11:57580] PHP Fatal error: Call to a member function get() on a non-object in /var/www/fog/commons/schemaupdater/index.php on[B] line 1399,[/B] referer: [url]http://172.29.0.11/fog/commons/schemaupdater/index.php[/url]
I’m not a PHP expert, but it seems like this function get() is not well-liked by PHP and was an issue in fog 32 … hence the PHP update for the new fog. It looks like the get() function craps out at a critical time to get the version, and all sequential calls for mysql shit the bed in sequence. Is there a way to avoid using get() ?
Result: browsing to localhost (in my case my IP since mysql is bound to an ip) and doing a schema update results in a blank page having only the fog banner image and “database schema installer / updater title”
Note: I am 100% sure that I did not set a password - becuase I am able to login into localhost/phpmyadmin with root/null and see the entire database. so i am very sure that my root has a blank password … plus … c’mon, I can log in via phpmyadmin - so its running correctly.
-
We will need to know your os and a posting of your install log wouldnt hurt.
-
from earlier post:
Lubuntu -> (Linux fog2 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux)Here are the settings FOG will use:
Base Linux: Debian
Detected Linux Distribution: Ubuntu
Installation Type: Normal Server
Server IP Address: 172.29.0.11
DHCP router Address:
DHCP DNS Address: 172.29.0.6
Interface: eth0
Using FOG DHCP: 0
Internationalization: 0
Donate: 0DHCP will NOT be setup but you must setup your current DHCP server to use FOG for PXE services. On a Linux DHCP server you must set: next-server On a Windows DHCP server you must set: option 066 & 067
Option 066 is the IP of the FOG Server: (e.g. 172.29.0.11)
Option 067 is the undionly.kpxe file: (e.g. undionly.kpxe)Are you sure you wish to continue (Y/N) y
Installation Started…
Installing required packages, if this fails
make sure you have an active internet connection.-
Preparing apt-get
-
Installing package: apache2
-
Installing package: php5
-
Installing package: php5-json
-
Installing package: php5-gd
-
Installing package: php5-cli
-
Installing package: php5-mysql
-
Installing package: php5-curl
-
Installing package: mysql-server
We are about to install MySQL Server on
this server, if MySQL isn’t installed already
you will be prompted for a root password.Press enter to acknowledge this message.
Reading package lists…
Building dependency tree…
Reading state information…
mysql-server is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 141 not upgraded.- Installing package: mysql-client
- Installing package: tftpd-hpa
- Installing package: tftp-hpa
- Installing package: nfs-kernel-server
- Installing package: vsftpd
- Installing package: net-tools
- Installing package: wget
- Installing package: xinetd
- Installing package: sysv-rc-conf
- Installing package: tar
- Installing package: gzip
- Installing package: build-essential
- Installing package: cpp
- Installing package: gcc
- Installing package: g++
- Installing package: m4
- Installing package: htmldoc
- Installing package: lftp
- Installing package: openssh-server
- Installing package: php-gettext
- Installing package: clamav-freshclam
Confirming package installation.
- Checking package: apache2…OK
- Checking package: php5…OK
- Checking package: php5-json…OK
- Checking package: php5-gd…OK
- Checking package: php5-cli…OK
- Checking package: php5-mysql…OK
- Checking package: php5-curl…OK
- Checking package: mysql-server…OK
- Checking package: mysql-client…OK
- Checking package: tftpd-hpa…OK
- Checking package: tftp-hpa…OK
- Checking package: nfs-kernel-server…OK
- Checking package: vsftpd…OK
- Checking package: net-tools…OK
- Checking package: wget…OK
- Checking package: xinetd…OK
- Checking package: sysv-rc-conf…OK
- Checking package: tar…OK
- Checking package: gzip…OK
- Checking package: build-essential…OK
- Checking package: cpp…OK
- Checking package: gcc…OK
- Checking package: g++…OK
- Checking package: m4…OK
- Checking package: htmldoc…OK
- Checking package: lftp…OK
- Checking package: openssh-server…OK
- Checking package: php-gettext…OK
- Checking package: clamav-freshclam…OK
Configuring services.
-
Setting up fog user…Exists
-
Setting up and starting MySql…OK
-
Backing up user reports…OK
-
Did you leave the mysql password blank during install? (Y/n)
-
Setting up and starting Apache Web Server…OK
You still need to install/update your database schema.
This can be done by opening a web browser and going to:
Press [Enter] key when database is updated/installed.
- Configuring Fresh Clam…OK
- Setting up storage…OK
- Setting up and starting NFS Server…OK
- Setting up and starting DHCP Server…Skipped
- Setting up and starting TFTP and PXE Servers…OK
- Setting up and starting VSFTP Server…OK
- Setting up sudo settings…OK
- Setting up FOG Snapins…OK
- Setting up and building UDPCast…OK
- Installing init scripts…OK
- Setting up FOG Services…OK
- Starting FOG Multicast Management Server…OK
- Starting FOG Image Replicator Server…OK
- Starting FOG Task Scheduler Server…OK
- Setting up FOG Utils…OK
Would you like to notify the FOG group about this installation?
* This information is only used to help the FOG group determine
if FOG is being used. This information helps to let us know
if we should keep improving this product.Send notification? (Y/N)n
NOT sending notification.Setup complete!
You can now login to the FOG Management Portal using
the information listed below. The login information
is only if this is the first install.This can be done by opening a web browser and going to:
[url]http://172.29.0.11/fog/management[/url] Default User: Username: fog Password: password
Script done, file is /var/log/foginstall.log
-
-
Can you verify 100% that /var/www/fog/commons/config.php does not exist on your machine? This file is vital for mysql connects.
-
confirmed. I even removed /var/www/fog folder and re-ran svn update.
root@fog2:/var/www/fog# ls -lah commons/
total 52K
drwxr-xr-x 3 www-data www-data 4.0K 6月 16 11:31 .
drwxr-xr-x 12 www-data www-data 4.0K 6月 16 11:32 …
-rw-r–r-- 1 www-data www-data 192 6月 16 11:31 base.inc.php
-rw-r–r-- 1 www-data www-data 51 6月 16 11:31 index.php
-rw-r–r-- 1 www-data www-data 6.8K 6月 16 11:31 init.php
drwxr-xr-x 2 www-data www-data 4.0K 6月 16 11:31 schemaupdater
-rw-r–r-- 1 www-data www-data 2.0K 6月 16 11:31 system.php
-rw-r–r-- 1 www-data www-data 20K 6月 16 11:31 text.phpsvn info:
Repository Root: [url]https://svn.code.sf.net/p/freeghost/code[/url]
Repository UUID: 71f96598-fa45-0410-b640-bcd6f8691b32
Revision: 1848
Node Kind: directory
Schedule: normal
Last Changed Author: masterzune
Last Changed Rev: 1848
Last Changed Date: 2014-06-16 10:28:23 +0900 (月, 16 6月 2014) -
Latest configuration is no longer in commons it has moved to lib/fog/Config.class.php
-
I just updated to r1852 and yes I ran exactly into the same issue. Looks like the new file gets generated with a password in the " define(‘DATABASE_PASSWORD’, ‘99158f’);"
Open file using:
[CODE]sudo nano /var/www/fog/lib/fog/Config.class.php
[/CODE]Edit the with the Database_Password to resemble the following:
[CODE] private static function db_settings()
{
define(‘DATABASE_TYPE’, ‘mysql’); // mysql or ora$
define(‘DATABASE_HOST’, ‘localhost’);
define(‘DATABASE_NAME’, ‘fog’);
define(‘DATABASE_USERNAME’, ‘root’);
define(‘DATABASE_PASSWORD’, ‘’);
}
[/CODE]Then go to the web gui and hit upgrade/install button. It should bring up a login link and get you back to “Foggin”
EDIT:
Tom has also informed me to change my /opt/fog/.fogsettings file to remove the password in snmysqlpass.
[CODE]snmysqlhost=“”;
[/CODE] -
Hello to all the problem is not resolved, but I re-installed a vm apparently my OS 14.04 LTS server was not really advisable after the official doc
So I redid a vm:
OS: Ubuntu 12.04
FOG Version: 0.32I managed without too much trouble to install FOG, I can go to the web interface. I recorded a machine (IP + MAC address). Then I started a task to upload the image to the server, it puts “the started task” but nothing happens and if I reload the page it says mssage following error: “Unable to start task”
ping works well between the FOG server and the client machien (ubuntu 14.04 LTS)
Do you have any ideas? ^ ^
Thank you again for your help