由于LDAP配置并不简单,我想尝试连接,如果可能的话列出用户或其他东西。
我将辅助用户存储设置为ReadOnlyLDAPUserStoreManager和设置,但我无法从LDAP登录任何用户(它实际上是AD服务器)。
我检查了日志(TRACE级别),但一无所获。
另外 - 想一想 - 我是否必须做一些事情来启用二级用户存储或告诉WSO2IS实际使用它还是自动的?只是想知道缺少日志的原因是由它引起的,它与LDAP设置无关。
编辑:创建AD用户存储后,此异常将写入日志:
[2014-12-08 15:10:57,535] ERROR - Cannot create org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager {org.wso2.carbon.user.core.common.AbstractUserStoreManager}
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.createSecondaryUserStoreManager(AbstractUserStoreManager.java:3478)
at org.wso2.carbon.user.core.common.AbstractUserStoreManager.addSecondaryUserStoreManager(AbstractUserStoreManager.java:3534)
at org.wso2.carbon.user.core.common.UserStoreDeploymentManager.deploy(UserStoreDeploymentManager.java:74)
at org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer.deploy(UserStoreConfigurationDeployer.java:58)
at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:79)
at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:124)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at org.wso2.carbon.user.core.ldap.LDAPConnectionContext.<init>(LDAPConnectionContext.java:87)
at org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager.<init>(ReadOnlyLDAPUserStoreManager.java:150)
at org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager.<init>(ReadWriteLDAPUserStoreManager.java:102)
at org.wso2.carbon.user.core.ldap.ActiveDirectoryUserStoreManager.<init>(ActiveDirectoryUserStoreManager.java:85)
... 25 more
[2014-12-08 15:10:57,551] INFO - org.apache.axis2.deployment.DeploymentException: The deployment of apibp.xml is not valid. {org.apache.axis2.deployment.DeploymentEngine}
答案 0 :(得分:1)
如果您已正确配置LDAP用户界面,则可以看到以下日志
[2014-12-08 14:32:56,160] INFO {org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager} - LDAP connection created successfully in read-write mode
[2014-12-08 14:32:56,162] INFO {org.wso2.carbon.user.core.common.UserStoreDeploymentManager} - Realm configuration of tenant:-1234 modified with /home/abimaran/support-issues/MINISTRYIEPROD/wso2is-4.6.0/repository/deployment/server/userstores/WSO2_TEST.xml
而且,如果您无法从身份服务器连接LDAP,则日志中会有一些例外。
答案 1 :(得分:1)
请仔细检查您的配置。您可以参考此链接cannot login to wso2 Identity server with the ldap credentials。它可能会帮助你