Page 1 of 1

Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 5:38 am
by techmanexpress
My automatic upgrade began to fail about 3 or 4 updates ago. Ever since then, every single upgrade has failed. I have had to manually upgrade timetrex. When I do the manual upgrade, my httpd.conf and other conf files associated with my SSL certificate are erased and I have to pull them from a backup. There are 3 of them I believe that I have to manually update.

I don't seem to get any errors other than the email that the automatic upgrade has failed. I have not looked any deeper into logs that may exist. Also, the maintenance jobs stop running until I manually upgrade Timetrex. I just enabled the diagnostic mode in timetrex, but I cannot really reproduce the error because I do not know how to make it try to automatically update again.

I am running it on a Windows 2012 R2 server.

Any help is greatly appreciated!

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 7:01 am
by techmanexpress
I actually have additional information. After I turned on the diagnostic, i attempted a manual upgrade, and I received teh attached email errors. This could possibly contain the information that is why it is failing. The Windows installer never failed and continued.

I would say it is possible this was always happening, but now with diagnostic mode on I am seeing why the upgrade failed?

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 8:10 am
by shaunw
DBError(0) Message: postgres9 error: [0: Missing extension for postgres] in CONNECT()
That appears to be the error message, which is quite strange since I assume TimeTrex works fine after a manual upgrade, but then stops working after an automatic upgrade is attempted?

If TimeTrex is currently working fine, try forcing a manual upgrade with this command and let us know if the problem reappears:

Code: Select all

c:\timetrex\php\php.exe c:\timetrex\timetrex\tools\unattended_upgrade.php -ff

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 9:14 am
by techmanexpress
I will try and get back to you. Yes, it works fine after a manual upgrade AFTER I replace some files to make my SSL Cert work again. It seems to replace the apache conf files to default, so my port settings and SSL stuff is all incorrect. After I replace those files, it seems to be fine. All my data is there, etc.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 9:22 am
by shaunw
techmanexpress wrote: Thu Jul 21, 2022 9:14 am It seems to replace the apache conf files to default, so my port settings and SSL stuff is all incorrect. After I replace those files, it seems to be fine. All my data is there, etc.
If you run the full stack installer (.EXE), that is correct it replaces any changes you have made to Apache/PHP/PostgreSQL config files. However running the unattended_upgrade.php just upgrades TimeTrex itself without changing those files.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 9:53 am
by techmanexpress
That is good to know. When you run that unattended upgrade, I assume then that it downloads the latest version, or uses the latest version that it downloads?

I can't try now because it's lunch time and people clock in and out all the time right now.

I would love to get this back to a place where it upgrades itself again.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 9:55 am
by shaunw
When you run that unattended upgrade, I assume then that it downloads the latest version, or uses the latest version that it downloads?
Correct.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 11:37 am
by techmanexpress
There is no unattended_upgrade.php in that directory, only unattended_install.php. I do see it in old backup folders I've made of the c:\timetrex folder.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 11:44 am
by shaunw
You will need to restore it from your backup, or re-run the Windows installer (.EXE) for v15.3.3 of TimeTrex then.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 12:50 pm
by techmanexpress
I was able to upgrade using command line. Looks like the backup from the day prior to the automatic update failure had the file. it seems after failure that PHP was deleted?

Anyway, looks like it worked?

D:\TimeTrex\timetrex\tools>d:\Timetrex\php\php.exe d:\Timetrex\timetrex\tool
attended_upgrade.php -ff
Force Mode enabled...
New version available, collecting data to download...
Upgrade file already exists...
Cleaning staging directory: D:\TimeTrex\cache\upgrade_staging\
Unzipping UPGRADE.ZIP
Unzipping UPGRADE.ZIP done...
Requirements all pass successfully!
Launching Stage 2...
Force Mode enabled...
Performing any necessary corrections from previous version...
Upgrading database schema...
Upgrading database schema successful!
Cleaning up temporary files...
Stage 2 Successfull!
Upgrade successfull!

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 2:24 pm
by shaunw
Ok, the issue should be resolved now then.

When the next version is released, if you happen to run into the problem again, let us know.

Re: Automatic Upgrade Failing

Posted: Thu Jul 21, 2022 4:00 pm
by techmanexpress
ok, will do, thanks!