WSO2 Identity Server错误启动,找不到admin

时间:2015-05-19 18:09:56

标签: ldap wso2 wso2is

首次启动WSO2 Identity Server会出现此错误:

  

"引起:org.wso2.carbon.user.core.UserStoreException:管理员用户   无法在主用户存储中创建。用户存储是只读的。   请选择主用户存储中存在的用户名   管理员用户"

<UserManager>
<Realm>
    <Configuration>
        <AddAdmin>false</AddAdmin>
        <AdminRole>admins</AdminRole>
        <AdminUser>
            <UserName>cn=Directory Manager</UserName>
            <Password>xxxxxxxx</Password>
        </AdminUser>
        <EveryOneRoleName>everyone</EveryOneRoleName> <!-- By default users in this role sees the registry root -->
        <Property name="dataSource">jdbc/WSO2CarbonDB</Property>
    </Configuration>


    <UserStoreManager class="org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager">
        <Property name="TenantManager">org.wso2.carbon.user.core.tenant.CommonHybridLDAPTenantManager</Property>
        <Property name="ConnectionURL">ldap://localhost:389</Property>
        <Property name="ConnectionName">cn=Directory Manager</Property>
        <Property name="ReadOnly">true</Property>
        <Property name="ConnectionPassword">oursecretpassword</Property>
        <Property name="passwordHashMethod">PLAIN_TEXT</Property>
        <Property name="UserNameListFilter">(objectClass=person)</Property>
        <Property name="UserEntryObjectClass">pccperson</Property>
        <Property name="UserSearchBase">ou=People,dc=pcc.edu,dc=cp</Property>
        <Property name="UserNameSearchFilter">(&amp;(objectClass=person)(uid=?))</Property>
        <Property name="UserNameAttribute">uid</Property>
        <Property name="PasswordJavaScriptRegEx">^[\S]{5,30}$</Property>
        <Property name="UsernameJavaScriptRegEx">^[\S]{3,30}$</Property>
        <Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
        <Property name="RolenameJavaScriptRegEx">^[\S]{3,30}$</Property>
        <Property name="RolenameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property>
        <Property name="ReadGroups">true</Property>
        <Property name="WriteGroups">false</Property>
        <Property name="EmptyRolesAllowed">true</Property>
        <Property name="GroupSearchBase">ou=Groups,dc=pcc,dc=edu</Property>
        <Property name="GroupNameListFilter">(objectClass=groupofuniquenames)</Property>
        <Property name="GroupEntryObjectClass">groupofuniquenames</Property>
        <Property name="GroupNameSearchFilter">(&amp;(objectClass=groupofuniquenames)(cn=?))</Property>
        <Property name="GroupNameAttribute">cn</Property>
        <Property name="MembershipAttribute">uniqueMember</Property>
        <Property name="UserRolesCacheEnabled">true</Property>
        <Property name="MaxRoleNameListLength">100</Property>
        <Property name="MaxUserNameListLength">100</Property>
        <Property name="SCIMEnabled">false</Property>
    </UserStoreManager>
  

