CPM postgresql daemon doesn't start and CLI is not available

book

Article ID: 167813

calendar_today

Updated On:

Products

CPM XOS

Issue/Introduction

If the postgresql daemon will not start, the CLI is not available and therefore the user is unable to access the XOS CLI.

While reviewing the messages file, you may see the log entries similar to the following:
 
psql: could not connect to server: No such file or directory 
Is the server running locally and accepting 
connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 
createdb: could not connect to database postgres: could not connect to server: No such file or directory 
Is the server running locally and accepting 
connections on Unix domain socket "/tmp/.s.PGSQL.5432"? 

When attempting to start the postgresql daemon you may see a log line similar to the following:

"logger shutting down"


 
 

Cause

The above messages may be an indication that Postgres transaction log is corrupt.  

Other known reasons why Postgres fails to start include:
  • no available disk space
  • incorrect permissions of /tmp directory (expected permissions can be restored with Unix command "chmod 1777 /tmp; chown root:root /tmp")

The Postgres start up log /cbconfig/conf/var/lib/pgsql/pgstartup.log should be checked when Postgres fails to start.

 

Resolution

To reset Postgres transaction log, perform the following procedure:
  1. Verify that Postgres is stopped:
     [[email protected] data]# service postgresql stop
 
  1. Log in as postgres user:
     [[email protected] admin]# su - postgres
     -bash-3.2$
  1. Reset the transaction log:
     -bash-3.2$ pg_resetxlog -f /var/lib/pgsql/data/
     Transaction log reset
     -bash-3.2$ 
  1. Log out postgres user:
     -bash-3.2$ exit
     logout
  1. Start postgresql:
    [[email protected] data]# service postgresql start
    Starting postgresql service: [  OK  ]
    [[email protected] data]# 

You should now be able to access the XOS CLI again.


 

Workaround

N/A