Обсуждение: Problems With Bad PID and Missing Socket
I upgraded the distribution on my system and am now having problems opening a local application. /var/log/apache/error.log shows: Error: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? Compilation failed in require at /usr/local/sql-ledger/login.pl line 85. [Sat Nov 29 11:50:17 2008] [notice] caught SIGTERM, shutting down While I thought I had saved the solution message from the last time this happened, I did not do so. After stopping and restarting postgresql, there is no domain socket .s.PGSQL.5432 in /tmp. How do I get it back? Perhaps related to this, when I restart postgres I see: Starting PostgreSQL 19895 PostgreSQL daemon already running and I don't understand why the daemon is already running if I shut down the application. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
On Mon, 8 Dec 2008, Rich Shepard wrote: > I upgraded the distribution on my system and am now having problems > opening a local application. /var/log/apache/error.log shows: More insight. When I stop the postmaster I see this: [root@salmo ~]# /etc/rc.d/rc.postgresql stop Shutting down PostgreSQL... pg_ctl: invalid data in PID file "/var/lib/pgsql/data/postmaster.pid" It appears that I have several things to correct. This time, I promise to hold on to the messages so I can fix things up by myself the next time they occur. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Rich Shepard wrote: > On Mon, 8 Dec 2008, Rich Shepard wrote: > >> I upgraded the distribution on my system and am now having problems >> opening a local application. /var/log/apache/error.log shows: > > More insight. When I stop the postmaster I see this: > > [root@salmo ~]# /etc/rc.d/rc.postgresql stop Shutting down PostgreSQL... > pg_ctl: invalid data in PID file "/var/lib/pgsql/data/postmaster.pid" Wow. Is this Gentoo by chance? -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support
On Mon, 8 Dec 2008, Alvaro Herrera wrote: > Wow. Is this Gentoo by chance? Alvaro, Nope. It's Slackware-12.1, and not being at all gentle. I had this happen several years ago, but do not recall what fixed the bad PID file and socket. The thread had been saved here, but I must have inadvertenly deleted it. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
On Mon, 8 Dec 2008, Rich Shepard wrote: > I had this happen several years ago, but do not recall what fixed the bad > PID file and socket. The thread had been saved here, but I must have > inadvertenly deleted it. Figured out how to fix the problem, but still cannot get SQL-Ledger to load. Time to ask on that mail list. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
Rich Shepard wrote: > On Mon, 8 Dec 2008, Rich Shepard wrote: > > > I had this happen several years ago, but do not recall what fixed the bad > > PID file and socket. The thread had been saved here, but I must have > > inadvertenly deleted it. > > Figured out how to fix the problem, but still cannot get SQL-Ledger to > load. Time to ask on that mail list. > How did you fix it? (so its filed in the archive) klint. -- Klint Gore Database Manager Sheep CRC A.G.B.U. University of New England Armidale NSW 2350 Ph: 02 6773 3789 Fax: 02 6773 3266 EMail: kgore4@une.edu.au
On Tue, 9 Dec 2008, Klint Gore wrote: > How did you fix it? (so its filed in the archive) klint, I removed the 'stale' .pid file, then manually started the postmaster (su postgres -c 'postgres -D /var/lib/pgsql/data &') rather than using the Slackware startup script (/etc/rc.d/rc.postgresql). That command line is in the 'start' section of the script so I have no idea why it didn't work that way. Sigh. Still no access to localhost/sql-ledger/login.pl and that's critical for me. Rich -- Richard B. Shepard, Ph.D. | Integrity Credibility Applied Ecosystem Services, Inc. | Innovation <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863