Обсуждение: Error

Поиск
Список
Период
Сортировка

Error

От
Rajesh Kumar
Дата:
Hi all,

I am receiving the following error in postgres log:

FATAL,57P01,"terminating connection due to administrator command"...


From application side, they are getting following error:

Psqlexception: FATAL,: terminating connection due to administrator command.


How to resolve this?

Re: Error

От
"David G. Johnston"
Дата:
On Sun, Nov 5, 2023 at 8:00 AM Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
Hi all,

I am receiving the following error in postgres log:

FATAL,57P01,"terminating connection due to administrator command"...


From application side, they are getting following error:

Psqlexception: FATAL,: terminating connection due to administrator command.


How to resolve this?


Tell your administrator not to terminate connections.

David J.

Re: Error

От
Rajesh Kumar
Дата:
I am the admin with less than a year and exp.....I am not terminating any connections ..

Is it because of vacuuming?

On Sun, 5 Nov 2023, 21:07 David G. Johnston, <david.g.johnston@gmail.com> wrote:
On Sun, Nov 5, 2023 at 8:00 AM Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
Hi all,

I am receiving the following error in postgres log:

FATAL,57P01,"terminating connection due to administrator command"...


From application side, they are getting following error:

Psqlexception: FATAL,: terminating connection due to administrator command.


How to resolve this?


Tell your administrator not to terminate connections.

David J.

Re: Error

От
Holger Jakobs
Дата:
Am 05.11.23 um 16:46 schrieb Rajesh Kumar:
I am the admin with less than a year and exp.....I am not terminating any connections ..

Is it because of vacuuming?

On Sun, 5 Nov 2023, 21:07 David G. Johnston, <david.g.johnston@gmail.com> wrote:
On Sun, Nov 5, 2023 at 8:00 AM Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
Hi all,

I am receiving the following error in postgres log:

FATAL,57P01,"terminating connection due to administrator command"...


From application side, they are getting following error:

Psqlexception: FATAL,: terminating connection due to administrator command.


How to resolve this?


Tell your administrator not to terminate connections.

David J.

No, some application has called pg_terminate_backend() function or the server was shut down.

see https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL

-- 
Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012
Вложения

Re: Error

От
Tom Lane
Дата:
Holger Jakobs <holger@jakobs.com> writes:
> Am 05.11.23 um 16:46 schrieb Rajesh Kumar:
>> Is it because of vacuuming?

> No, some application has called pg_terminate_backend() function or the
> server was shut down.
> see
> https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL

Concretely, this indicates that something sent the server process
a SIGTERM signal.  At least within Postgres, that can only come
from pg_terminate_backend() or the postmaster sending it because
it was sent a SIGINT signal to do a fast shutdown.

So, if you weren't doing this intentionally, you need to look
for an external source of those signals.

A common newbie mistake that could lead to this is launching the
postmaster by hand, or in a shell script, in a way that doesn't
dissociate it from your terminal session.  In that case typing
control-C or ending the session would deliver one of these
signals.  Make sure your postmaster start script (a) uses nohup
and (b) redirects all three of postmaster's stdin, stdout, and
stderr away from the terminal.

Could be something else too, but in the end you've got something
signaling the server that you don't want.

            regards, tom lane



Re: Error

От
Jeff Janes
Дата:
On Sun, Nov 5, 2023 at 10:00 AM Rajesh Kumar <rajeshkumar.dba09@gmail.com> wrote:
Hi all,

I am receiving the following error in postgres log:

FATAL,57P01,"terminating connection due to administrator command"...

Surely there is more stuff in the log file than that.  Maybe you could expand the scope of what you quote.  And include timestamps.
 
How to resolve this?


There has recently been a spate of hacking attacks where the hackers shutdown the server after starting up their payload. I'm not sure why, as that will surely draw attention to themselves.  Maybe it is to keep out competing gangs of hackers, or maybe their payoff is now extortion (rather than cryptomining which was very popular in the past) and so they want to draw attention to themselves (although evidently they would be failing at it, as you don't seem to know about their attempt yet, just its effect on uptime).  Look for new tables containing ransom notices as their contents.

Anyway, make sure you aren't being sloppy about security.  Change your passwords, especially for PostgreSQL superuser accounts, make those new passwords actually be good ones.  Better yet, also prohibit non-local superuser connections in the first place.

Cheers,

Jeff