Automatic Upgrade Failing

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
Post Reply
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Automatic Upgrade Failing

Post 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!
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post 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?
Attachments
error-emails.zip
(226.36 KiB) Downloaded 100 times
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Automatic Upgrade Failing

Post 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
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post 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.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Automatic Upgrade Failing

Post 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.
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post 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.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Automatic Upgrade Failing

Post 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.
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post 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.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Automatic Upgrade Failing

Post 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.
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post 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!
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Automatic Upgrade Failing

Post 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.
techmanexpress
Posts: 13
Joined: Thu Sep 16, 2021 7:13 am

Re: Automatic Upgrade Failing

Post by techmanexpress »

ok, will do, thanks!
Post Reply