Re: Upgradede -9.6.1 to -9.6.2; postmaster will not start

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Rich Shepard <rshepard(at)appl-ecosys(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Upgradede -9.6.1 to -9.6.2; postmaster will not start
Date: 2017-03-10 20:00:00
Message-ID: c0a24d7e-74e2-6edf-fd15-a09a6118b25c@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 03/10/2017 11:50 AM, Rich Shepard wrote:
> On Fri, 10 Mar 2017, Rich Shepard wrote:
>
>> Actually, it has the modifications I've made over the years. That's why I
>> could not see what changed.
>
> Well, postgres was running yesterday and allowed me to access my
> bookkeeping software so obviously something did change without my manually
> editing pg_hba.conf. Here are the log records:
>
> LOG: could not open secondary authentication file "@authcomment@" as
> "/var/lib/pgsql/9.6/data/authcomment@": No such file or directory
> LOG: could not open secondary authentication file
> "@remove-line-for-nolocal@" as
> "/var/lib/pgsql/9.6/data/remove-line-for-nolocal@": No such file or
> directory
> LOG: could not open secondary authentication file
> "@remove-line-for-nolocal(at)local" as
> "/var/lib/pgsql/9.6/data/remove-line-for-nolocal(at)local": No such file or
> directory
> LOG: could not open secondary authentication file "@authmethodlocal@" as
> "/var/lib/pgsql/9.6/data/authmethodlocal@": No such file or directory
> LOG: could not open secondary authentication file "@authmethodhost@" as
> "/var/lib/pgsql/9.6/data/authmethodhost@": No such file or directory
> LOG: could not open secondary authentication file
> "@remove-line-for-nolocal@" as
> "/var/lib/pgsql/9.6/data/remove-line-for-nolocal@": No such file or
> directory
> LOG: invalid connection type "all"
> CONTEXT: line 80 of configuration file
> "/var/lib/pgsql/9.6/data/pg_hba.conf"
> LOG: end-of-line before authentication method
> CONTEXT: line 86 of configuration file
> "/var/lib/pgsql/9.6/data/pg_hba.conf"
> FATAL: could not load pg_hba.conf
> LOG: database system is shut down
>
> Postgres runs on my desktop server/workstation and I'm the only user
> loggin in. Here's pg_hba.conf (restored from 2-22-2017 backup) which still
> does not work. I've read the pg_hba.conf section in the 9.6 docs without
> seeing what's wrong with my file.
>
> # PostgreSQL Client Authentication Configuration File
> # ===================================================
> # Put your actual configuration here
> # ----------------------------------
> @authcomment@
>
> # TYPE DATABASE USER ADDRESS METHOD
>
> @remove-line-for-nolocal(at)# "local" is for Unix domain socket connections
> only
> @remove-line-for-nolocal(at)local all
> all @authmethodlocal@
> # IPv4 local connections:
> local all rshepard trust
> host all rshepard 127.0.0.1/32 trust
> hostnossl all rshepard 127.0.0.1/32 trust
> # IPv6 local connections:
> host all all ::1/128
> @authmethodhost@
> # Allow replication connections from localhost, by a user with the
> # replication privilege.
> @remove-line-for-nolocal(at)#local replication
> @default_username@ @authmethodlocal@
> #host replication @default_username@
> 127.0.0.1/32 @authmethodhost@
> #host replication @default_username@
> ::1/128 @authmethodhost@
>
> What am I not seeing?

That this looks like a merge of the sample file:

https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/backend/libpq/pg_hba.conf.sample;h=6b1778a72136edf52cea56f2ab088b9449df9a48;hb=HEAD

with your additions.

Seems you have not restarted Postgres since the last time you had a
valid pg_hba.conf file. The above is not one. Remove the @***@ strings
and you should be good.

>
> Rich
>
>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Rich Shepard 2017-03-10 21:19:30 Re: Upgradede -9.6.1 to -9.6.2; postmaster will not start [FIXED]
Previous Message Tom Lane 2017-03-10 19:57:00 Re: Upgradede -9.6.1 to -9.6.2; postmaster will not start