TID:[0] [IS] [2015-05-22 11:35:10,888] INFO {org.wso2.carbon.user.core.common.DefaultRealmService} - 数据库已存在。没有创建新数据库。 {} org.wso2.carbon.user.core.common.DefaultRealmService   TID:[0] [IS] [2015-05-22 11:35:11,233] INFO {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} - 在只读模式下成功创建LDAP连接{org.wso2 .carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager}   TID:[0] [IS] [2015-05-22 11:35:11,841] ERROR {org.wso2.carbon.user.core.common.DefaultRealm} - 无法创建org.wso2.carbon.user.core.ldap .ReadOnlyLDAPUserStoreManager {org.wso2.carbon.user.core.common.DefaultRealm}   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)           在org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:329)           在org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:195)           在org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:104)           在org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:101)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:114)           在org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)           在org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl $ 1.run(BundleContextImpl.java:711)           at java.security.AccessController.doPrivileged(Native Method)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)           在org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)           在org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)           在org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)           在org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)           在org.eclipse.osgi.framework.eventmgr.EventManager $ EventThread.run(EventManager.java:340)   引起:org.wso2.carbon.user.core.UserStoreException:无法在主用户存储中创建管理员用户。用户存储是只读的。请选择主用户存储中存在的用户名作为管理员用户           在org.wso2.carbon.user.core.common.AbstractUserStoreManager.addInitialAdminData(AbstractUserStoreManager.java:3206)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:166)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:97)           ......还有27个   TID:[0] [IS] [2015-05-22 11:35:11,844] ERROR {org.wso2.carbon.user.core.common.DefaultRealmService} - 无法初始化领域。 {} org.wso2.carbon.user.core.common.DefaultRealmService   org.wso2.carbon.user.core.UserStoreException:nullType类java.lang.reflect.InvocationTargetException           在org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:370)           在org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:195)           在org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:104)           在org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:101)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:114)           在org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)           在org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl $ 1.run(BundleContextImpl.java:711)           at java.security.AccessController.doPrivileged(Native Method)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)           在org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)           在org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)           在org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)           在org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)           在org.eclipse.osgi.framework.eventmgr.EventManager $ EventThread.run(EventManager.java:340)   引起: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)           在org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:329)           ......还有22个   引起:org.wso2.carbon.user.core.UserStoreException:无法在主用户存储中创建管理员用户。用户存储是只读的。请选择主用户存储中存在的用户名作为管理员用户           在org.wso2.carbon.user.core.common.AbstractUserStoreManager.addInitialAdminData(AbstractUserStoreManager.java:3206)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:166)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:97)           ......还有27个   TID:[0] [IS] [2015-05-22 11:35:11,845] ERROR {org.wso2.carbon.user.core.internal.Activator} - 无法启动用户管理器核心软件包{org.wso2.carbon。 user.core.internal.Activator}   org.wso2.carbon.user.core.UserStoreException:无法初始化域。           在org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:231)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:101)           在org.wso2.carbon.user.core.common.DefaultRealmService。(DefaultRealmService.java:114)           在org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:69)           在org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl $ 1.run(BundleContextImpl.java:711)           at java.security.AccessController.doPrivileged(Native Method)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)           在org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)           在org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)           在org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)           在org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)           在org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)           在org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)           在org.eclipse.osgi.framework.eventmgr.EventManager $ EventThread.run(EventManager.java:340)   引起:org.wso2.carbon.user.core.UserStoreException:nullType类java.lang.reflect.InvocationTargetException           在org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:370)           在org.wso2.carbon.user.core.common.DefaultRealm.initializeObjects(DefaultRealm.java:195)           在org.wso2.carbon.user.core.common.DefaultRealm.init(DefaultRealm.java:104)           在org.wso2.carbon.user.core.common.DefaultRealmService.initializeRealm(DefaultRealmService.java:223)           ......还有19个   引起: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)           在org.wso2.carbon.user.core.common.DefaultRealm.createObjectWithOptions(DefaultRealm.java:329)           ......还有22个   引起:org.wso2.carbon.user.core.UserStoreException:无法在主用户存储中创建管理员用户。用户存储是只读的。请选择主用户存储中存在的用户名作为管理员用户           在org.wso2.carbon.user.core.common.AbstractUserStoreManager.addInitialAdminData(AbstractUserStoreManager.java:3206)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:166)           在org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager。(ReadOnlyLDAPUserStoreManager.java:97)           ......还有27个

我已尝试将AdminRole设置为'admins' and 'cn=admins'。同样的错误。

我没有从头开始设置LDAP服务器的经验,但我认为我正确安装了389-DS。

查看我的小组条目:

  

ldapsearch -b&#34; cn = Admins,ou = Groups,dc = pcc,dc = edu&#34; -D&#34; cn =目录   管理器&#34; -W cn = *输入LDAP密码:

     

dn:cn = admins,ou = Groups,dc = pcc,dc = edu objectClass:top objectClass:   groupofuniquenames uniqueMember:uid = jwhitene,ou = People,dc = pcc,dc = edu   cn:admins

2 个答案:

答案 0 :(得分:0)

我不确定您是否对连接到ReadOnly LDAP或读写感兴趣。

但请确保配置正确完成,并且您已按照文档中的步骤进行操作

[1] https://docs.wso2.com/display/IS500/Configuring+a+Read-only+LDAP+User+Store - 适用于只读LDAP用户存储

[2] https://docs.wso2.com/display/IS500/Configuring+a+Read-write+LDAP+User+Store-用于读/写LDAP用户存储

如果您已正确执行这些步骤,请使用用户存储的完整配置发布user-mgt.xml的配置,提及您想要连接哪种模式的用户存储,并且还请复制您从存储库/日志或服务器控制台中找到的wso2carbon.log文件中获得的服务器错误消息。

此致 沙尼

答案 1 :(得分:0)

在Ellucian的技术人员的帮助下,我的系统正常运行。 原因:我有一个旧版本的OpenLDAP使用了与user-mgt.xml文件中的默认值不匹配的不同模式。

而不是ObjectClass=groupofuniquenames我使用ObjectClass=posixGroup(与我的OpenLDAP架构匹配)配置了我的user-mgt.xml文件。我不得不在很多地方更改ObjectClass。在那之后,我的实例启动时没有任何问题。