pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Ted To <ted@theo.to>
To: pgsql-general@lists.postgresql.org
Subject: Re: Ident authentication failed
Date: Thu, 26 Mar 2020 13:24:05 -0700
Message-ID: <e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com> (raw)
In-Reply-To: <3d5c839c-3680-2dd5-01a6-94690e8a7907@theo.to>
References: <bbe31397-27f5-d787-7e8b-e333ada38451@theo.to>
	<39f295ba-2e91-6219-e802-26679e221862@gmail.com>
	<3d5c839c-3680-2dd5-01a6-94690e8a7907@theo.to>

On 3/26/20 12:40 PM, Ted To wrote:
> Thank you -- I added two lines to the hba file to allow for ident 
> authentication, restarted postgres and still the same errors.

Alright from here:

https://miniflux.app/docs/configuration.html
The Golang Postgres client pq is being used and:

"The default value for DATABASE_URL is user=postgres password=postgres 
dbname=miniflux2 sslmode=disable."

 From here:

https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters

"host - The host to connect to. Values that start with / are for unix
   domain sockets. (default is localhost)"

So unless you have specified a host in the conf file you need to be 
paying attention to the lines in pg_hba.conf that start with host.

Where the two lines you added above for host?

You can check what is happening on the server end by looking in the 
Postgres logs. That will also show you the connection string.


Do you have more then one instance of Postgres on the machine?

> 
> On 3/26/20 3:35 PM, Ron wrote:
>> You're only allowing "trust" authentication, not "ident" authentication.
>>
>> On 3/26/20 2:29 PM, Ted To wrote:
>>>
>>> Hi,
>>>
>>> I'm trying to configure miniflux and am struggling to figure out how 
>>> to configure postgres for that purpose.  (The miniflux instructions 
>>> are very terse.)  Regardless of whether I run the command as the 
>>> postgres user or the miniflux user, I get similar errors.  I am 
>>> running Centos 7 using the updated scl version of postgres (9.6.10).
>>>
>>> With the following, the postgres user "miniflux" along with the 
>>> password are specified in /etc/miniflux.conf.
>>>
>>> $ miniflux -c /etc/miniflux.conf -migrate
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "miniflux"
>>>
>>> I have no problems logging into postgres as the miniflux user using 
>>> the same password specified in /etc/miniflux.conf.
>>>
>>> Running the same command without specifying the configuration file 
>>> uses the postgres user and also fails
>>>
>>> $ miniflux -migrate
>>> [INFO] The default value for DATABASE_URL is used
>>> Current schema version: 0
>>> Latest schema version: 26
>>> Migrating to version: 1
>>> [FATAL] [Migrate] pq: Ident authentication failed for user "postgres"
>>>
>>> My /var/opt/rh/rh-postgresql96/lib/pgsql/data/pg_hba.conf file includes
>>>
>>> # TYPE  DATABASE        USER            ADDRESS METHOD
>>>
>>> local   miniflux   miniflux      trust
>>> local   miniflux   postgres      trust
>>>
>>> # "local" is for Unix domain socket connections only
>>> local   all             all peer
>>> # IPv4 local connections:
>>> host    all             all             127.0.0.1/32 trust
>>>
>>> I'm at a complete loss.
>>>
>>> Any suggestions?
>>>
>>> Thanks,
>>>
>>> Ted To
>>>
>>


-- 
Adrian Klaver
adrian.klaver@aklaver.com





view thread (14+ messages)  latest in thread

Message-ID: <e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com>
Permalink:  ../e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com/
Also on:    postgresql.org/message-id/e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ted@theo.to
  Subject: Re: Ident authentication failed
  In-Reply-To: <e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com>
  References: <bbe31397-27f5-d787-7e8b-e333ada38451@theo.to> <39f295ba-2e91-6219-e802-26679e221862@gmail.com> <3d5c839c-3680-2dd5-01a6-94690e8a7907@theo.to> <e5091d75-e79e-7121-9760-9e9c12fe2654@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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