PDA

View Full Version : SVN Updates Failing


itataot
07-02-2008, 01:05 AM
Hello All,

I am having trouble updating our helpdesk system. I was able to change the SVN repo and update the files but i am running into problems when I try to access the helpdesk for the first time.

I get the "the system is currently being updated page". I then click on the I am an admin link and all I get from there is a white screen with the page constantly loading and the apache process in the backend hits 100% utilisation util i stop apache.

The server is a OpenSUSE 10.3 box. Can you let me know what other information is required.

Thanks

itataot
07-02-2008, 01:07 AM
Some more info.

Cerberus Helpdesk™ © 2002-2008, WebGroup Media™ LLC - Version 4.0 RC1 (Build 581)

dsugita
07-02-2008, 01:47 AM
Hi there,
The framework.config.php file has changed since that build, what you may want to do is move that file out of the directory, run your svn update, then manually copy over your database values from the old framework.config.php file into the new one. After doing that, try running the helpdesk update again.

itataot
07-02-2008, 02:34 AM
I thought that originally but i have done that and ran diff's against the new versions to make sure i am not missing anything.

Is there any debugging that can be turned on?

itataot
07-02-2008, 02:36 AM
Just realised i am missing this line in the config.

define('APP_DB_PCONNECT',false);

I will try the upgrade again. Would this missing value cause the upgrade issues, if so should it not have a default value?

itataot
07-02-2008, 11:13 AM
Update still failing.

This is a copy of my framework file

<code>
define('APP_DB_DRIVER','mysql');
define('APP_DB_HOST','<<<>>>');
define('APP_DB_DATABASE','<<<>>>');
define('APP_DB_USER','<<<>>>');
define('APP_DB_PASS','<<<>>>');
define('APP_DB_PCONNECT',false);

//define('DEVBLOCKS_LANGUAGE','en');
//define('DEVBLOCKS_THEME','default');
//define('DEVBLOCKS_DEBUG',true);

// Persistent Memory Caching (Cross-Thread)
//define('DEVBLOCKS_MEMCACHE_HOST','127.0.0.1');
//define('DEVBLOCKS_MEMCACHE_PORT','11211');

// [TODO] This needs to be coming out of GUI config (system default + worker default)
@date_default_timezone_set('Australia/Queensland');

define('APP_PARSER_ALLOW_IMPORTS', true);

/************************************************** **************************
* [JAS]: Don't change the following unless you know what you're doing!
************************************************** *************************/
define('APP_DEFAULT_CONTROLLER','core.controller.p age');
define('APP_DB_PREFIX','cerb');
define('APP_PATH',realpath(dirname(__FILE__)));
define('DEVBLOCKS_PATH',APP_PATH . '/libs/devblocks/');
define('DEVBLOCKS_REWRITE', file_exists(dirname(__FILE__).'/.htaccess'));
define('DEMO_MODE',false);
define('AUTHORIZED_IPS_DEFAULTS', '');

require_once(DEVBLOCKS_PATH . 'framework.defaults.php');
</code>

Processing the update leaves my apache process like this

wwwrun 29192 90.1 0.4 101580 17104 ? R 19:57 5:43 /usr/sbin/httpd2-prefork -f /etc/apache2/httpd.conf

MySQL is sitting there doing nothing.

mysql> show processlist;
+--------+----------+--------------------------+-----------------+---------+------+-------+------------------+
| Id | User | Host | db | Command | Time | State | Info |
+--------+----------+--------------------------+-----------------+---------+------+-------+------------------+
| 338001 | cerberus | localhost | cerb4 | Sleep | 324 | | NULL |
| 338008 | root | localhost | NULL | Query | 0 | NULL | show processlist |
+--------+----------+--------------------------+-----------------+---------+------+-------+------------------+
5 rows in set (0.00 sec)

mysql>

And the apache logs show nothing but the access of the page. There are no errors displayed in any logs.

