[postgres no lnger launches

Started by Alexander Reichstadtalmost 14 years ago5 messagesgeneral
Jump to latest

Hi,

how do I troubleshoot postgres? It simply won't start any more. I cannot login, not locally nor remotely. I tried a couple of things without success.

bash-3.2$ ps -Ac | egrep postgres
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ ps -Ac | egrep postgres

So sure enough that process claimed to might be starting does not end up being a process. Where do I look for what's actually going on?

This is the log output:
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: The PostgreSQL documentation contains more information about shared memory configuration.
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1[1260]) Exited with code: 1
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1) Throttling respawn: Will start in 10 seconds
04.06.12 00:26:30,000 kernel: nstat_lookup_entry failed: 2

It respawns every ten seconds and fails. Now this installation has been running for a few weeks now without a hiccup. I tried to enable remote login, I might have screwed up the pg_hba.conf file. So I copied the same file from an installation of another server I have on which things are running ok. I restarted but it continues to throw up those respawn messages and shared mem segmets stuff.

I changed the sysctl.conf file, but this neither made a difference. This unit has loads of memory....actually the messages seem to be rather bogus. Also, it worked fine, I didn't change the sysctl file before, it seems silly to assume that it just changes itself out of the blue and stops working. I installed nothing, there is no source I can assume to have done so. What can I do to make this server working again?

Thanks
Alex

In reply to: Alexander Reichstadt (#1)
Re: [postgres no lnger launches

Btw, this is OSX 10.7.

Am 04.06.2012 um 00:39 schrieb Alexander Reichstadt:

Show quoted text

Hi,

how do I troubleshoot postgres? It simply won't start any more. I cannot login, not locally nor remotely. I tried a couple of things without success.

bash-3.2$ ps -Ac | egrep postgres
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ ps -Ac | egrep postgres

So sure enough that process claimed to might be starting does not end up being a process. Where do I look for what's actually going on?

This is the log output:
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: The PostgreSQL documentation contains more information about shared memory configuration.
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1[1260]) Exited with code: 1
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1) Throttling respawn: Will start in 10 seconds
04.06.12 00:26:30,000 kernel: nstat_lookup_entry failed: 2

It respawns every ten seconds and fails. Now this installation has been running for a few weeks now without a hiccup. I tried to enable remote login, I might have screwed up the pg_hba.conf file. So I copied the same file from an installation of another server I have on which things are running ok. I restarted but it continues to throw up those respawn messages and shared mem segmets stuff.

I changed the sysctl.conf file, but this neither made a difference. This unit has loads of memory....actually the messages seem to be rather bogus. Also, it worked fine, I didn't change the sysctl file before, it seems silly to assume that it just changes itself out of the blue and stops working. I installed nothing, there is no source I can assume to have done so. What can I do to make this server working again?

Thanks
Alex

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alexander Reichstadt (#2)
Re: [postgres no lnger launches

Alexander Reichstadt <lxr@mac.com> writes:

So sure enough that process claimed to might be starting does not end up being a process. Where do I look for what's actually going on?

In the postmaster log ...

This is the log output:
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.

You seem to have trimmed off the useful part of this error message, but
I'm going to take a wild guess that what is happening is (a) you have
another postmaster running someplace, and (b) it is chewing up all the
allowed space for shared memory. If you have not mucked with OSX's
default shared-memory limits then there is only enough room to run one
postmaster at a time. The trouble with this theory is that the other
postmaster probably ought to be visible in ps output; I'm not sure why
it might not be. Anyway, try running "ipcs" to see if any SysV shared
memory or semaphores are active. If there are any, it's a pretty good
tip that there's a Postgres running somewhere.

regards, tom lane

In reply to: Alexander Reichstadt (#1)
[Solved] Re: [postgres no lnger launches

I found the issue, I changed the connection amount. I changed it back now.

Alex

Am 04.06.2012 um 00:39 schrieb Alexander Reichstadt:

Show quoted text

Hi,

how do I troubleshoot postgres? It simply won't start any more. I cannot login, not locally nor remotely. I tried a couple of things without success.

bash-3.2$ ps -Ac | egrep postgres
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ /Library/PostgreSQL/9.1/bin/pg_ctl start -D /Library/PostgreSQL/9.1/data -l postgres.log
pg_ctl: another server might be running; trying to start server anyway
server starting
bash-3.2$ ps -Ac | egrep postgres

So sure enough that process claimed to might be starting does not end up being a process. Where do I look for what's actually going on?

This is the log output:
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: The PostgreSQL documentation contains more information about shared memory configuration.
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1[1260]) Exited with code: 1
04.06.12 00:26:29,793 com.apple.launchd: (com.edb.launchd.postgresql-9.1) Throttling respawn: Will start in 10 seconds
04.06.12 00:26:30,000 kernel: nstat_lookup_entry failed: 2

It respawns every ten seconds and fails. Now this installation has been running for a few weeks now without a hiccup. I tried to enable remote login, I might have screwed up the pg_hba.conf file. So I copied the same file from an installation of another server I have on which things are running ok. I restarted but it continues to throw up those respawn messages and shared mem segmets stuff.

I changed the sysctl.conf file, but this neither made a difference. This unit has loads of memory....actually the messages seem to be rather bogus. Also, it worked fine, I didn't change the sysctl file before, it seems silly to assume that it just changes itself out of the blue and stops working. I installed nothing, there is no source I can assume to have done so. What can I do to make this server working again?

Thanks
Alex

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

In reply to: Tom Lane (#3)
Re: [postgres no lnger launches

Thanks, Tom, I messed it up myself, see my other post.

Am 04.06.2012 um 01:16 schrieb Tom Lane:

Show quoted text

Alexander Reichstadt <lxr@mac.com> writes:

So sure enough that process claimed to might be starting does not end up being a process. Where do I look for what's actually going on?

In the postmaster log ...

This is the log output:
04.06.12 00:26:29,792 com.edb.launchd.postgresql-9.1: If the request size is already small, it's possible that it is less than your kernel's SHMMIN parameter, in which case raising the request size or reconfiguring SHMMIN is called for.

You seem to have trimmed off the useful part of this error message, but
I'm going to take a wild guess that what is happening is (a) you have
another postmaster running someplace, and (b) it is chewing up all the
allowed space for shared memory. If you have not mucked with OSX's
default shared-memory limits then there is only enough room to run one
postmaster at a time. The trouble with this theory is that the other
postmaster probably ought to be visible in ps output; I'm not sure why
it might not be. Anyway, try running "ipcs" to see if any SysV shared
memory or semaphores are active. If there are any, it's a pretty good
tip that there's a Postgres running somewhere.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general