2015-08-18 49 views
0

預打包的Identity Server無法掛載_SYSTEM /配置在registry.xml規定:WSO2 IS(預包裝)的密鑰管理API-M錯誤

<mount path="/_system/config" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/config</targetPath> 
</mount> 

配置和初始啓動後(SH wso2server -Dsetup)我得到:

ERROR {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Unable to create fixed remote mounts. {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} 
org.wso2.carbon.registry.core.exceptions.ResourceNotFoundException: Resource does not exist at path /_system/governance 

然後我配置的API-M,啓動後,成功地創建這兩個坐騎。

重啓動IS,並得到:

INFO {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} - Connected to mount at govregistry in 2ms {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} 
ERROR {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Unable to create fixed remote mounts. {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} 
org.wso2.carbon.registry.core.exceptions.RegistryException: An exception occurred while executing handler chain. null 
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.delete(HandlerManager.java:2649) 
    at org.wso2.carbon.registry.core.jdbc.handlers.UserDefinedHandlerManager.delete(UserDefinedHandlerManager.java:215) 
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.delete(HandlerLifecycleManager.java:452) 
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.delete(EmbeddedRegistry.java:843) 
    at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.delete(CacheBackedRegistry.java:512) 
    at org.wso2.carbon.registry.core.session.UserRegistry.deleteInternal(UserRegistry.java:870) 
    at org.wso2.carbon.registry.core.session.UserRegistry.access$1100(UserRegistry.java:60) 
    at org.wso2.carbon.registry.core.session.UserRegistry$12.run(UserRegistry.java:845) 
    at org.wso2.carbon.registry.core.session.UserRegistry$12.run(UserRegistry.java:842) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.wso2.carbon.registry.core.session.UserRegistry.delete(UserRegistry.java:842) 
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:343) 
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:572) 
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:117) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:606) 
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:260) 
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146) 
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:347) 
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620) 
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197) 
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:343) 
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:222) 
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107) 
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861) 
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) 
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) 
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819) 
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771) 
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) 
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214) 
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433) 
    at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:70) 
    at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61) 
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702) 
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683) 
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) 
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390) 
    at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) 
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) 
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) 
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) 
Caused by: java.lang.NullPointerException 
    at org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.delete(MountHandler.java:492) 
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.delete(HandlerManager.java:2627) 
    ... 50 more 

註冊表鑑於IS控制檯顯示的治理已成功安裝。

IS配置註冊表是否應該共享/掛載?如果是這樣,請告知或更新文檔。

而且這是正確的registry.xml按照商務部:

<remoteInstance url="https://localhost">  
     <id>gov</id> 
     <dbConfig>govregistry</dbConfig> 
     <cacheId>[email protected]:mysql://10.20.30.42:3306/registrydb</cacheId> 
     <readOnly>false</readOnly> 
     <enableCache>true</enableCache> 
     <registryRoot>/</registryRoot> 
</remoteInstance> 

假如那是我的本地IP地址,並在前面創建的數據庫是註冊表不registrydb

是/庫/ CONF/registry.xml

<dbConfig name="wso2registry"> 

     <dataSource>jdbc/WSO2CarbonDB</dataSource> 

    </dbConfig> 


    <dbConfig name="govregistry"> 
     <dataSource>jdbc/WSO2REG_DB</dataSource> 
</dbConfig> 

<remoteInstance url="https://localhost">  
     <id>gov</id> 
     <dbConfig>govregistry</dbConfig> 
     <cacheId>[email protected]:mysql://10.20.30.42:3306/registrydb</cacheId> 
     <readOnly>false</readOnly> 
     <enableCache>true</enableCache> 
     <registryRoot>/</registryRoot> 
</remoteInstance> 

<mount path="/_system/governance" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/governance</targetPath> 
</mount> 

<mount path="/_system/config" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/config</targetPath> 
</mount> 

API-M /庫/ CONF/registry.xml:

