Page 1 of 1

New install on Linux fails after system reboot

Posted: Sun Sep 01, 2013 5:39 am
by rgreenlaw
I installed TimeTrex yesterday and everything seemed OK. My computer rebooted and now when I go to

http://localhost/TimeTrex/TimeTrex/timetrex

the web page adderess changes to

http://localhost/TimeTrex/TimeTrex/time ... face/flex/

then a box appears in the middle of the page "loading... 100%"

Next a box appears with "Processing..." displayed in it.

After pausing about 30 seconds Processing changes to "Network timeout"

TimeTrex version Community Edition 7.1.2

operating system Ubuntu Linux version 13.04

installed TimeTrex using the automated executable installer for Linux

Re: New install on Linux fails after system reboot

Posted: Sun Sep 01, 2013 2:19 pm
by shaunw
Did you setup the TimeTrex services to start upon each reboot automatically? If not you will need to do that.

Re: New install on Linux fails after system reboot

Posted: Sun Sep 01, 2013 6:53 pm
by rgreenlaw
I created a startup script:

Code: Select all

# TimeTrex
#
# Start TimeTrex time and attendance software

description  "Start TimeTrex time and attendance software"

start on runlevel [2345]
stop on runlevel [!2345]

exec /var/www/TimeTrex/TimeTrex/start
as an upstart process. Typing dmesg at the # prompt to view startup messages includes:

init: TimeTrex main process (1070) terminated with status 3

What else do I need to look for?

Thanks, Roger

Re: New install on Linux fails after system reboot

Posted: Tue Sep 03, 2013 9:33 am
by shaunw
If you run

Code: Select all

/var/www/TimeTrex/TimeTrex/start
manually from the command line, does it start?

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 12:33 pm
by rgreenlaw
Won't run when logged in as root.

Tried

Code: Select all

su -u roger /var/www/TimeTrex/TimeTrex/start
roger is my user name on the system.
This resulted in starting postgres, but still doesn't start TimeTrex.

Error message displayed on console

Code: Select all

(98)Address already in use: make_sock: could not bind to address [::]:8085
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8085
no listening sockets available, shutting down
Unable to open logs

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 1:03 pm
by rgreenlaw
Modified my init start procedure for TimeTrex to

Code: Select all

exec su -u roger /var/www/TimeTrex/TimeTrex/start
(roger is my user name on the system)
Upon rebooting the system TimeTrex still hangs with the same error in the browser. Checking startup messages with dmesg reports

Code: Select all

init: TimeTrex main process (1037) terminated with status 2
I hope this can be resolved so I can continue testing the software. We need to run a payroll in 2 weeks and are not looking forward to manually generating payroll.

Thanks

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 2:06 pm
by shaunw
(98)Address already in use: make_sock: could not bind to address [::]:8085
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8085
no listening sockets available, shutting down
The above seems like TimeTrex services are already running. Try running the stop script first, then starting it again.
Unable to open logs
The above seems like TimeTrex was installed as a user other than "roger" and therefore doesn't have permissions to write to files that it needs too. Please check to make sure all TimeTrex files/directories are owned and writable by the "roger" user.

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 3:47 pm
by rgreenlaw
I made the following changes:

useradd timetrex
chown -R timetrex /var/www/TimeTrex
created an upstart procedure that executes
sudo -u timetrex /var/www/TimeTrex/TimeTrex/start

dmesg no longer reports errors on startup
TimeTrex still does not run and still shows Network Timeout

manual stop and restart of TimeTrex using
sudo -u timetrex /var/www/TimeTrex/TimeTrex/stop
sudo -u timetrex /var/www/TimeTrex/TimeTrex/start

does not report any errors

TimeTrex still does not function

Am I missing something important?

Thanks, Roger

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 3:59 pm
by shaunw
Since you are using Ubuntu, you may want to consider installing TimeTrex from the manual .ZIP file instead of the automated installer, the automated installer is primarily designed for cases where using the default distribution packages isn't an option. That way you can use the Apache, PostgreSQL, PHP packages provided by Ubuntu rather than TimeTrex, also making use of the existing startup scripts provided by Ubuntu.

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 4:22 pm
by rgreenlaw
How would I go about uninstalling the currently installed package?

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 4:51 pm
by shaunw
Run the uninstall executable in the TimeTrex directory.

Re: New install on Linux fails after system reboot

Posted: Sun Sep 08, 2013 6:56 pm
by rgreenlaw
I removed the automatic linux install of TimeTrex, then downloaded the manual (zip) file.

I followed the intructions in the README.txt file.

PHP version 5.4.9
PostgreSQL 9.1.9
web root /var/www
TimeTrex directory /var/www/timetrex
renamed and edited timetrex.ini.php-example_linux to timetrex.ini.php
edited the paths in the timetrex.ini.php file
pointed browser to http://localhost/timetrex/interface/install/install.php

my webpage looks like this:

Code: Select all

assign('title', TTi18n::gettext($title = '1. License Acceptance')); // See index.php /* * Get FORM variables */ extract (FormVariables::GetVariables( array ( 'action', 'data', 'external_installer', ) ) ); $install_obj = new Install(); $action = Misc::findSubmitButton(); switch ($action) { case 'start': Debug::Text('Start', __FILE__, __LINE__, __METHOD__,10); if ( $data['license_accept'] == 1 ) { Redirect::Page( URLBuilder::getURL( array('external_installer' => $external_installer ), 'Requirements.php') ); } break; default: break; } $handle = @fopen('http://www.timetrex.com/'.URLBuilder::getURL( array('v' => $install_obj->getFullApplicationVersion() , 'page' => 'license' ), 'pre_install.php'), "r"); @fclose($handle); $smarty->assign_by_ref('install_obj', $install_obj); $smarty->assign_by_ref('external_installer', $external_installer); $smarty->display('install/License.tpl'); ?>
Where did I go wrong?

I know what the page should look like, but apparently uninstalling did something strange to my apache setup.

Can you help me get back on track?

Thanks,

Re: New install on Linux fails after system reboot

Posted: Mon Sep 09, 2013 7:56 am
by shaunw
The TimeTrex automated installer/uninstaller does not touch your default system Apache installation whatsoever, it installs its own copy of Apache (thats the whole point of the automated installer).

What you are seeing though is the PHP source code, which means PHP is not installed or running properly.