The service postgresql failed to start
I install postgresql 7.4.x via:
/scripts/installpostgres
but when i try to start the service i get an error:
the next info is the install script:
sudo service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [FAILED]
the next info is the install script:
/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
root@myservername [~]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [FAILED]
root@myservername [~]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [FAILED]
root@myservername [~]# 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
root@myservername [~]# sudo service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [FAILED]
root@myservername [~]# 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
root@myservername [~]# /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.
-
Hello, Who is the owner of the lock file in /tmp ? Did you try removing the file and starting the service if that helped ? 0 -
i remove the file and postgresql start fine thanks 0 -
Thanks for the update and Glad to know that your issue gets fixed. 0 -
New i remove the file and postgresql start fine
Hello :) Thank you for updating us with the outcome. I'm happy to see it's now started well.0
Please sign in to leave a comment.
Comments
4 comments