<dbConfig name="wso2registry"> 

     <dataSource>jdbc/WSO2CarbonDB</dataSource> 

    </dbConfig> 

<dbConfig name="govregistry"> 
     <dataSource>jdbc/WSO2REG_DB</dataSource> 
</dbConfig> 

<remoteInstance url="https://localhost">  
     <id>gov</id> 
     <dbConfig>govregistry</dbConfig> 
     <cacheId>[email protected]:mysql://10.20.30.42:3306/registrydb</cacheId> 
     <readOnly>false</readOnly> 
     <enableCache>true</enableCache> 
     <registryRoot>/</registryRoot> 
</remoteInstance> 

<mount path="/_system/governance" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/governance</targetPath> 
</mount> 

<mount path="/_system/config" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/config</targetPath> 
</mount> 

我跟隨(https://docs.wso2.com/display/CLUSTER420/Configuring+the+Pre-Packaged+Identity+Server+5.0.0+with+API+Manager+1.9.0

回答

0

好像與reistry配置的問題。請確保您的registry.xml配置是正確的。請清理數據庫並重啓兩臺服務器。

被側面:

<dbConfig name="govregistry"> 
     <dataSource>jdbc/WSO2REG_DB</dataSource> 
</dbConfig> 

<remoteInstance url="https://localhost">  
     <id>gov</id> 
     <dbConfig>govregistry</dbConfig> 
     <cacheId>[email protected]:mysql://10.20.30.42:3306/registrydb</cacheId> 
     <readOnly>false</readOnly> 
     <enableCache>true</enableCache> 
     <registryRoot>/</registryRoot> 
</remoteInstance> 

<mount path="/_system/governance" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/governance</targetPath> 
</mount> 

<mount path="/_system/config" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/config</targetPath> 
</mount> 

APIM方:

<dbConfig name="govregistry"> 
     <dataSource>jdbc/WSO2REG_DB</dataSource> 
</dbConfig> 

<remoteInstance url="https://localhost">  
     <id>gov</id> 
     <dbConfig>govregistry</dbConfig> 
     <cacheId>[email protected]:mysql://10.20.30.42:3306/registrydb</cacheId> 
     <readOnly>false</readOnly> 
     <enableCache>true</enableCache> 
     <registryRoot>/</registryRoot> 
</remoteInstance> 

<mount path="/_system/governance" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/governance</targetPath> 
</mount> 

<mount path="/_system/config" overwrite="true"> 
     <instanceId>gov</instanceId> 
     <targetPath>/_system/config</targetPath> 
</mount> 
+0

驗證了註冊表文件。我完全按照文檔。請參閱上面的編輯配置。仍然不明白爲什麼remoteInstance cacheId指向一個不存在的數據庫(registrydb)和一些有趣的IP地址10.20.30.42 ...當我將其更改爲'apiuser @ jdbc:mysql:// localhost:3306/registry ',但同樣的錯誤發生,但IS成功連接到兩個坐騎... – JavaMastaRSA

+0

管理解決問題時,也用一個MySql分貝(用於IS和AM)取代H2分貝,如果任何人需要此配置的幫助,給我發電子郵件 – JavaMastaRSA

0

事實上,有與安裝治理空間的問題。 在將所提及的IdS定義爲KeyManager指南之後,Identity Server中的管理空間已被裝入。

配置空間沒有正確配置,因爲在registry.xml中'conf'掛載在'治理'之後。 'conf'部分將在'governance'之前移動時,錯誤將會出現,但'config'將在wso2 web控制檯中顯示爲註冊表瀏覽器中的遠程空間。

下面提及registry.xml安裝順序:

<mount path="/_system/config" overwrite="true"> 
    <instanceId>gov</instanceId> 
    <targetPath>/_system/config</targetPath> 
</mount> 

<mount path="/_system/governance" overwrite="true"> 
    <instanceId>gov</instanceId> 
    <targetPath>/_system/governance</targetPath> 
</mount>