Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxh9b-00021Q-BB for pgsql-admin@arkaria.postgresql.org; Fri, 12 Jul 2013 17:29:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Uxh9a-0001Eo-Po for pgsql-admin@arkaria.postgresql.org; Fri, 12 Jul 2013 17:29:10 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxh9Y-0001Cc-Gl for pgsql-admin@postgresql.org; Fri, 12 Jul 2013 17:29:08 +0000 Received: from mail-pd0-x232.google.com ([2607:f8b0:400e:c02::232]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Uxh9U-0004Fv-Mh for pgsql-admin@postgresql.org; Fri, 12 Jul 2013 17:29:07 +0000 Received: by mail-pd0-f178.google.com with SMTP id w11so8822230pde.37 for ; Fri, 12 Jul 2013 10:29:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to:x-mailer; bh=cP7xTbBUu3IqrrD/zOQawE4xNGBsBHspY+G46DwXXu0=; b=hY/r9M500VaiJtKfvvVxb6FYzpmUVFhpiJt6GEmGUktxeN30YfJgNBV6CzetBxcN6X lE+OIDF6MqXEJyrBeYXqE/FrFhon8dvVIGOktRMIuWcyxQsKRfoPhFlyH2OQH9kbT9c0 TqwMTaKeXb7faXjaX35ncao2djKF9KXnqEgxPWeGa9EZJJHjVSPaqis52GV96mt2mb8G 84qT4ydN5w9Z2QHrRe497mmWo+BpYd/2ZDvElvkYO/fIfG0zoJYE+5gvvnCpGDc3vekP BdoBWAGEVpyw/2xMxvn8qNyRovUUKNcyqWy6U/66i1GYZkzWl5PVNA2Zu1g7lGO63olt neXA== X-Received: by 10.68.236.130 with SMTP id uu2mr43207052pbc.87.1373650143373; Fri, 12 Jul 2013 10:29:03 -0700 (PDT) Received: from [192.168.1.102] (ip68-8-28-231.sd.sd.cox.net. [68.8.28.231]) by mx.google.com with ESMTPSA id qu10sm46421999pbb.12.2013.07.12.10.29.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Jul 2013 10:29:01 -0700 (PDT) Content-Type: multipart/alternative; boundary="Apple-Mail=_C570C93B-5428-41D9-9CAB-BF047271941F" Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) Subject: Re: Couldn't start postgres, got no logging, ran postgres manually for info-- help? From: Wells Oliver In-Reply-To: <51DFCB17.5050905@2ndquadrant.it> Date: Fri, 12 Jul 2013 10:29:00 -0700 Cc: pgsql-admin@postgresql.org Message-Id: <58263C4A-0786-4FA1-9AA3-C176A9C0ED35@gmail.com> References: <51DFCB17.5050905@2ndquadrant.it> To: Giuseppe Broccolo X-Mailer: Apple Mail (2.1508) X-Pg-Spam-Score: 0.7 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail=_C570C93B-5428-41D9-9CAB-BF047271941F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 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 = wrote: > Hi Oliver, >=20 > Il 12/07/2013 04:07, Wells Oliver ha scritto: >> I ran: >>=20 >> pg_ctlcluster 9.1 main start >>=20 >> Received: >>=20 >> The PostgreSQL server failed to start. Please check the log output. >>=20 >> But, hey, in /var/log/postgresql, there was absolutely no logging. = Nothing. After some googling, I tried: >>=20 >> usr/lib/postgresql/9.1/bin/postgres -D /data/postgresql/9.1/main -c = config_file=3D/etc/postgresql/9.1/main/postgresql.conf=20 >>=20 >> =46rom the command line, which spit out to the terminal: >>=20 >> 2013-07-12 02:04:05 GMT [30091]: [1-1] FATAL: data directory = "/data/postgresql/9.1/main" has group or world access >>=20 >> 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. >=20 > 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. >=20 > Regards, > Giuseppe. > --=20 > Giuseppe Broccolo - 2ndQuadrant Italy > PostgreSQL Training, Services and Support > giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it --Apple-Mail=_C570C93B-5428-41D9-9CAB-BF047271941F Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=iso-8859-1 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

--Apple-Mail=_C570C93B-5428-41D9-9CAB-BF047271941F--