Database Start Error on Installation...

Ask your questions regarding TimeTrex installation here.
Locked
toones
Posts: 26
Joined: Fri Oct 05, 2007 8:52 pm

Database Start Error on Installation...

Post by toones »

Google and I have been very tenacious at getting through the installation, but I have run into a problem I can't seem to work through.

I am trying to install Timetrex RC4 on a Centos machine. I am very, very new at Linux, so it has been a challenge.

I get to the point in the installation just after it is building the unistallation files, and I end up with this error:
Error running /opt/TimeTrex/restart : pg_ctl.bin: PID file "/opt/TimeTrex/postgresql/data/postmaster.pid" does not exist
Is server running?
(98)Address already in use: make_sock: could not bind to address [::]:8085
no listening sockets available, shutting down
Unable to open logs

After I click OK, it continues installing, getting through the requirements, then to the down for maintenance screen. I have had a few occasions where it get past the requirements, lets me input company data, etc, but then goes down for maintenance on reboot.

Obviously the database is not starting. The postgresql log reads ok, other than a lot of ERROR: relation "cron" does not exist

Also, my uninstallation has consisted of deleting the directory (/opt/Timetrex) and reinstalling. I don't know if that could be a problem.

Any and all help would be greatly appreciated.
shaunw
Posts: 7839
Joined: Tue Sep 19, 2006 2:22 pm

Post by shaunw »

In /opt/timetrex you will find a few scripts:

start
stop
restart

Before you uninstall, or reinstall its good to run "stop", and on boot, you will of course want to run: "start".

That should help you out.
toones
Posts: 26
Joined: Fri Oct 05, 2007 8:52 pm

Post by toones »

Thank you for your reply Shaun.

I tried as you suggested, Stop then Uninstall. When I stopped, I get httpd (no PID file) not running. If I try and start again I get the same error as above. When I uninstall, delete the directory, reboot, and reinstall, it works fine!! Then I put the company information in, etc, no problems. But when I reboot, I get the down for maintenance screen. If I do a stop at that point, I get I get httpd (no PID file) not running, and pg_ctl.bin: PID file "/opt.../postmaster.pid" does not exist. If I do a start, I get the same error as the previous start (above).

I am guessing here, but I think because I had not been previously uninstalling, just deleting, there may be a rogue copy of the postmaster or postgresql process somewhere. The database would work on new install, before reboot because the rogue process faulted and did not start last reboot. When the installation starts the process, it would work fine. But when the reboot occurs the rogue process starts, and conflicts with the latest install process. I did a PS -A but could find nothing that resembled any of them. If it has a cryptic name though, I could have missed it.

Any suggestions on cleaning this up? Is there a log file somewhere in Linux that shows process failures? If so, where might I find it?
toones
Posts: 26
Joined: Fri Oct 05, 2007 8:52 pm

Resolved - For the most part

Post by toones »

I was having a conflict, but it was not with PostgreSql, it was an Apache conflict. I had Apache (httpd) set to automatically start. This, apparently, started all of the PID at the wrong time (in relation to other processes). If I stop the httpd from automatically starting, and DO NOT start it specifically, but rather use the Start from within TimeTrex (thank you again Shaun) to start it and other things, everything works fine.

Now to get the Start from within Timetrex to execute on boot...

Update: for any newbies to Linux, like myself, I was able to get the start file to run at boot time by adding the following to my /etc/rc.d/rc.local file:
su <non root user> -c /opt/TimeTrex/start


Update2: Actually this works better: sudo -u <non root user> /opt/TimeTrex/start
You will have to comment '# Defaults requiretty' in /etc/sudoers for this to work
Locked