Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Ask your questions regarding TimeTrex installation here.
JamesFromAustin
Posts: 6
Joined: Wed Nov 29, 2017 5:58 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by JamesFromAustin » Thu Nov 30, 2017 12:47 pm

I do see this one repeat a few times before it finally gets to the last part posted

DEBUG [L0186] [12506ms]: InstallSchema_Base::removeSchemaSQLFileComments(): Skipping SQL Comment: --Fix invalid time default values that prevent altering the table later on;

DEBUG [L0241] [12513ms]: InstallSchema_Base::_InstallSchema(): No previous Schema failure state file: c:\temp\timetrex_2\tt_schema_failure.state
DEBUG [L0248] [12522ms]: InstallSchema_Base::_InstallSchema(): Schema SQL has data, executing commands! Version: 1100A
DEBUG [L0269] [12523ms]: InstallSchema_Base::_InstallSchema(): Executing SQL command: 0 of: 1806
DEBUG [L0269] [12523ms]: InstallSchema_Base::_InstallSchema(): Executing SQL command: 1 of: 1806
DEBUG [L0273] [12529ms]: InstallSchema_Base::_InstallSchema(): SQL Command failed on line: 1 of: 1100A
DEBUG [L0062] [12533ms]: DBError::__construct(): Begin Exception...
DEBUG [L0063] [12533ms] Array: DBError::__construct(): BackTrace:
string(910) "#1.Debug::backTrace() C:\wamp\www\TimeTrex\classes\modules\core\Exception.class.php:63
#2.DBError->__construct(Object(ADODB_Exception)) C:\wamp\www\TimeTrex\classes\modules\install\InstallSchema_Base.class.php:275
#3.InstallSchema_Base->_InstallSchema() C:\wamp\www\TimeTrex\classes\modules\install\InstallSchema_Base.class.php:325
#4.InstallSchema_Base->InstallSchema() N/A:N/A
#5.call_user_func_array(Array(2), Array(0)) C:\wamp\www\TimeTrex\classes\modules\install\InstallSchema.class.php:131
#6.InstallS"...

DEBUG [L0084] [12533ms]: DBError::__construct(): Code: DBError(1067) Message: mysqli error: [1067: Invalid default value for 'start_time'] in adodb_throw(
ALTER TABLE `recurring_schedule` CHANGE `start_time` `start_time` timestamp DEFAULT '1970-01-0
DEBUG [L0084] [12533ms]: DBError::__construct(): 1 00:00:00',
CHANGE `end_time` `end_time` timestamp DEFAULT '1970-01-01 00:00:00', )
DEBUG [L0091] [12534ms] Array: DBError::__construct(): Exception...
string(1268) " ADOConnection._Execute( ALTER TABLE `recurring_schedule` CHANGE `start_time` `start_time` timestamp DEFAULT '1970-01-01 00:00:00', CHANGE `end_time` ..., false)% line 1229, file
: C:\wamp\www\TimeTrex\classes\adodb\adodb.inc.php
ADOConnection.Execute( ALTER TABLE `recurring_schedule` CHANGE `start_time` `start_time` timestamp DEFAULT '1970-01-01 00:00:00', CHANGE `end
_time` ...)% line 270, file: C:\wamp\www\TimeTrex\classes\modules\install\InstallSchema_Base.class.php
InstallSchema_Bas"...
DEBUG [L0094] [12534ms]: DBError::__construct(): End Exception...
DEBUG [L0281] [12765ms] Array: TTMail::Send(): Attempting to send email To:
string(19) "errors@timetrex.com"

------------------------------------------------------------

DEBUG [L0662] [149438ms]: [Function](): Stage2 failed... Exit Code: 254
DEBUG [L0051] [149448ms] Array: SystemSettingFactory::isUniqueName(): Unique Name: auto_upgrade_failed
string(2) "13"


DEBUG [L0184] [149448ms]: SystemSettingFactory::setSystemSetting(): Key: auto_upgrade_failed Value: 1 isNew: 0
DEBUG [L1864] [149448ms]: Factory::StartTransaction(): StartTransaction(): Transaction: Count: 0 Off: 0 OK: 0
DEBUG [L2002] [149448ms]: Factory::Save(): Calling preSave()
DEBUG [L2060] [149448ms]: Factory::Save(): Updating...
DEBUG [L1833] [149449ms]: Factory::getUpdateQuery(): Data changed, set updated date:
DEBUG [L0072] [149453ms]: Debug::Shutdown(): PHP ERROR - FATAL(1): Class 'TTUUID' not found File: C:\wamp\www\TimeTrex\classes\modules\core\TTLog.class.php Line: 72
DEBUG [L0433] [149453ms]: Debug::Shutdown(): Detected PHP errors (1), emailing log...
DEBUG [L0434] [149453ms]: Debug::Shutdown(): ---------------[ 29-Nov-2017 3:32:47 +0000 [1511926367.4441] (PID: 6888) ]---------------
DEBUG [L0281] [149478ms] Array: TTMail::Send(): Attempting to send email To:
string(19) "errors@timetrex.com"

JamesFromAustin
Posts: 6
Joined: Wed Nov 29, 2017 5:58 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by JamesFromAustin » Thu Nov 30, 2017 5:56 pm

