service not starting

Ask your questions regarding TimeTrex installation here.
Locked
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

service not starting

Post 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?
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: service not starting

Post 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
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post 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"
Last edited by maverikh on Mon Jun 06, 2011 10:36 am, edited 1 time in total.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: service not starting

Post by shaunw »

The command must be run by the same user that installed TimeTrex originally. You can also try ./stop first just in case.
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post 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
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: service not starting

Post by shaunw »

You will need to consult the documentation on the Linux distribution that you are using.
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post 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..
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: service not starting

Post 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.
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post by maverikh »

fair enough
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post 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....
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Re: service not starting

Post 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.
maverikh
Posts: 7
Joined: Mon Jun 06, 2011 8:41 am

Re: service not starting

Post 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!
boochy
Posts: 1
Joined: Tue Apr 22, 2014 12:28 am

Re: service not starting

Post by boochy »

My timetrex can not start any more. It installed well but now its not starting
amiller030
Posts: 52
Joined: Sun Feb 23, 2014 2:50 pm
Contact:

Re: service not starting

Post by amiller030 »

What OS are you using? i.e. Windows, Mac, Linux
Adam Miller
TimeTrex Administrator - New Ulm Robotics
Locked