Page 1 of 1

service not starting

Posted: Mon Jun 06, 2011 10:09 am
by maverikh
Heads up... Im a Ubuntu Linux newbie.\

I downloaded and installed the Timetrex standard and had everything setup nicely. We had a power failure and now timetrex gives error when you go to the inteface page.

TimeTrex is unable to connect to its database, please make sure that the database service on your TimeTrex server has been started and is running.

I installed it as a regular user. Did i do something wrong during installation possibly or do i need to do something more to make sure it runs all the time, even after power failure. If so, how do i do this? commands?

Re: service not starting

Posted: Mon Jun 06, 2011 10:17 am
by shaunw
The TimeTrex installer does not have permissions to activate itself when you reboot your server, so it has to be done manually unless you configure it to start automatically yourself.

You manually start the TimeTrex services by going into the TimeTrex directory and running:

./start

Re: service not starting

Posted: Mon Jun 06, 2011 10:33 am
by maverikh
the command works but i get another error.

""The server must be started as a underprivilesdged user id to prevent yadda yadda yadda.""
""postgresql could not be started"
"".../timetrex/apache2/scripts/ctl.sh : httpd already running"


i have the timetrex in the startup with "folder/folder/folder ./start"

Re: service not starting

Posted: Mon Jun 06, 2011 10:35 am
by shaunw
The command must be run by the same user that installed TimeTrex originally. You can also try ./stop first just in case.

Re: service not starting

Posted: Mon Jun 06, 2011 10:41 am
by maverikh
ok i see.

So how do i get it to start as the correct user without just logging in as the user... like start at server boot with correct user so the service runs without user interaction at the server...?

or is it something with postgresql

Re: service not starting

Posted: Mon Jun 06, 2011 10:45 am
by shaunw
You will need to consult the documentation on the Linux distribution that you are using.

Re: service not starting

Posted: Mon Jun 06, 2011 11:00 am
by maverikh
ok...

so timetrex installed its own postgresql and apache. in its folder.

i stopped the service.
then started again.

the httpd will start on 8085
the postgresql wont start and the error is just "unable to start postgresql"

that doesn't seem like a distribution problem to me..

Re: service not starting

Posted: Mon Jun 06, 2011 11:08 am
by shaunw
So how do i get it to start as the correct user without just logging in as the user... like start at server boot with correct user so the service runs without user interaction at the server...?

or is it something with postgresql
You asked how to start the services on boot as the correct user, which may be different for different distributions, which you need to consult your distributions documentation to find out.

If you are currently logged in as the correct user and its not starting manually, thats a different question.

Re: service not starting

Posted: Mon Jun 06, 2011 11:11 am
by maverikh
fair enough

Re: service not starting

Posted: Mon Jun 20, 2011 11:20 am
by maverikh
ok so i uninstalled it... and install the most current version. i added the start command to my bash.rc/rc.local

then i logged the boot up of the server... here's what i found in the log

./start
"root" execution of the PostgreSQL server is not permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromise. See the documentation for
more information on how to properly start the server.
/media/employees/brent/TimeTrex/postgresql/scripts/ctl.sh : postgresql could not be started
Syntax OK
/media/employees/brent/TimeTrex/apache2/scripts/ctl.sh : httpd (pid 5132) already running

--------the user listed above in the log is a standard user... just a standard user.

the timetrex webpage says the usual error
""TimeTrex is unable to connect to its database, please make sure that the database service on your TimeTrex server has been started and is running. """


could you please help me get this running right... we really like it but cant use it ever again if the server reboots becuase of updates.
I know i must be annoying with this but im new to linux and it wasnt my choice to use ubuntu.... i know its a startup thing but i cant find anyhting on the ubuntu help forum about starting it as a different user or why it thinks its root. i have been googling this all day so far....

Re: service not starting

Posted: Mon Jun 20, 2011 12:00 pm
by shaunw
Try changing the command in your rc.local file to something like this:

Code: Select all

su brent -c "/media/employees/brent/TimeTrex/start"
"su" will switch users to "brent" then run TimeTrex as that user, which should be the user who originally installed TimeTrex.

Re: service not starting

Posted: Mon Jun 20, 2011 12:18 pm
by maverikh
AWESOME!!!, thank you... that worked... now maybe my boss will pay for this and run his company on it... we are testing it right now. the admin guide you have is really good and has gotten through setting up almost everyhting... just had this one nagging issue.

Thank you!

Re: service not starting

Posted: Tue Apr 22, 2014 12:38 am
by boochy
My timetrex can not start any more. It installed well but now its not starting

Re: service not starting

Posted: Thu May 22, 2014 1:44 pm
by amiller030
What OS are you using? i.e. Windows, Mac, Linux