The service “postgresql” failed to start

Juan Remi

Registered
Jun 19, 2015
4
0
1
Mexico
cPanel Access Level
Root Administrator
I install postgresql 7.4.x via:
/scripts/installpostgres

but when i try to start the service i get an error:
Code:
sudo service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [FAILED]
the next info is the install script:

Code:
/scripts/installpostgres
This script will install PostgreSQL 7.4.x or later
If you have an older version installed you wil need to
Dump your databases to a file and then restore them
after the install as 7.4.x is not backwards compatible.
If you do not have any databases, you can just run:
  mv /var/lib/pgsql /var/lib/pgsql.old
  /sbin/service postgresql stop
  /sbin/service postgresql start
to force creating a 7.4.x style setup.  Do not do this if
you have databases that you wish to keep!

Are you sure you wish to proceed? yes
Setting up Install Process
No package rh-postgresql available.
No package rh-postgresql-devel available.
No package rh-postgresql-libs available.
No package rh-postgresql-server available.
Resolving Dependencies
--> Running transaction check
---> Package postgresql.x86_64 0:8.4.20-2.el6_6 will be installed
---> Package postgresql-devel.x86_64 0:8.4.20-2.el6_6 will be installed
---> Package postgresql-libs.x86_64 0:8.4.20-2.el6_6 will be installed
---> Package postgresql-server.x86_64 0:8.4.20-2.el6_6 will be installed
--> Finished Dependency Resolution


Total download size: 7.0 M
Installed size: 32 M
Downloading Packages:
--------------------------------------------------------------------------------
Total                                            29 MB/s | 7.0 MB     00:00   
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4Complete!
  Installing : postgresql-libs-8.4.20-2.el6_6.x86_64                        1/4
info [installpostgres] Prelinking is disabled.

WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.
warn [installpostgres] Failed to reload PostgreSQL: “/usr/bin/pg_ctl” exited with signal “ZERO” and code “EPERM”.
info [installpostgres] Failed to _update_db_passwd for postgres: psql: FATAL:  Peer authentication failed for user "postgres"
,
warn [installpostgres] Failed to reload PostgreSQL: “/usr/bin/pg_ctl” exited with signal “ZERO” and code “EPERM”.
Configuration successfully updated
PostgreSQL users created


The PostgreSQL packages have been installed successfully. To configure,
navigate to WHM's Postgres Config feature where you can set your password
and enable PostgreSQL functionality for existing user accounts.

Setting random password for postgres database user
[email protected]myservername [~]# service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [FAILED]
[email protected] [~]# service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [FAILED]
[email protected] [~]# cat /var/lib/pgsql/pgstartup.log 
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
[email protected] [~]# sudo service postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [FAILED]
[email protected] [~]# cat /var/lib/pgsql/pgstartup.log 
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
FATAL:  could not open lock file "/tmp/.s.PGSQL.5432.lock": Permission denied
[email protected] [~]# /scripts/restartsrv postgresql
Waiting for “postgresql” to restart ……………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………………waiting for “postgresql” to initialize ………………………………
…finished.

The service “postgresql” failed to start with the message: postmaster is not running

postgresql has failed. Please contact your system administrator if the service does not automagically recover.
 
Last edited by a moderator: