Re: Login with LDAP authentication takes 5 seconds

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Login with LDAP authentication takes 5 seconds
Date: 2018-05-31 14:54:50
Message-ID: cd435c2d-ffa1-471b-8803-bd2bfbc29ee8@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 28/05/2018 17:26, Andreas Schmid wrote:
> Hi,
>
> I configured my PostgreSQL 10 DB on Debian 9.2 with LDAP authentication (simple bind mode). While this basically works, it has the strange effect that the first login with psql takes around 5
> seconds. When I reconnect within 60 seconds, the login completes immediately.
>
> The LDAP server is behind a firewall. So for a test, in pg_hba.conf I put the LDAP servers IP address instead of its DNS name (for parameter ldapserver). Like that, all logins complete immediately.
> But in general I prefer specifying the DNS name rather than the IP.
>
> When I checked on the DB machine with the following commands
> host my.ldap.server.org <http://my.ldap.server.org>
> dig my.ldap.server.org <http://my.ldap.server.org>
> both always returned the host name and IP address of the LDAP server immediately.
>
> Does anyone of you have an explanation for this, or a hint, where I could do some further investigation?
IPv4 vs IPv6 ? any strange timeouts? look in the postgresql logs for any messages.
Also definitely ran wireshark, it'll tell you a lot on what's happening between postgresql and your LDAP .
>
> Thanks,
> Andy
>

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Crawford 2018-05-31 15:25:32 Re: License Question
Previous Message Adrian Klaver 2018-05-31 14:33:32 Re: Insert UUID GEN 4 Value