shaunw wrote:
Wed Nov 29, 2017 9:42 pm
Try downloading the TimeTrex .ZIP file from our website again, and confirm that the 2nd line in classes/modules/install/sql/mysql/1100A.sql has a timestamp of "00:00:01", or 1 second after midnight. If it does, you should be able to run the web-based installer again and see if it works for you. If it fails again, please attach your timetrex.log file here and we will happy to investigate it further.
Hi Shaun - Downloaded latest zip, verified timestamp on 2nd in 1100A.sql as requested. Ran web-based installer, but seem to be getting same error. Log file attached. Thanks again
Attachments
timetrex.log
(1.44 MiB) Downloaded 31 times

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by shaunw » Wed Dec 06, 2017 7:09 pm

FYI: MySQL support has been deprecated in v11.0 and will be removed in v11.1. All installations of TimeTrex will need to be migrated to the PostgreSQL database prior to upgrading to v11.1.

For more information please see:
viewtopic.php?f=6&t=7519&p=23173

JamesFromAustin
Posts: 6
Joined: Wed Nov 29, 2017 5:58 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by JamesFromAustin » Thu Dec 14, 2017 12:05 pm

shaunw wrote:
Wed Dec 06, 2017 7:09 pm
FYI: MySQL support has been deprecated in v11.0 and will be removed in v11.1. All installations of TimeTrex will need to be migrated to the PostgreSQL database prior to upgrading to v11.1.

For more information please see:
viewtopic.php?f=6&t=7519&p=23173
Shaun - Thanks for your reply. I had discovered this when I set up a brand new MySQL server and tried to install latest version. This is unfortunate, as I know nothing about PostgreSQL and do not have the resources to climb the learning curve. I do appreciate your help. I guess what I will do for now is freeze at old version until I have time to learn PostgreSQL - that is a distant target.

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by shaunw » Thu Dec 14, 2017 5:39 pm

JamesFromAustin wrote:
Thu Dec 14, 2017 12:05 pm
Shaun - Thanks for your reply. I had discovered this when I set up a brand new MySQL server and tried to install latest version. This is unfortunate, as I know nothing about PostgreSQL and do not have the resources to climb the learning curve. I do appreciate your help. I guess what I will do for now is freeze at old version until I have time to learn PostgreSQL - that is a distant target.
We understand your concern, but its not something we would recommend doing, as the longer you wait the more difficult the migration is likely to be and less likely you will be able to get assistance if something does go wrong. Additionally if there is a bug that crops up that happens to affect your data, (MySQL is especially prone to this, and just one reason why we no longer support it) if you aren't upgrading on a regular basis you may not be aware of it until its too late. We would hate to see something like that happen, so we encourage everyone to migrate away from MySQL as soon as possible.

One of the nice things about PostgreSQL is its almost entirely hands off from a maintenance/learning curve stand-point, in fact if you use Debian/Ubuntu Linux distribution you can get TimeTrex installed and running within a matter of minutes with these instructions:
https://www.timetrex.com/how-to-install ... debian#DEB

JamesFromAustin
Posts: 6
Joined: Wed Nov 29, 2017 5:58 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by JamesFromAustin » Thu Dec 14, 2017 6:38 pm

shaunw wrote:
Thu Dec 14, 2017 5:39 pm
One of the nice things about PostgreSQL is its almost entirely hands off from a maintenance/learning curve stand-point, in fact if you use Debian/Ubuntu Linux distribution you can get TimeTrex installed and running within a matter of minutes with these instructions:
https://www.timetrex.com/how-to-install ... debian#DEB
Appreciate that. We are a Windows house/business and have no Linux based installations. Lots of Windows based software running to perform the function of running the business from internal .Net applications to commercial off the shelf software. As you can imagine, I don't deal with Linux much, I have in the past, but that was a past life. Now I own/operate the business and maintaining computer systems is something I do out of necessity, not because it is my primary job function. When I'm not seeing customers or talking with staff I'm developing software at midnight, so finding time to learn another database is beyond my available time. In fact, I'm not even a database/web guy, my expertise was hardware/software/real-time/control systems engineer. So you can imagine my handicap. I barely have MySQL figured out!! I do realize the benefits/trade-offs of PostgreSQL - I studied up after realizing you guys are going that way. We have been using TimeTrex for quite some time. I forget how long, I'd have to dig hard to figure out. Longer than my memory can recall. Thanks for all your guys hard work!

shaunw
Posts: 7483
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrade fail [Function](): Stage2 failed... Exit Code: 254

Post by shaunw » Fri Dec 15, 2017 12:30 pm

JamesFromAustin wrote:
Thu Dec 14, 2017 6:38 pm
Appreciate that. We are a Windows house/business and have no Linux based installations. Lots of Windows based software running to perform the function of running the business from internal .Net applications to commercial off the shelf software. As you can imagine, I don't deal with Linux much, I have in the past, but that was a past life. Now I own/operate the business and maintaining computer systems is something I do out of necessity, not because it is my primary job function. When I'm not seeing customers or talking with staff I'm developing software at midnight, so finding time to learn another database is beyond my available time. In fact, I'm not even a database/web guy, my expertise was hardware/software/real-time/control systems engineer. So you can imagine my handicap. I barely have MySQL figured out!! I do realize the benefits/trade-offs of PostgreSQL - I studied up after realizing you guys are going that way. We have been using TimeTrex for quite some time. I forget how long, I'd have to dig hard to figure out. Longer than my memory can recall. Thanks for all your guys hard work!
If you are using Windows, its even easier then since our windows installer handles everything for you out of the box. Of course if you are using the same server for other web applications that may pose a problem, but if not, our Windows installer is of course recommended.

Post Reply