pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
weird fatal error starting postmaster
8+ messages / 3 participants
[nested] [flat]

* weird fatal error starting postmaster
@ 2000-01-05 18:28  Dana Hudes <dhudes@hudes.org>
  0 siblings, 2 replies; 8+ messages in thread

From: Dana Hudes @ 2000-01-05 18:28 UTC (permalink / raw)
  To: pgsql-admin

Upgraded to current postgres via the RPM packages.
postgresql-devel-6.5.3-1
postgresql-jdbc-6.5.3-1
postgresql-odbc-6.5.3-1
postgresql-perl-6.5.3-1
postgresql-python-6.5.3-1
postgresql-server-6.5.3-1
postgresql-6.5.3-1
postgresql-tcl-6.5.3-1
postgresql-test-6.5.3-1

I'm of course on RedHat Linux. Specifically v6.0 .Dual processor PII, running SMP kernel 2.2.5-22smp
I do (in inittab)
/bin/su - postgres -c "/usr/bin/postmaster -D/var/db" >>/var/log/postgres.log 2>&1 </dev/null

and postgres.log says:

IpcMemoryCreate: shmget failed (Identifier removed) key=5432010, size=120, permission=700
IpcMemoryIdGet: shmget failed (Identifier removed) key=5432010, size=120, permission=0
IpcMemoryAttach: shmat failed (Invalid argument) id=-2
FATAL 1:  AttachSLockMemory: could not attach segment

Hmm.  Could this somehow be that user postgres has no permission to create an IPC memory queue?
thought all users could...
thoughts and direction appreciated





^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 18:46  Karl DeBisschop <kdebisschop@range.infoplease.com>
  parent: Dana Hudes <dhudes@hudes.org>
  1 sibling, 0 replies; 8+ messages in thread

From: Karl DeBisschop @ 2000-01-05 18:46 UTC (permalink / raw)
  To: dhudes@hudes.org; +Cc: pgsql-admin


> IpcMemoryCreate: shmget failed (Identifier removed) key=5432010, size=120, permission=700
> IpcMemoryIdGet: shmget failed (Identifier removed) key=5432010, size=120, permission=0
> IpcMemoryAttach: shmat failed (Invalid argument) id=-2
> FATAL 1:  AttachSLockMemory: could not attach segment

Could this means that you still have a previous copy of postgres
running that already owns the IPC memory queue?

Karl DeBisschop



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 18:49  Lamar Owen <lamar.owen@wgcr.org>
  parent: Dana Hudes <dhudes@hudes.org>
  1 sibling, 2 replies; 8+ messages in thread

From: Lamar Owen @ 2000-01-05 18:49 UTC (permalink / raw)
  To: Dana Hudes <dhudes@hudes.org>; +Cc: pgsql-admin

Dana Hudes wrote:
> I'm of course on RedHat Linux. Specifically v6.0 .Dual processor PII, running SMP kernel 2.2.5-22smp
> I do (in inittab)
> /bin/su - postgres -c "/usr/bin/postmaster -D/var/db" >>/var/log/postgres.log 2>&1 </dev/null

Does postmaster start successfully if simply started -- not from
inittab? Also, on RedHat, the standard location of the database is
/var/lib/pgsql, not /var/db -- this could get you into trouble later if
you run into other problems.  This location should only be changed if
there is really GOOD reason to do so.

Run, as root, '/etc/rc.d/init.d/postgresql start' -- it'll initdb in
/var/lib/pgsql if there's no database there.  Then, attempt to connect,
and see what happens. Feel free to modify the
/etc/rc.d/init.d/postgresql script for logging purposes.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 19:20  Dana Hudes <dhudes@hudes.org>
  parent: Lamar Owen <lamar.owen@wgcr.org>
  1 sibling, 1 reply; 8+ messages in thread

From: Dana Hudes @ 2000-01-05 19:20 UTC (permalink / raw)
  To: Lamar Owen <lamar.owen@wgcr.org>; +Cc: pgsql-admin

thanks for the idea. It says there is another copy of pg running but I've rebooted the system
and the inittab entry is commented out. 

