naeron84
naeron84

Reputation: 3025

WSO 2 Identity Server LDAP settings do not work

Since LDAP configuration is not trivial I would like to try connection and if possible list users or something.

I set the secondary user store as ReadOnlyLDAPUserStoreManager and the settings but I cannot login with any user from LDAP (it is actually an AD server).

I checked the logs (TRACE level) but found nothing.

Also - jut a thought - do I have to do something to enable secondary user store or tell WSO2IS to actually use it or is it automatic? Just wondering that the reason for lack of logs is caused by this and it has nothing to do with LDAP settings.

EDIT: After creating the AD user store this exception gets written into the log:

[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}

Upvotes: 2

Views: 3094

Answers (2)

Jamsheer
Jamsheer

Reputation: 3753

Please double check your configuration .You can refer this link cannot login to wso2 Identity server with the ldap credentials. It may help you

Upvotes: 1

Abimaran Kugathasan
Abimaran Kugathasan

Reputation: 32488

If you have correctly configured a LDAP userstore, you could be able to see following logs

[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

And, if you can't connect LDAP from Identity server, you will have some exception in the logs.

Upvotes: 1

Related Questions