Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours
Дата
Msg-id 25d1ff9d-62dd-3124-d6f6-55615ed90d85@aklaver.com
обсуждение исходный текст
Ответ на PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours  (Antonis Christodoulou <christan305@hotmail.com>)
Ответы Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours  (Antonis Christodoulou <christan305@hotmail.com>)
Список pgsql-general
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




В списке pgsql-general по дате отправления:

Предыдущее
От: Antonis Christodoulou
Дата:
Сообщение: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours
Следующее
От: Antonis Christodoulou
Дата:
Сообщение: Re: PostgreSQL 12 service failing in Ubuntu 20.04 after a few hours