root@harmony log]# /etc/rc.d/init.d/postgresql status
postmaster (pid 565) is running...
[root@harmony log]# ps -l -p 565
 FLAGS   UID   PID  PPID PRI  NI   SIZE   RSS WCHAN       STA TTY TIME COMMAND
No processes available.
[root@harmony log]#


bizarre. I have this with other processes. For example there are two setiathome processes running
(1 per cpu). I know they're there 
[root@harmony log]# uptime
  3:18pm  up 1 day, 20:12,  2 users,  load average: 2.00, 2.00, 2.00
[root@harmony log]#

But I can't see them

[root@harmony log]# ps ax|grep seti
 3025  ?  S    0:00 grep seti

Weird.

----- Original Message ----- 
From: "Lamar Owen" <lamar.owen@wgcr.org>
To: "Dana Hudes" <dhudes@hudes.org>
Cc: <pgsql-admin@postgreSQL.org>
Sent: Wednesday, January 05, 2000 1:49 PM
Subject: Re: [ADMIN] weird fatal error starting postmaster


> Dana Hudes wrote:
> > I'm of course on RedHat Linux. Specifically v6.0 .Dual processor PII, running SMP kernel 2.2.5-22smp
> > I do (in inittab)
> > /bin/su - postgres -c "/usr/bin/postmaster -D/var/db" >>/var/log/postgres.log 2>&1 </dev/null
> 
> Does postmaster start successfully if simply started -- not from
> inittab? Also, on RedHat, the standard location of the database is
> /var/lib/pgsql, not /var/db -- this could get you into trouble later if
> you run into other problems.  This location should only be changed if
> there is really GOOD reason to do so.
> 
> Run, as root, '/etc/rc.d/init.d/postgresql start' -- it'll initdb in
> /var/lib/pgsql if there's no database there.  Then, attempt to connect,
> and see what happens. Feel free to modify the
> /etc/rc.d/init.d/postgresql script for logging purposes.
> 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 19:40  Karl DeBisschop <kdebisschop@range.infoplease.com>
  parent: Dana Hudes <dhudes@hudes.org>
  0 siblings, 0 replies; 8+ messages in thread

From: Karl DeBisschop @ 2000-01-05 19:40 UTC (permalink / raw)
  To: dhudes@hudes.org; +Cc: lamar.owen@wgcr.org; pgsql-admin


looks like the postmaster is being started by tyhe init script -
standard behavior for the RPMs, I think.  Can you be superuser?

If so, do `/etc/rc.d/init.d/postgresql stop`

