1、jvm环境有小幅度升级过以为是环境问题
[root@emr-header-1 ~]# java -version
openjdk version "1.8.0_151"
OpenJDK Runtime Environment (build 1.8.0_151-b12)
OpenJDK 64-Bit Server VM (build 25.151-b12, mixed mode)
...
[root@emr-header-1 ~]# java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)
后面测试后发现应该不是jvm的问题
2、启动报错
后面疯狂找安装目录,才找到了log位置。
/var/lib/apacheds-2.0.0-M24/default/log/
看了下日志报错
[10:31:40] ERROR [org.apache.directory.server.wrapper.ApacheDsTanukiWrapper] - Failed to start the service.
java.lang.IllegalStateException: Conflict in selecting configuration source, both config.ldif and ou=config exist delete either one of them and restart the server
at org.apache.directory.server.config.ConfigPartitionInitializer.initConfigPartition(ConfigPartitionInitializer.java:113)
at org.apache.directory.server.ApacheDsService.initConfigPartition(ApacheDsService.java:335)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:187)
at org.apache.directory.server.ApacheDsService.start(ApacheDsService.java:153)
at org.apache.directory.server.wrapper.ApacheDsTanukiWrapper.start(ApacheDsTanukiWrapper.java:175)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788)
3、根据提示操作下
[root@emr-header-1 conf]# ls
config.ldif config.ldif_migrated log4j.properties ou=config ou=config.ldif wrapper-instance.conf
[root@emr-header-1 conf]# mv ou\=config config.ldif ou\=config.ldif /tmp/
[root@emr-header-1 conf]# ll
总用量 36
-rw-r--r-- 1 apacheds apacheds 28243 4月 8 2020 config.ldif_migrated
-rw-r--r-- 1 apacheds apacheds 2198 11月 2 2017 log4j.properties
-rw-r--r-- 1 apacheds apacheds 1429 11月 2 2017 wrapper-instance.conf
发现启动还是报错
[root@emr-header-1 conf]# systemctl start apacheds-2.0.0-M24-default
Job for apacheds-2.0.0-M24-default.service failed because the control process exited with error code. See "systemctl status apacheds-2.0.0-M24-default.service" and "journalctl -xe" for details.
但是看了下应该是已经启动了的
[root@emr-header-1 log]# netstat -nlp | grep '0.0.0.0:10389'
tcp 0 0 0.0.0.0:10389 0.0.0.0:* LISTEN 3601/java
[root@emr-header-1 log]# service apacheds-2.0.0-M24-default status
ApacheDS - default is running (3599).
最后看了下应该是正常了,pid文件也是在的,因为使用的是EMR,所以在控制台看了下也是正常了。
4、验证
最后尝试在EMR使用Knox登陆发现用户名密码还是登不上去。
看了下日志报错
[10:39:13] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
[10:39:27] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
[10:40:12] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
[10:41:10] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
[10:42:14] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
[10:43:25] ERROR [org.apache.directory.server.core.authn.AbstractAuthenticator] - ERR_6 Authentication error : ERR_268 Cannot find a partition for uid=xxx,ou=people,o=emr
可能是移除多了东西移回去先。
[root@emr-header-1 conf]# ls
config.ldif_migrated log4j.properties ou=config ou=config.ldif wrapper-instance.conf
[root@emr-header-1 conf]# mv /tmp/config.ldif .
[root@emr-header-1 conf]# ll
总用量 72
-rw-r--r-- 1 root root 28243 4月 8 2020 config.ldif
-rw-r--r-- 1 apacheds apacheds 28243 4月 8 2020 config.ldif_migrated
-rw-r--r-- 1 apacheds apacheds 2198 11月 2 2017 log4j.properties
drwxr-xr-x 3 apacheds apacheds 4096 3月 2 10:35 ou=config
-rw-r--r-- 1 apacheds apacheds 296 3月 2 10:35 ou=config.ldif
-rw-r--r-- 1 apacheds apacheds 1429 11月 2 2017 wrapper-instance.conf
[root@emr-header-1 conf]# ls
config.ldif config.ldif_migrated log4j.properties ou=config ou=config.ldif wrapper-instance.conf
再重新移除下ou=config。
[root@emr-header-1 conf]# mv ou\=config /tmp/
然后在EMR控制台重启了ApacheDS,然后通过Knox登陆发现已经正常了。