Timetrex not responding on upgrade to Ubuntu Server 12.10

Ask your questions regarding TimeTrex installation here.
Locked
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Timetrex not responding on upgrade to Ubuntu Server 12.10

Post by MickG01 »

I upgraded my ubuntu server from 12.04 to 12.10
Now atempting to launch timetrex gives me a blank screen - no errors just nothing
I have tested and proven Apache2, PHP are working by the single <?php; phpinfo(); ?> file and all is good
All files and directory paths look OK as they were before.
Suggestions as to what to do to get my timetrex back?
Thanks

Mick :cry:
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

FUrther checking - trying to connect from a Windows machine gives a HTTP 500 Internal Server error
Could it be something to do with the Postgres needing action after the upgrade?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

How did you originally install TimeTrex, from the automated installer or the .ZIP file?

Have you checked the Apache/PHP error logs?
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

It was installed from the Zip file.
I'll check the error logs if I can find them ;) but other PHP pages are working which is why I wondered about Posgresql.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

OK I went into Postgres and connected to my timetrex database. So I'm guessing wthout tring to check every table that it's not Postgres.
So I should be able to just reinstall timetres as though I were doing a normal upgrade keeping my timetrex.ini.php as usual. No?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

I doubt it has anything to do your database, its likely something much higher up in the stack, it could be a permission issue preventing Apache from actually running the PHP files properly, or if you using some sort of transfer program like FTP to upload the files to your server, it could be corrupted files. You should definitely see at least some sort of hint the in the Apache, PHP, or TimeTrex logs though. Without that its going to be difficult to track down.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

the only logs with anything in seem to be in syslog
Samples of all I can see repeated - looks like crontab is wrong these lines are repeated.


Oct 31 06:09:01 timberoakspetspa CRON[22747]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete)
Oct 31 06:10:01 timberoakspetspa CRON[22761]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:11:01 timberoakspetspa CRON[22772]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:12:01 timberoakspetspa CRON[22781]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:13:01 timberoakspetspa CRON[22790]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:14:01 timberoakspetspa CRON[22799]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:15:01 timberoakspetspa CRON[22808]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:16:01 timberoakspetspa CRON[22818]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:17:01 timberoakspetspa CRON[22828]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
Oct 31 06:17:01 timberoakspetspa CRON[22829]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Oct 31 06:18:01 timberoakspetspa CRON[22839]: (mick) CMD (php "/var/www/timetrex/maint/cron.php" >> /dev/null 2>&1)
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

Unfortunately that doesn't give us anything to go on... I would recommend considering purchasing a support package so one of our support reps can connect to your server and diagnose the issue further.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

OK next trick I unzipped all the files again and set the timetrex.ini.php to installer_enabled = TRUE
Going to the installer screen it showed the url as:
http://timberoakspetspa/timetrex/interf ... nstaller=0

then froze blank no errors
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

Blank screen is a fatal PHP error, which should definitely appear in your logs. Most often caused by a permission or syntax problem in your timetrex.ini.php file.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

All I did was upgrade the OS Timetrex was already installed. But I did just notice it says it's running both Postgres server 8.4 and Postgres server 9.1. Could this be a conflict there?
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

Well I uninstalled 8.4 Changed the timetrex.ini.php to postgres9 and it is the same

The php_errors.log has these lines:

[02-Nov-2012 00:41:34 UTC] PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?

could not connect to server: Connection refused

Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432? in /var/www/timetrex/classes/adodb/drivers/adodb-postgres64.inc.php on line 697

[02-Nov-2012 00:41:34 UTC] PHP Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /var/www/timetrex/classes/modules/core/Debug.class.php on line 342

It looks like Postgresl 9.1 is listening on port 5433
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

[02-Nov-2012 01:45:55 UTC] PHP Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres" in /var/www/timetrex/classes/adodb/drivers/adodb-postgres64.inc.php on line 697

Obviously geting close

Too tired to do more tonight

I think I now need Postgres9 to point to my timetrex db and timetrex to use Postgres9

I love debugging and learning but I have payroll to meet Friday
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

Upgrading your OS is a major undertaking on the best of days, so it can take some time to get everything straightened out when you are done.

The fact that two versions of PostgreSQL were installed is definitely a source of problems, and using non-standard ports is another one. Typically TimeTrex shouldn't be connecting to PostgreSQL using the "postgres" user, but a "timetrex" user that you create instead. At least you are finding the log message though, so that will make it much easier to figure out.
MickG01
Posts: 144
Joined: Mon Nov 09, 2009 11:48 am

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by MickG01 »

OK I logged in to postgres in text mode (Well! it is a server, no gui) listing the databases does not show timetrex so I guess I should have uninstalled 9.1 not 8.4

Is there a way to impost the timetrex db in to this and do I change timetrex.php.ini to say postgres9 where it did say postgres8 ? I'm not a postgres expert at all though I do write SQL scripts at my work that's MS-SQL server. And it's only to check table contents for QA purposes read-only
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: Timetrex not responding on upgrade to Ubuntu Server 12.1

Post by shaunw »

You may want to research the proper procedure for upgrading the PostgreSQL database in Ubuntu. I do recall some cases where both versions (old and new) of PostgreSQL are left on the system and you often need to manually run a script to convert your database to the latest version before uninstalling the old version.
Locked