Database update failed 1.1.0 to 1.1.1



  • I down loaded the newest version of fog (1.1.1) today. When I installed it using /bin/installfog.sh I get stuck on Database Schema Installer / Updater. After I press update now I get stuck on the screen below. When I setup fog I set a my sql root password. During the update the installer asked if the root password was blank, I said no. The installer never asked for the password which I assume it retrieved from the current install. I have tried restarting the mysql service, but the schema update still fails.
    [IMG]http://fogproject.org/forum/data/attachments/1/1002-552a8d84d51c42ae89132e9e4abf5e40.jpg[/IMG]

    [url="/_imported_xf_attachments/1/1002_fog error.png?:"]fog error.png[/url]



  • Thanks a lot for the work you guys do.
    Had the database schema problem and thought I’d have to do a complete rebuild.
    Used the link provided: [url]https://github.com/mastacontrola/fogproject/issues/1[/url]
    Works now.
    Am running Ubuntu 14.04 LTS (desktop version) and FOG 1.2.0

    Thanks again very much.
    Fred



  • One thing I found that worked on my upgrade from 1.1.1 to 1.1.2 and 1.1.0 to 1.1.2 was during the install, you are asked if you set a password for the mysql database. Most people don’t set a password. If you didn’t set a password, answer YES anyway. Then when prompted for the password, just hit enter twice.
    Then when you go to update the database the first time entering FOG, everything works.



  • Just tried it, and I’m still getting the same error.

    OS Version: Ubuntu 14.04

    I deleted the /opt/fog/ folder before installing. I left the previous MySQL tables intact.

    Here is the relevant part from the apache error log:

    [QUOTE]
    [Fri Jun 20 20:23:27.671187 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
    [Fri Jun 20 20:23:27.674118 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
    [Fri Jun 20 20:23:27.712777 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
    [Fri Jun 20 20:23:27.757534 2014] [:error] [pid 24587] [client 10.77.17.8:56201] PHP Fatal error: Call to a member function save() on a non-object in /var/www/fog/commons/schemaupdater/index.php on line 1415, referer: [url]http://10.77.17.78:8000/commons/schemaupdater/index.php?redir=1[/url]
    [/QUOTE]

    Because of the way I’ve setup the Apache virtual host, the base URL does not have the “/fog/” component in it, and it is also running off of port 8000 as I mentioned previously.


  • Senior Developer

    [quote=“jonathan7, post: 31004, member: 24721”]This is from a fresh install of 1.1.1.

    I posted in this thread because the error is related to the database update script, although it isn’t strictly related to updating the entire installation itself.[/quote]

    If you’re fearless, can you please try these steps? (WARNING YOU’LL BE ON TRUNK OF FOG, NOT RELEASED VERSION) I’ve addressed many problems found and added a couple features, maybe you’ll enjoy them?

    [code]svn co https://svn.code/sf/net/p/freeghost/code/trunk
    cd trunk/bin
    sudo ./installfog.sh[/code]



  • This is from a fresh install of 1.1.1.

    I posted in this thread because the error is related to the database update script, although it isn’t strictly related to updating the entire installation itself.


  • Developer

    [quote=“jonathan7, post: 30997, member: 24721”]This is the error that I’m getting when I try to update the database:

    I’m running Fog on port 8000 instead of 80 because I am already using Apache for another site. I also have a MySQL password set, but I entered that in during the setup and made sure that it shows up in the config file. I will also be using my router as the DHCP router instead of Fog.

    Any help with this error?[/quote]

    what version of fog are you running?



  • This is the error that I’m getting when I try to update the database:

    [QUOTE]

    PHP Warning: array_key_exists() expects parameter 2 to be array, null given in /var/www/fog/lib/db/MySQL.class.php on line 150
    [/QUOTE]

    I’m running Fog on port 8000 instead of 80 because I am already using Apache for another site. I also have a MySQL password set, but I entered that in during the setup and made sure that it shows up in the config file. I will also be using my router as the DHCP router instead of Fog.

    Any help with this error?



  • [quote=“Tom Elliott, post: 30630, member: 7271”]Could you give these a suggestions a shot?
    [url]http://howterrorisminindia.blogspot.com/2013/03/error-2002-hy000-cant-connect-to-local.html[/url]

    Also, as you’re running svn, change your /var/www/fog/lib/fog/Config.class.php and reset the database password to ‘’ from whatever it currently is.

    To fix this for future upgrades, edit the /opt/fog/.fogsettings file and set the snmysqlhost, snmysqluser, snmysqlpass properly. FOG is using the snmysqlpass to set the password for the database. It was broken in rev’s past, but I “fixed” it. One issue, though, is that this file, if exists, does not get recreated on other upgrades. So my guess is it’s got, more or less, a random password in place, which is what your db password is set to.[/quote]

    This worked! thanks!


  • Senior Developer

    [quote=“Tom Elliott, post: 30941, member: 7271”]Seeing as you’ve already attempted to “upgrade” I’d recommend updating to the latest where I fixed the schema update problem.

    Go into the svn folder you download, probably trunk and run
    [code]svn update
    cd bin
    ./installfog.sh[/code][/quote]

    So you don’t see the “You’re not running the latest version” message, edit the
    /var/www/fog/commons/system.php file at line 30. It will read something like:
    [php] define(‘FOG_VERSION’, ‘1890’);[/php]

    Make it read as:
    [php] define(‘FOG_VERSION’, ‘1.1.1’);[/php]


  • Senior Developer

    [quote=“mlnancejr8808, post: 30937, member: 654”]I know this may be a stupid question, how did that happen and can i get it to where i can run 1.1.1? Will 1880 run/act differently?[/quote]

    Seeing as you’ve already attempted to “upgrade” I’d recommend updating to the latest where I fixed the schema update problem.

    Go into the svn folder you download, probably trunk and run
    [code]svn update
    cd bin
    ./installfog.sh[/code]


  • Developer

    you have installed a beta version that is newer then 1.1.1
    downgrading is not supported
    did you make backups?



  • I know this may be a stupid question, how did that happen and can i get it to where i can run 1.1.1? Will 1880 run/act differently?


  • Senior Developer

    [quote=“mlnancejr8808, post: 30934, member: 654”]I did the upgrade to 1.1.1 and it still saying that I am not on the latest version. Also, on the main login page for the WebGUI, instead of the cloud in the upper left hand corner saying FOG 1.1.1 it says FOG 1880. then under \var\www\fog\commons I don’t have a config.php file anymore.[/quote]

    Then you’re not running 1.1.1. You’re running SVN Version 1880.

    The config file for the SVN is now located in:
    /var/www/fog/lib/fog/Config.class.php



  • I did the upgrade to 1.1.1 and it still saying that I am not on the latest version. Also, on the main login page for the WebGUI, instead of the cloud in the upper left hand corner saying FOG 1.1.1 it says FOG 1880. then under \var\www\fog\commons I don’t have a config.php file anymore.


  • Senior Developer

    I’m aware of this bug, and it’s been fixed trunk, so next release you may have to reset values in .fogsettings one more time, but that should be it.



  • After a bunch of trial and error, I just reset the MySQL password with this command :

    sudo dpkg-reconfigure mysql-server-5.5

    I put this same password into .fogsettings under snmysqlpass, and also into config.php and re-ran the FOG installer.

    It overwrote my password in .fogsettings with yet another randomly-generated one (I still have no idea why or where this password is actually used) but after that everything worked great!

    I’m sure I just screwed something up along the way and/or entered the MySQL password incorrectly…

    Thanks for the help and advice, as always,
    D.L.

    P.S. - I did use snmysqluser=“root” and snmysqlhost=“localhost” - thanks for that info!



  • Thanks for the reply,
    I’m only doing a Normal installation for now, so I’m attempting with those settings…

    However the snmysqlpass field still doesn’t make sense to me - I went ahead and this to my SQL database password (that I set during initial installation) and re-ran the FOG installer and it overwrites it with a random password … so something seems wrong …

    If it were using the password that I put into snmysqlpass before installation/upgrade, then why does it overwrite it?

    Thanks,
    D.L.

    edit - fixed syntax mistakes…


  • Senior Developer

    snmysqluser should be the fogstorage user on storagenodes: i.e.: StorageNodeMYSQLUSER or snmysqluser, if it’s not a node you can leave it blank OR make it root, either way it won’t hurt anything.
    smysqlpass should be the fogstorage users password on storagenodes: i.e.: StorageNodeMYSQLPASS or snmysqlpass, if it’s not a node you should set this field to whatever the root password is set to OR if no password was set, leave it blank with two double quotes.



  • Thanks for the reply,
    I have no idea how to use SVN, but I will look into that and figure it out.

    Regarding the .fogsettings file, is there any documentation on how it should be set? Excuse my lack of knowledge, but I have no idea what the settings are actually supposed to be, I’m just guessing. I can guess what the host should be (127.0.0.1 or my actual IP) but I’m not sure what the snmysqluser or snmysqlpass is supposed to be…

    Especially confusing is the snmysqlpass - is that supposed to be the database password that I set? Or a random one generated by the FOG installer/configuration?

    Thank you,
    D.L.

    edit - Seen last post, will try… but I still don’t get the randomly-generated password thing, which seemed to be what worked in FOG 1.1.0…


Log in to reply
 

380
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.