What next? Is there any advanced logging that I can try? I am about to copy the code to my dev machine and run xdebug over the code and see if i can find where the code is entering the endless loop.

Thanks.

itataot
07-02-2008, 12:56 PM
Hi all,

I have attached a xdebug code profile in text format. This was from a windows xp machine running WAMPSERVER 2.0 with xdebug extensions installed. With this machine i get the same issue and the httpd.exe process flogs out 100% of one processor.

Correction, i would like to attach the file but it is too big for the forum (if someone at support would like to see the full file let me know and I can email it too you).

Here are the last lines where the trace just stops

1.9577 13982976 -> ADOConnection->Execute('SELECT m.ticket_id, min(m.id) as first_message_id FROM message m INNER JOIN ticket t ON (t.id=m.ticket_id) WHERE t.first_message_id = 0 GROUP BY ticket_id', ???) D:\Inetpub\cerb4\plugins\cerberusweb.core\patches\ 4.0.0_beta.php:749
1.9577 13985784 -> ADOConnection->_Execute('SELECT m.ticket_id, min(m.id) as first_message_id FROM message m INNER JOIN ticket t ON (t.id=m.ticket_id) WHERE t.first_message_id = 0 GROUP BY ticket_id', FALSE) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:893
1.9578 13987824 -> ADODB_mysql->_query('SELECT m.ticket_id, min(m.id) as first_message_id FROM message m INNER JOIN ticket t ON (t.id=m.ticket_id) WHERE t.first_message_id = 0 GROUP BY ticket_id', FALSE) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:907
1.9578 13987936 -> mysql_query('SELECT m.ticket_id, min(m.id) as first_message_id FROM message m INNER JOIN ticket t ON (t.id=m.ticket_id) WHERE t.first_message_id = 0 GROUP BY ticket_id', resource(16) of type (mysql link)) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:506
1.9587 13989672 -> ADORecordSet_mysql->ADORecordSet_mysql(resource(213) of type (mysql result), 2) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:933
1.9587 13990256 -> ADORecordSet->ADORecordSet(resource(213) of type (mysql result)) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:622
1.9588 13989880 -> ADORecordSet->Init() D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:935
1.9588 13990392 -> ADORecordSet_mysql->_initrs() D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:2898
1.9589 13990392 -> mysql_num_rows(resource(213) of type (mysql result)) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:629
1.9589 13990392 -> mysql_num_fields(resource(213) of type (mysql result)) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:630
1.9590 13990392 -> ADORecordSet_mysql->_fetch() D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:2906
1.9590 13990392 -> mysql_fetch_array(resource(213) of type (mysql result), 1) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:697
1.9590 13990552 -> is_array(array ('ticket_id' => '0', 'first_message_id' => '0')) D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\driver s\adodb-mysql.inc.php:698
1.9591 13990064 -> is_array('SELECT m.ticket_id, min(m.id) as first_message_id FROM message m INNER JOIN ticket t ON (t.id=m.ticket_id) WHERE t.first_message_id = 0 GROUP BY ticket_id') D:\Inetpub\cerb4\libs\devblocks\libs\adodb5\adodb. inc.php:936

The last query ran results in two rows

ticket_id first_message_id
0 0
2946 6439

Thanks.

itataot
07-03-2008, 12:34 AM
This issue has come from a database crash we suffered several months ago. See details here

http://www.cerb4.com/forums/showthread.php?t=866

The SEQ tables were corrupted. This resulted with the Ticket and Message counters resetting to 0.

We had a ticket and a message for that ticket registered with their id's as 0. I just modifed the tickets using SQL to change to a free ID greater then 0 and all is now well.

I have successfully completed the upgrade on my Dev environment. I will perform these changes in production tonight and let you know how I go, but I dont expect any problems.

dsugita
07-03-2008, 02:26 AM
Alright, thanks for letting us know you found what was causing the issue with the update.