openLDAP启动失败: TLS init def ctx failed: -1

slapd main: TLS init def ctx failed: -1
Failed to start OpenLDAP Server Daemon.
参考链接
通过命令检测过程

slapd -d 1
TLS: could not use certificate `OpenLDAP Server'.
TLS: error:02001002:system library:fopen:No such file or directory bss_file.c:402
TLS: error:20074002:BIO routines:FILE_CTRL:system lib bss_file.c:404
TLS: error:140AD002:SSL routines:SSL_CTX_use_certificate_file:system lib ssl_rsa.c:468
5db7dc03 main: TLS init def ctx failed: -1
5db7dc03 slapd destroy: freeing system resources.
5db7dc03 slapd stopped.
5db7dc03 connections_destroy: nothing to destroy.

网上一堆描述证书权限的,此处不再描述
重新创建证书 路径不存在则手动创建

mkdir -p /etc/openldap/certs
bash /usr/libexec/openldap/create-certdb.sh
bash /usr/libexec/openldap/generate-server-cert.sh 
Creating certificate database in'/etc/openldap/certs'.
Creating new server certificate in '/etc/openldap/certs'.

重装

yum reinstall openldap openldap-servers openldap-clients

你可能感兴趣的:(openLDAP启动失败: TLS init def ctx failed: -1)