gmbaxter
asked on
PostgreSQL failed to start
Hi,
I had an OpenNMS test install running with PostgreSQL until some PAT testers decided to pull the plug on it whilst it was running.
Unfortunately I cannot start my OpenNms install. This is because Postgresql will not start.
Doing: "service postgresql start" just brings up a "failed" message
Looking at my postgresql logs, i find the following;
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster PID (2904) running in data directory "/var/lib/pgsql/data"?
FATAL: bogus data in lock file "postmaster.pid": ""
What can i do to resolve this? I have forced an fsck fisk check at boot and rebooted, but the problem still remains.
Thanks.
I had an OpenNMS test install running with PostgreSQL until some PAT testers decided to pull the plug on it whilst it was running.
Unfortunately I cannot start my OpenNms install. This is because Postgresql will not start.
Doing: "service postgresql start" just brings up a "failed" message
Looking at my postgresql logs, i find the following;
FATAL: lock file "postmaster.pid" already exists
HINT: Is another postmaster PID (2904) running in data directory "/var/lib/pgsql/data"?
FATAL: bogus data in lock file "postmaster.pid": ""
What can i do to resolve this? I have forced an fsck fisk check at boot and rebooted, but the problem still remains.
Thanks.
Have you tried to delete postmaster.pid file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
errr.. spelled "postmaster.pid" incorrectly...
ASKER
No I haven't tried to delete the file. Is it an important file? What are the consequences if it doesn't recreate after being deleted?
This is just a file created each time a PostgreSQL server starts. By checking its existence the server knows if another instance is running already.
It is absolutely safe to delete it when the server is down.
It is absolutely safe to delete it when the server is down.
Pid files are often created by scripts by SA and developers to track the process id of certain programs... they are volatile as the next time the process starts it will very likely be given a new process ID.
if the postgresql service is stopped the PID is most definitely stale and therefore safe to delete.
if the postgresql service is stopped the PID is most definitely stale and therefore safe to delete.
ASKER
Thanks, this seems to have worked. Is there a GUI front end for postgresql so that I can easily schedule backups? similar to mysql gui tools ?
A standard tool for psql is pgAdmin III