System crashed: fatal error restarting postgres

Started by Rich Shepardover 9 years ago7 messagesgeneral
Jump to latest
#1Rich Shepard
rshepard@appl-ecosys.com

A java application threw a major error when closing and it crashed my
system (including wiping out most of /tmp). After rebooting I su'd to user
postgres and tried to start postgresql-9.5.4, but this error displays:

postgres@salmo:~$ FATAL: could not open shared memory segment
"/PostgreSQL.1804289383": Permission denied

Please advise me on how I proceed to clear this and restart the
application.

TIA,

Rich

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

#2Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Rich Shepard (#1)
Re: System crashed: fatal error restarting postgres

On 09/30/2016 01:15 PM, Rich Shepard wrote:

A java application threw a major error when closing and it crashed my
system (including wiping out most of /tmp). After rebooting I su'd to user
postgres and tried to start postgresql-9.5.4, but this error displays:

postgres@salmo:~$ FATAL: could not open shared memory segment
"/PostgreSQL.1804289383": Permission denied

Please advise me on how I proceed to clear this and restart the
application.

See here:

/messages/by-id/24208.1473724630@sss.pgh.pa.us

TIA,

Rich

--
Adrian Klaver
adrian.klaver@aklaver.com

--
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: Rich Shepard (#1)
Re: System crashed: fatal error restarting postgres

Rich Shepard <rshepard@appl-ecosys.com> writes:

A java application threw a major error when closing and it crashed my
system (including wiping out most of /tmp). After rebooting I su'd to user
postgres and tried to start postgresql-9.5.4, but this error displays:

postgres@salmo:~$ FATAL: could not open shared memory segment
"/PostgreSQL.1804289383": Permission denied

Wrong permissions on /dev/shm, perhaps? On Linux I believe it should
always be

drwxrwxrwt. 2 root root 160 Sep 30 15:23 /dev/shm/

Although TBH, the first question you should be asking yourself is why
you're running *any* java application with root privileges, which is
what I think would be needed to let this happen.

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

#4Adrian Klaver
adrian.klaver@aklaver.com
In reply to: Rich Shepard (#1)
Re: System crashed: fatal error restarting postgres

On 09/30/2016 01:15 PM, Rich Shepard wrote:

A java application threw a major error when closing and it crashed my
system (including wiping out most of /tmp). After rebooting I su'd to user
postgres and tried to start postgresql-9.5.4, but this error displays:

postgres@salmo:~$ FATAL: could not open shared memory segment
"/PostgreSQL.1804289383": Permission denied

Please advise me on how I proceed to clear this and restart the
application.

Actually more to the point:

/messages/by-id/alpine.LNX.2.11.1609121701270.1140@localhost

TIA,

Rich

--
Adrian Klaver
adrian.klaver@aklaver.com

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

#5Rich Shepard
rshepard@appl-ecosys.com
In reply to: Adrian Klaver (#2)
Re: System crashed: fatal error restarting postgres [FIXED]

On Fri, 30 Sep 2016, Adrian Klaver wrote:

See here:
/messages/by-id/24208.1473724630@sss.pgh.pa.us

Ah, shoot! I completely forgot about this. Yes, I reset the perms on
/dev/shm and that fixed the problem.

My apologies to all,

Rich

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

#6Rich Shepard
rshepard@appl-ecosys.com
In reply to: Tom Lane (#3)
Re: System crashed: fatal error restarting postgres

On Fri, 30 Sep 2016, Tom Lane wrote:

Wrong permissions on /dev/shm, perhaps?

Tom,

Yes. I keep forgetting about this since I don't reboot this
server/workstation often.

Thanks,

Rich

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

#7Tom Lane
tgl@sss.pgh.pa.us
In reply to: Rich Shepard (#6)
Re: System crashed: fatal error restarting postgres

Rich Shepard <rshepard@appl-ecosys.com> writes:

On Fri, 30 Sep 2016, Tom Lane wrote:

Wrong permissions on /dev/shm, perhaps?

Yes. I keep forgetting about this since I don't reboot this
server/workstation often.

You ought to do some investigation and figure out what is causing
it to come up with the wrong permissions in the first place; that
is certainly not normal Linux behavior.

Or at least stick a chmod into /etc/rc.d/rc.local, if you just
want to hit the problem over the head with a hammer.

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