Issue with Error Message and 2020

General support regarding TimeTrex, such as
configuring policies/taxes or processing payroll.
MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Issue with Error Message and 2020

Post by MickG01 » Fri Jan 03, 2020 6:47 pm

I have TimeTrex Community on and Ubuntu Server 18.04. Recently it has not been creating new Pay Periods and every time it's started it shows the attached error.

I'm also interested if it updates its tables for the new year - 2020 or if not how do I update without losing my current data?
Attachments
ScreenshotPart from 2020-01-03 20-22-44.png
ScreenshotPart from 2020-01-03 20-22-44.png (9.35 KiB) Viewed 1168 times

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

Re: Issue with Error Message and 2020

Post by shaunw » Mon Jan 06, 2020 9:26 am

Has your server been turned off or had any changes made to it recently?

You will want to start with checking your CRON log to ensure that the TimeTrex maintenance job script is in fact being executed properly every minute.

If it is, then you would need to enable logging as per the following FAQ, then wait about 15 minutes and there should be detailed information in the log file as to what is occurring:
viewtopic.php?f=6&t=89

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Fri Jan 10, 2020 4:00 pm

syslog shows timetrex/maint/con.php running every minute.
but postgresql-10-main.log has a line at the end of each run: [unknown]@[unknown] LOG: incomplete startup packet

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

Re: Issue with Error Message and 2020

Post by shaunw » Fri Jan 10, 2020 5:42 pm

What output do you receive if you run the TimeTrex CRON command (without all the scheduler bits at the beginning) from the command line?

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Fri Jan 10, 2020 7:51 pm

trying to run it as root gives permission denied.

Meanwhile timetrex_cron_last_executed.log is 30-Apr-19 8:44 pm EDT

timetrex.log which is enormous 5011583560 has a few errors showing.

The last section of this file is attached.
Attachments
timetrex-copy.log
(10.51 KiB) Downloaded 5 times

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Fri Jan 10, 2020 8:21 pm

OK running the cron.php on command line does nothing - no output and opening timetrex still shows the error.

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

Re: Issue with Error Message and 2020

Post by shaunw » Sat Jan 11, 2020 11:09 am

It appears that your php.ini for PHP CLI (command line) is substantially different than your PHP used by your web browser, as shown by this error:

Code: Select all

DBError(0) Message: postgres8 error: [0: Missing extension for postgres] in CONNECT
That essentially means that when you run PHP from the command line it doesn't have the PostgreSQL extension enabled, therefore it can't connect to the database. That is just one extension of course, you need to make sure that your CLI PHP has all the same extensions enabled as your web browser does.

If you re-run the TimeTrex web-based installer, it will run all the system checks and would likely show you some additional errors too, and you should run that until it fully passes all tests. But either way you need to synchronize your php.ini file across your web browser and CLI instances of PHP.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Sat Jan 11, 2020 2:22 pm

being cautious this is on Ubuntu server and was installed from the .zip file. I have never used the TimeTrex web-based installer as the system doesn't have a web browser.

Also I note tthe error line you posted says postgres8 error. The current installed Postgres is Postgres V 10.10

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

Re: Issue with Error Message and 2020

Post by shaunw » Sat Jan 11, 2020 3:36 pm

The web installer can be accessed remotely from any other web browser without a problem, its designed to be run after you've extracted all the files from the .ZIP file. The main thing you want to do is get to the System Requirements step and confirm that everything passes, you don't need to go any further than that, but if you do it shouldn't cause any harm anyways.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Sat Jan 11, 2020 4:12 pm

All I found on your site is the .deb file for v 12.02

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Sun Jan 12, 2020 2:22 pm

Installed from .deb.
Tried connecting to '<IP>/Timetrex' and my old login appeared but login failed.
Tried rebooting the machine and it won't connect to the network though ifconfig looks good.
Postresql shows the same version number as before but I have to read up on how to use it to see ig my db is still there.
Since it updated to php 7.4 during the install I don't know how to check further yet.
I can ping its own IP but not any other IP on the network. The other machines can ping each other but not this server

All I wanted was to correct an annoying error message which had a workaround.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Sun Jan 12, 2020 3:34 pm

MickG01 wrote:
Sun Jan 12, 2020 2:22 pm
Installed from .deb.
Tried connecting to '<IP>/Timetrex' and my old login appeared but login failed.
Tried rebooting the machine and it won't connect to the network though ifconfig looks good.
Postresql shows the same version number as before but I have to read up on how to use it to see ig my db is still there.
Since it updated to php 7.4 during the install I don't know how to check further yet.
I can ping its own IP but not any other IP on the network. The other machines can ping each other but not this server

All I wanted was to correct an annoying error message which had a workaround.

Having fugured how to get into postgresql I can confirm my old timetrex db is present and apparently up to date. so all I'm missing is how to make the server reconnect to the LAN.

When I achieve that I'll try complete the installation.

Thanks

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Sun Jan 12, 2020 3:38 pm

]
Installed from .deb.
Tried connecting to '<IP>/Timetrex' and my old login appeared but login failed.
Tried rebooting the machine and it won't connect to the network though ifconfig looks good.
Postresql shows the same version number as before but I have to read up on how to use it to see if my db is still there.
Since it updated to php 7.4 during the install I don't know how to check further yet.
I can ping its own IP but not any other IP on the network. The other machines can ping each other but not this server

All I wanted was to correct an annoying error message which had a workaround.

Having figured how to get into PostgreSQL I can confirm my old timetrex db is present and apparently up to date. timetrex.ini.php seems to be unchanged so it would seem that all I'm missing is how to make the server reconnect to the LAN.

