ispCP - Board - Support
[SOLVED] Update 1.0.2 > 1.0.3 issue, db update fail - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: Update/Upgrade (/forum-44.html)
+--- Thread: [SOLVED] Update 1.0.2 > 1.0.3 issue, db update fail (/thread-8830.html)

Pages: 1 2


[SOLVED] Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-20-2009 10:35 PM

Hi,
this morning I've faced fail while updating to new 1.0.3 version.
I did everything as noted on Upgrade 1.x.x -> ispCP 1.x.x
http://www.isp-control.net/documentation/doku.php?id=start:upgrade:rc
but this is what I've got:

Code:
ispCP database
         Update ispCP database schema:DEBUG: push_el() sub_name: update_database_schema(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Ending...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Starting...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Ending...
DEBUG: push_el() sub_name: exit_msg(), msg: Starting...
                                                                                                                               [failed]


        FATAL: An error was occured during update process!
        Correct it and re-run this program.

        You can find help at http://isp-control.net/forum

DEBUG: push_el() sub_name: exit_msg(), msg: Ending...
giraite:/var/www/ispcp/engine/setup#

Thanks for quck help.
Just now found new document http://www.isp-control.net/documentation/doku.php?id=start:upgrade:debian for Debian users (as I am).
Maybe it was my mistake to read "Upgrade 1.x.x -> ispCP 1.x.x" ?

Now I have no access to panel, but whole system seems working OK.


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-21-2009 12:10 AM

Maybe any suggestions how to roll-back from this point?


RE: Update 1.0.2 > 1.0.3 issue, db update fail - RatS - 12-21-2009 12:30 AM

The wiki page was really misleading, I changed it.

You can try to re-do the update with the new version. It could work, but I can not guarantee.


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-21-2009 01:11 AM

I've followed all instructions for Debian users, but no change.. :/

Code:
ispCP database
         Update ispCP database schema:DEBUG: push_el() sub_name: update_database_schema(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Ending...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Starting...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Ending...
DEBUG: push_el() sub_name: exit_msg(), msg: Starting...
                                                                                                                       [failed]


        FATAL: An error was occured during update process!
        Correct it and re-run this program.

        You can find help at http://isp-control.net/forum

DEBUG: push_el() sub_name: exit_msg(), msg: Ending...

I think this is something with functions trying to add new tables to db..
Current state:
while trying to access login page at admin.domain.tld getting
Connection failed: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Did update script change mysql passwords? how to roll back to 1.0.2 version. It was my huge mistake to try this upgrade.. :/


RE: Update 1.0.2 > 1.0.3 issue, db update fail - warcry - 12-21-2009 01:38 AM

(12-21-2009 01:11 AM)Ignas Galuskinas Wrote:  I think this is something with functions trying to add new tables to db..
/tmp/ispcp-update-database.log should give you more information.

You can fix the sql password in /etc/ispcp/ispcp.conf (DATABASE_PASSWORD). A roll back should be possible by reverting step 5 & 8 of Debian Update, as long as the database update wasn't done or you have a backup of the 1.0.2 ispcp database. However I'm pretty new to ispCP so you might want to wait for a more experienced user to confirm this.


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-21-2009 02:24 AM

Update -database.log:
Code:
Warning: require_once(): open_basedir restriction in effect. File(/var/www/ispcp/gui/include/ispcp-lib.php) is not within the allowed path(s): (/var/www/$

Warning: require_once(/var/www/ispcp/gui/include/ispcp-lib.php): failed to open stream: Operation not permitted in /var/www/ispcp/engine/setup/updDB.php $

Fatal error: require_once(): Failed opening required '/var/www/ispcp/gui/include/ispcp-lib.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var$

ok, fixed with open_basedir restrictions. Now only one log entry:
Connection failed: SQLSTATE[28000] [1045] Access denied for user 'root'@'localhost' (using password: YES)
Code:
sub update_database_schema {

        push_el(\@main::el, 'update_database_schema()', 'Starting...');

        my ($rs, $cmd, $php, $rdata) = (undef, undef, undef, undef);

        # File preparation - Begin

        ($rs, $rdata) = get_file("$main::cfg{'ROOT_DIR'}/engine/setup/updDB.php");
        return $rs if($rs != 0);

        if($rdata =~ s/{GUI_ROOT_DIR}/$main::cfg{'GUI_ROOT_DIR'}/) {

                # Saving the modified file
                $rs = save_file("$main::cfg{'ROOT_DIR'}/engine/setup/updDB.php", $rdata);
                return $rs if($rs != 0);
        }

        # File preparation - End

      [b]  $main::db_pwd =~ s/([\'\"])/\\$1/g;
[/b]
        $cmd = "$main::cfg{'CMD_PHP'} $main::cfg{'ROOT_DIR'}/engine/setup/updDB.php &>/tmp/ispcp-update-database.log";
        $rs = sys_command_rs($cmd);
        return $rs if($rs !=0);

        push_el(\@main::el, 'update_database_schema()', 'Ending...');

        0;
}
what is this?


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-21-2009 04:37 AM

I've changed DB pass by this doc (http://www.isp-control.net/documentation/doku.php?id=howto:ispcp:change_db_pass).

Unfoturnately it doesn help to successfully end ./ispcp-update ://

help help help!!!


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Nuxwin - 12-21-2009 04:40 AM

Normally, all work fine.

Normally, the open_basedir error would not occur. You have executed the update script as root ?

Concerning the password, no, the script does not change the password of the user SQL.

Normally, you should follow this document for debian http://www.isp-control.net/documentation/doku.php?id=start:upgrade:debian.

Fo the DB password issue, see http://www.isp-control.net/documentation/doku.php?id=howto:ispcp:change_db_pass


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Ignas Galuskinas - 12-21-2009 04:59 AM

1. Yes I always work as root.
2. I had set Open_basedir week ago, so it was my fault - now this line is cleared. No prob with that.
3. I've changed sql pass reading this doc - and was kind-of able to login to admin panel (got some errors like "headers already sent by enumerator.php and ~", but I think this is only becouse of unfinished db update).
4. I still get this error while starting ./ispcp-update
Code:
ispCP database
         Update ispCP database schema:DEBUG: push_el() sub_name: _update_database_schema(), msg: Starting...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Starting...
DEBUG: push_el() sub_name: sys_command_rs(), msg: Ending...
DEBUG: push_el() sub_name: exit_msg(), msg: Starting...
                                                                                                                       [failed]


        FATAL: An error was occured during update process!
        Correct it and re-run this program.

        You can find help at http://isp-control.net/forum

DEBUG: push_el() sub_name: exit_msg(), msg: Ending...
if freaks me out... and this update error doesnt create any ispcp-update-database.log


RE: Update 1.0.2 > 1.0.3 issue, db update fail - Nuxwin - 12-21-2009 05:04 AM

ok ; If you want, I can work on your system directly to found the problem. If it's ok, send me a PM.