database authenticate with LDAP service failed with error "psql: server closed the connection unexpectedly".
search cancel

database authenticate with LDAP service failed with error "psql: server closed the connection unexpectedly".

book

Article ID: 448199

calendar_today

Updated On:

Products

VMware Tanzu Data Suite

Issue/Introduction

When secure LDAP authentication in greenplum, sometimes the psql connection may hang for 1 min and then fail with error :

"psql: server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request."

 

Environment

greenplum v6.x

Cause

When use secure LDAP, one is startTLS, the other is SSL/TLS.  For startTLS, it requires pg_hba.conf setting :  "ldaptls=1 and ldapport=389". For SSL/TLS, it requires pg_hba.conf setting :  "ldapserver=ldaps://myldap.com".  These two kind of setting can not be used at the same time.  The default ldapport for SSL/TLS is 636.

If users chose  "ldaptls=1 and ldapport=636", it will cause database connection hang and error out after 1 min.

Resolution

use either "ldaptls=1 and ldapport=389", or "ldapserver=ldaps://myldap.com", avoid using the "ldaptls=1 and ldapport=636" in one entry.