Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm using Vagrant with Chef Solo to setup a Lucid 64 box.

I'm using a Chef recipe to install PostgreSQL 9.1 from Martin Pitt's backports.

The install goes ok until the point where the database is started with

/etc/init.d/postgresql start

There's a log pause and the command fails.

If I run pg_ctl manually, the database starts!

The entire contents of my postgresql-9.1-main log file is:

2012-05-07 11:01:18 PDT LOG:  database system was shut down at 2012-05-07 11:01:16 PDT
2012-05-07 11:01:18 PDT LOG:  database system is ready to accept connections
2012-05-07 11:01:18 PDT LOG:  autovacuum launcher started
2012-05-07 11:01:18 PDT LOG:  incomplete startup packet
2012-05-07 11:01:26 PDT LOG:  received fast shutdown request
2012-05-07 11:01:26 PDT LOG:  aborting any active transactions
2012-05-07 11:01:26 PDT LOG:  autovacuum launcher shutting down
2012-05-07 11:01:26 PDT LOG:  shutting down
2012-05-07 11:01:26 PDT LOG:  database system is shut down

I've tried to change the postgresql config file to get more info into the logfile, but that hasn't worked at all.

How do I debug this to find out what is failing so I can fix it?

share|improve this question
1  
Without any hint from the log files it will be just about guessing. –  Khaled May 7 '12 at 19:56

1 Answer 1

Some things I would start with:

  • ensure that postgresql is not already running
  • check permisssions on /var/lib/postgresql/9.1/main

However I would advise starting postgresql using pg_ctlcluster. This script is called by the init script, and is a wrapper for pg_ctl which among other things performs several sanity checks. If those checks were to fail, they would prevent postgresql from starting.

pg_ctlcluster 9.1 main start
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.