When I achieve that I'll try complete the installation.

Thanks

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

Re: Issue with Error Message and 2020

Post by shaunw » Mon Jan 13, 2020 9:37 am

The web installer is simply accessible from a URL, its the same no matter how you installed TimeTrex (.ZIP, .DEB, etc...), and is the 2nd phase of the installation process (the 1st is getting the files on the server, by extracting the .deb/.zip) that must always be run.

Its accessible with a URL similar to this:

Code: Select all

http://mydomain.com/timetrex/interface/install/install.php 

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Mon Jan 13, 2020 11:25 am

my issue now is, after running the .deb, that the server now says "network unavailable'" So I can;t ping it and it can't ping anything else on the LAN therefore connecting a browser to it is not possible.

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

Re: Issue with Error Message and 2020

Post by shaunw » Mon Jan 13, 2020 11:54 am

The TimeTrex .deb file doesn't do anything with the network settings in the operating system, so something else was likely changed to cause that problem.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Mon Jan 13, 2020 1:01 pm

OK got it connecting.
Install gives: Detailed Error Messages

PHP CLI Requirements Output:
----WARNING----WARNING----WARNING-----
--------------------------------------
Minimum PHP Requirements are NOT met!!
--------------------------------------
Failed Requirements: DatabaseType,SOAP,BCMATH,MBSTRING,GD,SIMPLEXML,CURL,ZIP
--------------------------------------
PHP INI: /etc/php/7.4/cli/php.ini
Process Owner: www-data
--------------------------------------


Failed Requirements: Require,DatabaseType,SOAP,BCMATH,MBSTRING,GD,SIMPLEXML,CURL,ZIP

And seems to have the timetrex.ini.php in a different place /usr/share/timetrex/html
It used to be in /var/www/html/timetrex/

and the salt has changed?

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

Re: Issue with Error Message and 2020

Post by shaunw » Mon Jan 13, 2020 3:29 pm

Yes, you have two installations of TimeTrex in two separate locations now, one from the .deb and one from the .zip file. You will need to decide which one you will continue with as the primary, disable the other one, then sync up the settings in the timetrex.ini.php files.

As for the failed requirements, those are mostly PHP extensions that aren't installed or enabled in /etc/php/7.4/cli/php.ini. It looks like you are using a non-standard PHP packages with Ubuntu, since Ubuntu 18.04 doesn't ship with PHP v7.4, so my guess is you are fighting with that somewhat here too.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Mon Jan 13, 2020 8:55 pm

You will need to decide which one you will continue with as the primary, disable the other one, then sync up the settings in the timetrex.ini.php files. - HOW?

The PHP 7.4 appeared after running the TimeTrex Deb file for the latest version?

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Tue Jan 14, 2020 11:40 am

One more {I hope} issue:
how to solve the attached?
Screenshot from 2020-01-14 13-38-41.png
Screenshot from 2020-01-14 13-38-41.png (96.23 KiB) Viewed 306 times

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

Re: Issue with Error Message and 2020

Post by shaunw » Tue Jan 14, 2020 5:54 pm

The "DatabaseType" failed requirement is the PostgreSQL (PGSQL) PHP extension not being enabled in /etc/php/7.4/cli/php.ini file. Essentially the same issue, your PHP CLI settings are not matching your PHP Apache settings.

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Thu Jan 16, 2020 2:56 pm

I renamed all php.ini for versions prior to 7.4 as php.ini.bak
i made copies if the three 7.4 php.ini to php.ini.bak
the /etc/php/7.4 files were
fpm/php.ini and apache2/php.ini identical
cli/php.ini different

since they were all backed up I tried bot files in all 3 folders and got exactly the same result as before.
attached here again. I note it says a newer version is available. I tried to download this but no email has arrived yet.
Screenshot from 2020-01-16 16-54-59.png
Screenshot from 2020-01-16 16-54-59.png (95.5 KiB) Viewed 172 times
[attachment=0]

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

Re: Issue with Error Message and 2020

Post by shaunw » Thu Jan 16, 2020 5:52 pm

Depending on your linux distribution or how your PHP is installed, it may not be a php.ini file at all, it may be handled in separate conf.d/*.ini files for each PHP extension. Since that is outside the scope of TimeTrex, you would be better off asking how to enable the PostgreSQL PHP extension for the CLI in a forum that handles your specific linux distribution.

However PHP v7.4 was just released in November 2019 and isn't standard on any Linux distribution that I'm aware of yet, so it appears you have some other customizations that are not helping the situation.

Just in case, our official installation instructions are here:
https://www.timetrex.com/how-to-install-timetrex

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Thu Jan 16, 2020 9:39 pm

I removed the Db installed version and installed the latest .zip version in the same place as my previous (Which I renamed as a backup until this is solved.

Tomorrow is my day for payroll. I didn;t expect this to take a week.

Now I get these errors:
Screenshot from 2020-01-16 23-37-03.png
Screenshot from 2020-01-16 23-37-03.png (100.2 KiB) Viewed 149 times
going to the detailed php informaton it refers to /etc/php/7.2 though this screen refers correctly to 7.4
I assume these failures are fairly easy to overcome?
Failed Requirements:
Require,DatabaseType,
Why is the php.ini include path ""

MickG01
Posts: 130
Joined: Mon Nov 09, 2009 11:48 am

Re: Issue with Error Message and 2020

Post by MickG01 » Thu Jan 16, 2020 9:48 pm

Here's the detailed php information:
Screenshot from 2020-01-16 23-45-01.png
Screenshot from 2020-01-16 23-45-01.png (215.22 KiB) Viewed 149 times

Post Reply