Full_Name: Piero Astolfi Version: openldap-2.4.44 OS: CentOS Linux release 7.1.1503 (Core) URL: ftp://ftp.openldap.org/incoming/ Submission from: (NULL) (151.1.178.237)
I compiled openldap-2.4.44 enabling the sql backend and configured slapd.conf accordingly, however slapd fails to start.
It seems that only the first character of the database parameters are used. After changing the username and the password in my DB to a single character I can successfully connect to the DB but every sql query fails.
As you can see in my /var/lib/mysql/server_audit.log the query "SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings" results in the single character "S", the same happens to the username "ldap_user" that results in the single character "l".
Do you have any suggestions on how to proceed?
# cat /usr/local/etc/openldap/slapd.conf [...] database sql dbname ldap_dbname dbuser ldap_user dbpasswd ldap_password
# /usr/local/libexec/slapd -d Any -f /usr/local/etc/openldap/slapd.conf [...] 57581a99 ==>backsql_get_db_conn() 57581a99 ==>backsql_open_db_handle() 57581a9%3<==backsql_open_db_handle() 57581a99 <==backsql_get_db_conn() 57581a99 ==>backsql_load_schema_map() 57581a99 backsql_load_schema_map(): oc_query "SELECT id,name,keytbl,keycol,create_proc,delete_proc,expect_return FROM ldap_oc_mappings" 57581a99 backsql_load_schema_map(): error executing oc_query: 57581a99 Return code: -1 57581a99 nativeErrCode=1064 SQLengineState=��� msg="" 57581a99 backsql_db_open(): schema mapping failed, exiting 57581a99 backend_startup_one (type=sql, suffix="dc=addrbook,dc=clr"): bi_db_open failed! (1) 57581a99 slapd shutdown: initiated 57581a99 ==>backsql_db_close() 57581a99 <==backsql_db_close() 57581a99 slapd destroy: freeing system resources. 57581a99 ==>backsql_close_db_handle(0x20445f0) 57581a99 <==backsql_close_db_handle(0x20445f0) 57581a99 ==>backsql_db_destroy() 57581a99 ==>backsql_free_db_env() 57581a99 <==backsql_free_db_env() 57581a99 ==>destroy_schema_map() 57581a99 <==destroy_schema_map() 57581a99 <==backsql_db_destroy() 57581a99 slapd stopped.
# tail -f /var/lib/mysql/server_audit.log 20160608 15:58:08,cleared_hostname,l,localhost,688,0,CONNECT,,,0 20160608 15:58:08,cleared_hostname,l,localhost,688,3786,QUERY,,'SET NAMES utf8',0 20160608 15:58:08,cleared_hostname,l,localhost,688,3787,QUERY,,'SET character_set_results = NULL',0 20160608 15:58:08,cleared_hostname,l,localhost,688,3788,QUERY,,'SET SQL_AUTO_IS_NULL = 0',0 20160608 15:58:08,cleared_hostname,l,localhost,688,3789,QUERY,,'SET AUTOCOMMIT=0',0 20160608 15:58:08,cleared_hostname,l,localhost,688,3790,QUERY,,'set @@sql_select_limit=DEFAULT',0 20160608 15:58:08,cleared_hostname,l,localhost,688,3791,QUERY,,'S',1064 <<<<<<<< RIGHT HERE <<<<<<<< 20160608 15:58:08,cleared_hostname,l,localhost,68873792,QUERY,,'ROLLBACK',0 20160608 15:58:08,cleared_hostname,l,localhost,688,0,DISCONNECT,,,0