I have no idea why your ps doesn't show up.  maybe try `ps -u
postgres`

Karl



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 19:54  Dana Hudes <dhudes@hudes.org>
  parent: Lamar Owen <lamar.owen@wgcr.org>
  1 sibling, 2 replies; 8+ messages in thread

From: Dana Hudes @ 2000-01-05 19:54 UTC (permalink / raw)
  To: Lamar Owen <lamar.owen@wgcr.org>; +Cc: pgsql-admin

Submitted for someone to tell me what the heck is going on....

[root@harmony log]# /etc/rc.d/init.d/postgresql stop
Stopping postgresql service:                               [  OK  ]
[root@harmony log]# /etc/rc.d/init.d/postgresql start
Checking postgresql installation: looks good!
Postmaster already running.
[root@harmony log]#

----- Original Message ----- 
From: "Lamar Owen" <lamar.owen@wgcr.org>
To: "Dana Hudes" <dhudes@hudes.org>
Cc: <pgsql-admin@postgreSQL.org>
Sent: Wednesday, January 05, 2000 1:49 PM
Subject: Re: [ADMIN] weird fatal error starting postmaster


> Dana Hudes wrote:
> > I'm of course on RedHat Linux. Specifically v6.0 .Dual processor PII, running SMP kernel 2.2.5-22smp
> > I do (in inittab)
> > /bin/su - postgres -c "/usr/bin/postmaster -D/var/db" >>/var/log/postgres.log 2>&1 </dev/null
> 
> Does postmaster start successfully if simply started -- not from
> inittab? Also, on RedHat, the standard location of the database is
> /var/lib/pgsql, not /var/db -- this could get you into trouble later if
> you run into other problems.  This location should only be changed if
> there is really GOOD reason to do so.
> 
> Run, as root, '/etc/rc.d/init.d/postgresql start' -- it'll initdb in
> /var/lib/pgsql if there's no database there.  Then, attempt to connect,
> and see what happens. Feel free to modify the
> /etc/rc.d/init.d/postgresql script for logging purposes.
> 
> --
> Lamar Owen
> WGCR Internet Radio
> 1 Peter 4:11




^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 20:11  Karl DeBisschop <kdebisschop@range.infoplease.com>
  parent: Dana Hudes <dhudes@hudes.org>
  1 sibling, 0 replies; 8+ messages in thread

From: Karl DeBisschop @ 2000-01-05 20:11 UTC (permalink / raw)
  To: dhudes@hudes.org; +Cc: lamar.owen@wgcr.org; pgsql-admin


seems like your ps is not standards redhat.  "ps -u postgres" works
fine for me on RH60 and RH61.  This could easily affect the way your
init script works - the functions us ps in part to get pid values.

I'd run the stop repeatedly until you always get a 'failed' trying to
stop the db.  Then run the start.

I've got a suspician that inittab may not ne synced and init is still
restarting the postmaster on you.  I'm not sure, but it may be worth
double or triple checking.

Good luck

Karl



^ permalink  raw  reply  [nested|flat] 8+ messages in thread

* Re: [ADMIN] weird fatal error starting postmaster
@ 2000-01-05 20:18  Lamar Owen <lamar.owen@wgcr.org>
  parent: Dana Hudes <dhudes@hudes.org>
  1 sibling, 0 replies; 8+ messages in thread

From: Lamar Owen @ 2000-01-05 20:18 UTC (permalink / raw)
  To: Dana Hudes <dhudes@hudes.org>; +Cc: pgsql-admin

Dana Hudes wrote:
> 
> Submitted for someone to tell me what the heck is going on....
> 
> [root@harmony log]# /etc/rc.d/init.d/postgresql stop
> Stopping postgresql service:                               [  OK  ]
> [root@harmony log]# /etc/rc.d/init.d/postgresql start
> Checking postgresql installation: looks good!
> Postmaster already running.

The error message 'Postmaster already running.' comes after a check for
a running postmaster using the RedHat initscript function 'pidof' --
which determines the pid of any running postmaster.  What processes does
a plain 'ps ax' show?

From your previous messages, it is plain that there is some other system
issue occuring that you need to troubleshoot before you'll be able to
get PostgreSQL running -- a ps ax|grep of known running processes should
work, otherwise you have something else going on.

By using 'ls -l /proc |grep postgres' -- you should be able to find any
running processes belonging to postgres.  Also, you can find out what
the initscript thinks by spawning a subshell, cd to /etc/rc.d/init.d,
and executing:
. functions
pidof postmaster
which will give you the pid of postmaster.  You can then kill it from
root.
You can get any process's status by using 'cat /proc/$pid/status', where
$pid is the pid you are wanting to query.  This is just in case someone
has rootkitted your ps.

I'm also assuming that you've told init to reload inittab (telinit Q) --
otherwise init is respawning postmaster faster than it can be killed.

--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11



^ permalink  raw  reply  [nested|flat] 8+ messages in thread


end of thread, other threads:[~2000-01-05 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-01-05 18:28 weird fatal error starting postmaster Dana Hudes <dhudes@hudes.org>
2000-01-05 18:46 ` Karl DeBisschop <kdebisschop@range.infoplease.com>
2000-01-05 18:49 ` Lamar Owen <lamar.owen@wgcr.org>
2000-01-05 19:20   ` Dana Hudes <dhudes@hudes.org>
2000-01-05 19:40     ` Karl DeBisschop <kdebisschop@range.infoplease.com>
2000-01-05 19:54   ` Dana Hudes <dhudes@hudes.org>
2000-01-05 20:11     ` Karl DeBisschop <kdebisschop@range.infoplease.com>
2000-01-05 20:18     ` Lamar Owen <lamar.owen@wgcr.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox