Control Web Panel

WebPanel => PostgreSQL => Topic started by: gilliard on October 09, 2025, 01:38:25 PM

Title: Error starting postgres
Post by: gilliard on October 09, 2025, 01:38:25 PM
I have an error starting postgres 16, alma linux 8

Failed to start postgresql.service: Unit postgresql.service is masked.
Title: Re: Error starting postgres
Post by: overseer on October 09, 2025, 01:43:28 PM
Code: [Select]
systemctl is-masked postgresql.service
systemctl unmask postgresql.service
systemctl start postgresql.service
systemctl enable postgresql.service
Title: Re: Error starting postgres
Post by: gilliard on October 09, 2025, 05:55:01 PM
Not works


[root@cwp ~]# systemctl is-masked postgresql.service
Unknown operation is-masked.
[root@cwp ~]# systemctl unmask postgresql.service
[root@cwp ~]# systemctl start postgresql.service
Failed to start postgresql.service: Unit postgresql.service is masked.
[root@cwp ~]# systemctl enable postgresql.service
Failed to enable unit: Unit file /usr/lib/systemd/system/postgresql.service is masked.
[root@cwp ~]#
Title: Re: Error starting postgres
Post by: cyberspace on October 09, 2025, 06:07:11 PM
Show the output of:

Code: [Select]
ls -l /usr/lib/systemd/system/postgresql.service

cat /usr/lib/systemd/system/postgresql.service
Title: Re: Error starting postgres
Post by: gilliard on October 09, 2025, 09:11:27 PM
[root@cwp ~]# ls -l /usr/lib/systemd/system/postgresql.service
-rw-r--r-- 1 root root 0 Oct  9 13:25 /usr/lib/systemd/system/postgresql.service
[root@cwp ~]# ^C
[root@cwp ~]# cat /usr/lib/systemd/system/postgresql.service
[root@cwp ~]# cat /usr/lib/systemd/system/postgresql.service
[root@cwp ~]#
Title: Re: Error starting postgres
Post by: cyberspace on October 09, 2025, 09:28:21 PM
Check if the folder:
/usr/lib/systemd/system/
contains other files named like "postgre*.service".

If there is nothing then:
Code: [Select]
rm -f /usr/lib/systemd/system/postgresql.service
systemctl enable postgresql.service
systemctl start postgresql.service

In other case show us the list of other "postgre*.service" files.