pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Antonis Christodoulou <christan305@hotmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours
Date: Sun, 1 Jan 2023 13:00:10 -0800
Message-ID: <25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com> (raw)
In-Reply-To: <VI1P193MB0510BD2D5A8FCE7B2A1BE073E1F69@VI1P193MB0510.EURP193.PROD.OUTLOOK.COM>
References: <VI1P193MB0510BD2D5A8FCE7B2A1BE073E1F69@VI1P193MB0510.EURP193.PROD.OUTLOOK.COM>

On 1/1/23 12:51, Antonis Christodoulou wrote:
> Hi,
> 
> I have set up PostgreSQL according to this link:
> 
> https://www.cherryservers.com/blog/how-to-install-and-setup-postgresql-server-on-ubuntu-20-04 <https://www.cherryservers.com/blog/how-to-install-and-setup-postgresql-server-on-ubuntu-20-04;
> 
> The issue is that after a few hours of operation, even if I don’t access 
> the database at all, the Postgres process fails:
> 
> *christan@vultr*:*~*$ systemctl status postgresql*
> *●*postgresql.service - PostgreSQL RDBMS
>       Loaded: loaded (/lib/systemd/system/postgresql.service; disabled; 
> vendor preset: enabled)
>       Active: *active (exited)*since Sat 2022-12-31 19:56:56 UTC; 24h ago
>      Process: 3330722 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
>     Main PID: 3330722 (code=exited, status=0/SUCCESS)
> 
> *●*postgresql@12-main.service <mailto:postgresql@12-main.service> - 
> PostgreSQL Cluster 12-main
>       Loaded: loaded (/lib/systemd/system/postgresql@.service; 
> enabled-runtime; vendor preset: enabled)
>       Active: *failed*(Result: exit-code) since Sat 2022-12-31 21:33:52 
> UTC; 23h ago
>      Process: 3330697 ExecStart=/usr/bin/pg_ctlcluster 
> --skip-systemctl-redirect 12-main start (code=exited, status=0/SUCCESS)
>      Process: 3341739 ExecStop=/usr/bin/pg_ctlcluster 
> --skip-systemctl-redirect -m fast 12-main stop *(code=exited, status=2)*
>     Main PID: 3330702 (code=exited, status=0/SUCCESS)
> 
> Moreover, it looks like there is some process stuck into some eternal 
> loop, eating up 4 cores:
> 
> *christan@vultr*:*~*$ ps -ef | grep postgres
> *postgres*3342383       1  0  2022 ?        00:00:00 FzXlkULu
> *postgres*3344758       1 99  2022 ?        3-14:39:11 OElid7Dp
> *postgres*3419125       1 18 13:57 ?        01:17:03 tracepath
> christan 3463982 3462489  0 20:44 pts/0    00:00:00 grep --color=auto 
> *postgres*

The above and the below look weird.

Is this machine open to the world?

> *
> *
> *christan@vultr*:*~*$ top -p 3344758
>      PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ 
> COMMAND
> 3344758 postgres  20   0 2443428   2.3g      4 S 282.3  29.5   5201:46 
> OElid7Dp
> 
> Doing just systemctl postgresql doesn’t restart the process, I have to 
> manually kill all the above processes then do systemctl restart.
> 
> Lastly, in the journalctl I see the following logs:
> 
> Dec 31 21:33:35 vultr.guest sudo[3340093]: *pam_unix(sudo:auth): 
> co**nversation failed*
> Dec 31 21:33:35 vultr.guest sudo[3340093]: *pam_unix(sudo:auth): auth 
> could not identify password for [postgres]*
> Dec 31 21:33:35 vultr.guest sudo[3340093]: *postgres : user NOT in 
> sudoers ; TTY=unknown ; PWD=/var/lib/postgresql/12/main ; USER=root ; 
> COMMAND=/usr/sbin/sysctl kernel.nmi_watchdog=0*
> Dec 31 21:33:52 vultr.guest crontab[3341582]: (postgres) LIST (postgres)
> Dec 31 21:33:52 vultr.guest crontab[3341584]: (postgres) REPLACE (postgres)
> Dec 31 21:33:52 vultr.guest crontab[3341585]: (postgres) LIST (postgres)
> Dec 31 21:33:52 vultr.guest crontab[3341588]: (postgres) LIST (postgres)
> 
> 
> What am I missing here, maybe I have to make sure that postgres user has 
> sudo rights?
> 
> Regards,
> Antonis
> 
> 

-- 
Adrian Klaver
adrian.klaver@aklaver.com






view thread (15+ messages)  latest in thread

Message-ID: <25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com>
Permalink:  ../25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com/
Also on:    postgresql.org/message-id/25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, christan305@hotmail.com
  Subject: Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours
  In-Reply-To: <25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com>
  References: <VI1P193MB0510BD2D5A8FCE7B2A1BE073E1F69@VI1P193MB0510.EURP193.PROD.OUTLOOK.COM> <25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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