pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Couldn't start postgres, got no logging, ran postgres manually for info-- help?
4+ messages / 3 participants
[nested] [flat]

* Couldn't start postgres, got no logging, ran postgres manually for info-- help?
@ 2013-07-12 02:07  Wells Oliver <wellsoliver@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Wells Oliver @ 2013-07-12 02:07 UTC (permalink / raw)
  To: pgsql-admin

I ran:

pg_ctlcluster 9.1 main start

Received:

The PostgreSQL server failed to start. Please check the log output.

But, hey, in /var/log/postgresql, there was absolutely no logging. Nothing.
After some googling, I tried:

usr/lib/postgresql/9.1/bin/postgres -D /data/postgresql/9.1/main -c
config_file=/etc/postgresql/9.1/main/postgresql.conf

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Couldn't start postgres, got no logging, ran postgres manually for info-- help?
@ 2013-07-12 09:23  Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>
  parent: Wells Oliver <wellsoliver@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Giuseppe Broccolo @ 2013-07-12 09:23 UTC (permalink / raw)
  To: pgsql-admin

Hi Oliver,

Il 12/07/2013 04:07, Wells Oliver ha scritto:
> I ran:
>
> pg_ctlcluster 9.1 main start
>
> Received:
>
> The PostgreSQL server failed to start. Please check the log output.
>
> But, hey, in /var/log/postgresql, there was absolutely no logging. 
> Nothing. After some googling, I tried:
>
> usr/lib/postgresql/9.1/bin/postgres -D /data/postgresql/9.1/main -c 
> config_file=/etc/postgresql/9.1/main/postgresql.conf
>
> From the command line, which spit out to the terminal:
>
> 2013-07-12 02:04:05 GMT [30091]: [1-1] FATAL:  data directory 
> "/data/postgresql/9.1/main" has group or world access
>
> OK, so where the heck did this error message go when I was running 
> pg_ctlcluster? It would have saved me a lot of time.

By default pg_ctlcluster script redirects postmaster's stderr into 
/var/log/postgresql/postgresql-9.1-main.log.
This works only if log_destination is stderr and logging_collector is 
disabled, else the logs are stored where configured by log_destination, 
log_filename and log_directory in your postgresql.conf file.

Advice is to look into your postgresql.conf how (and if) logging is 
configured.

Regards,
Giuseppe.

-- 
Giuseppe Broccolo - 2ndQuadrant Italy
PostgreSQL Training, Services and Support
giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Couldn't start postgres, got no logging, ran postgres manually for info-- help?
@ 2013-07-12 17:29  Wells Oliver <wellsoliver@gmail.com>
  parent: Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>
  0 siblings, 1 reply; 4+ messages in thread

From: Wells Oliver @ 2013-07-12 17:29 UTC (permalink / raw)
  To: Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>; +Cc: pgsql-admin

Alright but what's odd to me is that it's a standard out of the box ubuntu configuration, meaning:

log_destination is 'stderr'
logging_collector is on
log_directory is /var/log/postgresql/
log_filename is postgresql-%Y-%m-%d_%H%M%S.log

When I ran pg_ctlcluster start, I only received "please check the log output", but there were no errors logged. There are definitely log items when the server was running normally.

When I ran postgres manually, I saw the permissions issue. My question then is where was this error sent when running pg_ctlcliuster, or why was it squashed? It would have been helpful to have that from the start.

--
Wells Oliver
wellsoliver@gmail.com




On Jul 12, 2013, at 2:23 AM, Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it> wrote:

> Hi Oliver,
> 
> Il 12/07/2013 04:07, Wells Oliver ha scritto:
>> I ran:
>> 
>> pg_ctlcluster 9.1 main start
>> 
>> Received:
>> 
>> The PostgreSQL server failed to start. Please check the log output.
>> 
>> But, hey, in /var/log/postgresql, there was absolutely no logging. Nothing. After some googling, I tried:
>> 
>> usr/lib/postgresql/9.1/bin/postgres -D /data/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf 
>> 
>> From the command line, which spit out to the terminal:
>> 
>> 2013-07-12 02:04:05 GMT [30091]: [1-1] FATAL:  data directory "/data/postgresql/9.1/main" has group or world access
>> 
>> OK, so where the heck did this error message go when I was running pg_ctlcluster? It would have saved me a lot of time.
> 
> By default pg_ctlcluster script redirects postmaster's stderr into /var/log/postgresql/postgresql-9.1-main.log.
> This works only if log_destination is stderr and logging_collector is disabled, else the logs are stored where configured by log_destination, log_filename and log_directory in your postgresql.conf file.
> Advice is to look into your postgresql.conf how (and if) logging is configured.
> 
> Regards,
> Giuseppe.
> -- 
> Giuseppe Broccolo - 2ndQuadrant Italy
> PostgreSQL Training, Services and Support
> giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it

