GLPRDB001E Error code -1 from function SQLConnect

GLPRDB001E Error code -1 from function:” SQLConnect ” ldapdb2b, message appears during startup of LDAP server.

Customer reported this error message and when I was checking the startup logs or tried starting the LDAP server, logs were clearly showing the Database was not started properly.

[root@<hostname> sbin]# ./ibmslapd
DB2SET processing complete, rc = 1309, SQLCODE = 0
GLPSRV041I Server starting.
GLPCTL113I Largest core file size creation limit for the process (in bytes): ‘0’(Soft limit) and ‘-1′(Hard limit).
GLPCTL119I Maximum Data Segment(Kbytes) soft ulimit for the process is -1 and the prescribed minimum is 262144.
…..
…..

GLPSRV200I Initializing primary database and its connections.
GLPRDB001E Error code -1 from function:” SQLConnect ” ldapdb2b .
GLPSRV064E Failed to initialize be_config.
GLPSRV040E Server starting in configuration only mode due to errors.

…..

GLPSRV180I Pass-through authentication is disabled.
GLPCOM003I Non-SSL port initialized to 389.

 

Though customer was able see the status as started, but ideally there was problem with the Database start & Stop.

Resolution

As I stated in my earlier blog entry, please check if the database instance is setup properly as environment variable and also access control should be proper so that LDAP server can start without any problems.