Thread: Postmaster refuses to start
Hi, I've been using Postgresql 7.3.2 -5 mdk successfully until a major power outage that had forced my box to reboot (under voltage conditions) unsuccessfully twice. As a result, now when I try to access my db, I get: psql: could not connect to server: Connection refused Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? error message. Reading the archives, it was suggested to delete /tmp/.s.PGSQL.5432, but it doesn't exist! Running ps -ef, obviously there are no PID for the db connection that refuses to connect. I uninstalled the whole mess, and re-installed Postgresql, but I now cannot createdb since I get the same error message. Are there hidden file(s) to look for and delete? My config: pg_hba.conf set to 'local all trust' postmaster.pid and postmaster .opts -- both empty I'm at a total loss of what to do, or where to look --- any ideas? Tia, Andre
Andre Dubuc <aajdubuc@webhart.net> writes: > I've been using Postgresql 7.3.2 -5 mdk successfully until a major power > outage that had forced my box to reboot (under voltage conditions) > unsuccessfully twice. As a result, now when I try to access my db, I get: > psql: could not connect to server: Connection refused > Is the server running locally and accepting > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? This says that the postmaster isn't running, but it's not clear *why* it's not running. Do you have an init script installed that's supposed to auto-start the postmaster? Or do you need to start the postmaster by hand, and forgot to? If you do have an init script, then you need to look in the postmaster's log file (stderr output file or syslog, depending on how you have things configured) to see whatever error message it put out about why it couldn't start. Or you could try starting the postmaster by hand to see what it says. regards, tom lane
On Sunday 16 November 2003 01:42 pm, you wrote: > Andre Dubuc <aajdubuc@webhart.net> writes: > > I've been using Postgresql 7.3.2 -5 mdk successfully until a major power > > outage that had forced my box to reboot (under voltage conditions) > > unsuccessfully twice. As a result, now when I try to access my db, I get: > > > > psql: could not connect to server: Connection refused > > Is the server running locally and accepting > > connections on Unix domain socket "/tmp/.s.PGSQL.5432"? > > This says that the postmaster isn't running, but it's not clear *why* > it's not running. Do you have an init script installed that's supposed > to auto-start the postmaster? Or do you need to start the postmaster by > hand, and forgot to? > > If you do have an init script, then you need to look in the postmaster's > log file (stderr output file or syslog, depending on how you have things > configured) to see whatever error message it put out about why it > couldn't start. Or you could try starting the postmaster by hand to see > what it says. > > regards, tom lane Thanks Tom, I'm using the init script that came with the Linux-Manrake distro -- written by L. Owen. I checked the logs: syslog -- "localhost postgresql: Starting postgresql service: failure" /var/log/postgresql -- empty /var/lib/pgsql/postmaster.pid -- empty Hand-started postgresql: "postmaster -D /var/lib/pgsql/data FATAL: Bogus data in lock file /var/lib/pgsql/data/postmaster.pid" Same message I got earlier. So what can I do about this mess? I'm stumped . . . Tia, Andre
Andre Dubuc <aajdubuc@webhart.net> writes: > Hand-started postgresql: > "postmaster -D /var/lib/pgsql/data > FATAL: Bogus data in lock file /var/lib/pgsql/data/postmaster.pid" > Same message I got earlier. So what can I do about this mess? I'm stumped . . Since you know that the old postmaster ain't there anymore, it's safe to just remove the indicated lock file. Then everything should be peachy... regards, tom lane
On Sunday 16 November 2003 02:32 pm, Tom Lane wrote: > Andre Dubuc <aajdubuc@webhart.net> writes: > > Hand-started postgresql: > > "postmaster -D /var/lib/pgsql/data > > FATAL: Bogus data in lock file /var/lib/pgsql/data/postmaster.pid" > > > > Same message I got earlier. So what can I do about this mess? I'm stumped > > . . > > Since you know that the old postmaster ain't there anymore, it's safe to > just remove the indicated lock file. Then everything should be > peachy... > > regards, tom lane Hi Tom, Well ain't that the cat's meow! I did that earlier (before I trashed the db and re-installed postgresql) and nothing happened. . . . sigh! Now: LOG: database system was interrupted at 2003-11-15 07:22:45 EST LOG: checkpoint record is at 0/14E7F80 LOG: redo record is at 0/14E7F80; undo record is at 0/0; shutdown TRUE LOG: next transaction id: 20462; next oid: 58755 LOG: database system was not properly shut down; automatic recovery in progress LOG: ReadRecord: record with zero length at 0/14E7FC0 LOG: redo is not required LOG: database system is ready Life ain't fair no how! Now, all I have to do is to restore the dump file -- another learning experience! Thanks again. Andre
On Sunday 16 November 2003 02:32 pm, Tom Lane wrote: > Andre Dubuc <aajdubuc@webhart.net> writes: > > Hand-started postgresql: > > "postmaster -D /var/lib/pgsql/data > > FATAL: Bogus data in lock file /var/lib/pgsql/data/postmaster.pid" > > > > Same message I got earlier. So what can I do about this mess? I'm stumped > > . . > > Since you know that the old postmaster ain't there anymore, it's safe to > just remove the indicated lock file. Then everything should be > peachy... > > regards, tom lane Thanks Tom, I did that before I trashed the db and re-installed postgresql with no results. This time it worked. Life ain't fair, I tell ya! Now all I have to do is restore the dump file I had created just before things got messed up. Another learning experience -- hope it works! Regards, Andre