Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Topics brought up by the TimeTrex open source community.
Post Reply
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Post by MickG01 »

Upgrade of server went fine.
Postgresql again has 2 versions installed but the one running is 12 and I can log in and see the timetrex database.
I have verified Apache and php are installed and apache2 shows the attempts for timetrex to try to connect and sending back the Down for Maintenance.
Apache2 error log does not show any errors.
This DB is watching on port 5433 - I can't recall how to check or change the port timetrex uses, but this could be the issue.
The earlier version of postgresql (10) is listing errors but I don't think they are timetrex related it is set for port 5432. I'm more inclined to remove this version than fix it!
The postgres-12-main.log looks healthy and shows no errors.
Postgresql.conf has been set to listen on all ports ( I need to update this for the 192.168.1.0/24 ) and ufw is set to allow http:// connections.

any suggestions welcome?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Post by shaunw »

I would recommend searching for proper instructions on how to upgrade PostgreSQL when upgrading from Ubuntu 18.04 to 20.04. There are many guides on how to do this properly. Essentially you need to run a command to migrate your data from the old version of PostgreSQL to the new version, then remove the old version and ensure the new version is the primary "cluster" on the default port of 5432.

However as always make sure you have an excellent backup of your data, since its very easy to accidentally delete your entire database when performing this procedure.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Post by MickG01 »

by MickG01 » Mon Jun 15, 2020 12:11 pm
Upgrade of server went fine.
Postgresql I have assured is running Version 12 and I can log in and see the timetrex database.
I have verified Apache and php are installed and apache2 shows the attempts for timetrex to try to connect and sending back the Down for Maintenance:
192.168.1.16 - - [17/Jun/2020:19:05:21 +0000] "GET /timetrex/interface/html5/ HTTP/1.1" 302 967 "http://192.168.1.200/timetrex/interface ... on=DBError" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
192.168.1.16 - - [17/Jun/2020:19:05:21 +0000] "GET /timetrex/interface/html5/DownForMaintenance.php?exception=DBError HTTP/1.1" 200 3581 "http://192.168.1.200/timetrex/interface ... on=DBError" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
192.168.1.16 - - [17/Jun/2020:19:05:21 +0000] "GET /timetrex/interface/html5/global/APIGlobal.js.php?disable_db=1&v=12.2.0-20200518-075150 HTTP/1.1" 200 2138 "http://192.168.1.200/timetrex/interface ... on=DBError" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"
192.168.1.16 - - [17/Jun/2020:19:05:21 +0000] "GET /timetrex/interface//send_file.php?disable_db=1&object_type=primary_company_logo HTTP/1.1" 304 257 "http://192.168.1.200/timetrex/interface ... on=DBError" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0"

Apache2 error log does not show any errors.

This DB I have tried on ports 5432 and 5433 - I can't recall how to check or change the port timetrex uses, but this could be the issue.

The postgres-12-main.log looks healthy and shows no errors.
Postgresql.conf has been set to listen on all ports ( I need to update this for the 192.168.1.0/24 ) and ufw is set to allow http:// connections.

I tried Installer Enabled and got the attached

any suggestions welcome?
Errors.pdf
(80.01 KiB) Downloaded 336 times
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Post by MickG01 »

For those following me in this Ubuntu upgrade from 18.04 to 20.04 I followed the instructions on these sites:

https://stackoverflow.com/questions/604 ... or-openpro

https://www.timetrex.com/how-to-install ... ntu-debian.
From the section "Installing TimeTrex from the .ZIP file:"
Just sub-sections 1 & 2 and substituting php7.4 for earlier versions.
After Restarting Apache, timetrex came up with all my data intact.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Upgrade to Ubuntu 20.04 Server - Down for Maintenance Error

Post by shaunw »

Just to add some more insight for others, hopefully you didn't follow the first answer here: https://stackoverflow.com/questions/604 ... or-openpro, as its not the correct procedure and is very error prone. The 2nd answer is much closer to the proper procedure. Following stack overflow instructions that have virtually no upvotes isn't usually recommended, especially for a common situation like this that literally has thousands of articles written about it.

An article like this would be similar to what you want to follow, which is all really simple and just a few commands:
https://www.paulox.net/2019/05/28/upgra ... sco-dingo/

As always you can't just blindly copy and paste commands, you must fully understand them and tailor them to your specific situation, otherwise you will wipe out your entire database.
Post Reply