PostgreSQL Database Shutdown on Red Hat Satellite Capsule 6 Server Due to Lock File Creation Error
Issue
- PostgreSQL service is not able to start on the
Red Hat Satellite 6
server. - Why does the error message "Could not create lock file /var/run/postgresql/.s.PGSQL.5432.lock appear?
- How can you check the status and logs of the PostgreSQL service to investigate the cause of the failure?
-
systemctl status -l postgresql
gives the following message.FATAL: could not create lock file "/var/run/postgresql/.s.PGSQL.5432.lock": No such file or directory
-
New installation of
Red Hat satellite 6
failing on Postgres database setup with the below error.2022-04-12 13:47:28 [INFO ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: initdb: error: could not access directory "/var/opt/rh/rh-postgresql12/lib/pgsql/data": Permission denied 2022-04-12 13:47:28 [ERROR ] [configure] '/usr/bin/initdb --pgdata '/var/opt/rh/rh-postgresql12/lib/pgsql/data'' returned 1 instead of one of [0] 2022-04-12 13:47:28 [ERROR ] [configure] /Stage[main]/Postgresql::Server::Initdb/Exec[postgresql_initdb]/returns: change from 'notrun' to ['0'] failed: '/usr/bin/initdb --pgdata '/var/opt/rh/rh-postgresql12/lib/pgsql/data'' returned 1 instead of one of [0]
Environment
- Red Hat Satellite 6
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.