^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: Couldn't start postgres, got no logging, ran postgres manually for info-- help?
@ 2013-07-12 18:14  Jerry Sievers <gsievers19@comcast.net>
  parent: Wells Oliver <wellsoliver@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Jerry Sievers @ 2013-07-12 18:14 UTC (permalink / raw)
  To: Wells Oliver <wellsoliver@gmail.com>; +Cc: Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>; pgsql-admin

Wells Oliver <wellsoliver@gmail.com> writes:

> Alright but what's odd to me is that it's a standard out of the box ubuntu configuration, meaning:
>
> log_destination is 'stderr'
> logging_collector is on
> log_directory is /var/log/postgresql/
> log_filename is postgresql-%Y-%m-%d_%H%M%S.log
>
> When I ran pg_ctlcluster start, I only received "please check the log output", but there were no errors logged. There
> are definitely log items when the server was running normally.
>
> When I ran postgres manually, I saw the permissions issue. My question then is where was this error sent when running
> pg_ctlcliuster, or why was it squashed? It would have been helpful to have that from the start.

Speculating here, but the bit about "please check the logs" is
probably generic to pg_ctl and an error such as bad $PGDATA perms
might be detected so early as to halt startup even before  something
like logging_collector is run and/or fully operational.

That is, there might be a few types of errors that will be reported on
/dev/tty or /dev/stderr in such a case and the "check logs" message is
misleading.

Consult your source code though for definitive answer :-)

> --
> Wells Oliver
> wellsoliver@gmail.com
>
> On Jul 12, 2013, at 2:23 AM, Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it> wrote:
>
>     Hi Oliver,
>    
>     Il 12/07/2013 04:07, Wells Oliver ha scritto:
>    
>         I ran:
>        
>         pg_ctlcluster 9.1 main start
>        
>         Received:
>        
>         The PostgreSQL server failed to start. Please check the log output.
>        
>         But, hey, in /var/log/postgresql, there was absolutely no logging. Nothing. After some googling, I tried:
>        
>         usr/lib/postgresql/9.1/bin/postgres -D /data/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/
>         postgresql.conf 
>        
>         From the command line, which spit out to the terminal:
>        
>         2013-07-12 02:04:05 GMT [30091]: [1-1] FATAL:  data directory "/data/postgresql/9.1/main" has group or world
>         access
>        
>         OK, so where the heck did this error message go when I was running pg_ctlcluster? It would have saved me a lot
>         of time.
>
>     By default pg_ctlcluster script redirects postmaster's stderr into /var/log/postgresql/postgresql-9.1-main.log.
>     This works only if log_destination is stderr and logging_collector is disabled, else the logs are stored where
>     configured by log_destination, log_filename and log_directory in your postgresql.conf file.
>    
>     Advice is to look into your postgresql.conf how (and if) logging is configured.
>    
>     Regards,
>     Giuseppe.
>    
>     -- 
>     Giuseppe Broccolo - 2ndQuadrant Italy
>     PostgreSQL Training, Services and Support
>     giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it
>

-- 
Jerry Sievers
Postgres DBA/Development Consulting
e: postgres.consulting@comcast.net
p: 312.241.7800


-- 
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2013-07-12 18:14 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-07-12 02:07 Couldn't start postgres, got no logging, ran postgres manually for info-- help? Wells Oliver <wellsoliver@gmail.com>
2013-07-12 09:23 ` Giuseppe Broccolo <giuseppe.broccolo@2ndquadrant.it>
2013-07-12 17:29   ` Wells Oliver <wellsoliver@gmail.com>
2013-07-12 18:14     ` Jerry Sievers <gsievers19@comcast.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox