The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The service “postgresql” failed to start

Discussion in 'Database Discussions' started by Juan Remi, Jun 19, 2015.

  1. Juan Remi

    Juan Remi Registered

    Joined:
    Jun 19, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
    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.
    
    
     
    #1 Juan Remi, Jun 19, 2015
    Last edited by a moderator: Jun 19, 2015
  2. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Who is the owner of the lock file in /tmp ? Did you try removing the file and starting the service if that helped ?
     
  3. Juan Remi

    Juan Remi Registered

    Joined:
    Jun 19, 2015
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Mexico
    cPanel Access Level:
    Root Administrator
    i remove the file and postgresql start fine

    thanks
     
  4. 24x7ss

    24x7ss Well-Known Member

    Joined:
    Sep 30, 2014
    Messages:
    271
    Likes Received:
    16
    Trophy Points:
    18
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Thanks for the update and Glad to know that your issue gets fixed.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    653
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Thank you for updating us with the outcome. I'm happy to see it's now started well.
     
Loading...

Share This Page