在wso2 EI 6.4中,分析文档中的数据库配置未包含在文档中,因为它会使用6.3之前没有的流处理器。我正在尝试使用postgres数据库为ESB配置文件配置wso2 ei 6.4分析数据库。因此,除了carbon db
之类的metrics DB, EI Anlytics db
以外,配置所需的所有数据库/方案是什么。在
<wso2_home>/wso2/analytics/conf/dashboard/dbscript
<wso2_home>/wso2/analytics/conf/manager/dbscript
<wso2_home>/wso2/analytics/conf/worker/dbscript
只有metrics script for postgres
在那儿,我没有得到应该创建哪个数据库/场景。
任何人都可以简要介绍使用POSTGRES DB进行数据库配置所要遵循的步骤。
我尝试使用postgres 9.6,当我配置数据库时,它引发以下异常,但是carbondb是使用postgres 9.6创建的:
[2019-01-16 15:17:33,186] ERROR {org.eclipse.equinox.ds} - [SCR] Exception while activating instance org.wso2.carbon.dashboards.core.internal.StartupListener@2bc03fa1 of component org.wso2.carbon.dashboards.core.internal.StartupListener java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
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:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
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:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.wso2.carbon.databridge.core.internal.DataBridgeDS.start(DataBridgeDS.java:83)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:235)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
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:109)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:915)
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:862)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)
at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:482)
at org.wso2.carbon.analytics.idp.client.core.internal.IdPClientServiceComponent.onAllRequiredCapabilitiesAvailable(IdPClientServiceComponent.java:111)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.lambda$notifySatisfiableComponents$7(StartupComponentManager.java:266)
at java.util.ArrayList.forEach(ArrayList.java:1249)
at org.wso2.carbon.kernel.internal.startupresolver.StartupComponentManager.notifySatisfiableComponents(StartupComponentManager.java:252)
at org.wso2.carbon.kernel.internal.startupresolver.StartupOrderResolver$1.run(StartupOrderResolver.java:204)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: org.wso2.carbon.dashboards.core.exception.DashboardRuntimeException: Cannot create dashboard DAO for DB access.
at org.wso2.carbon.dashboards.core.internal.DashboardMetadataProviderImpl.<init>(DashboardMetadataProviderImpl.java:90)
at org.wso2.carbon.dashboards.core.internal.StartupListener.activate(StartupListener.java:111)
... 50 more
Caused by: org.wso2.carbon.dashboards.core.exception.DashboardException: Unable to create the 'DASHBOARD_RESOURCE' table.
at org.wso2.carbon.dashboards.core.internal.database.DashboardMetadataDao.createDashboardResourceTable(DashboardMetadataDao.java:84)
at org.wso2.carbon.dashboards.core.internal.database.DashboardMetadataDao.initDashboardTable(DashboardMetadataDao.java:62)
at org.wso2.carbon.dashboards.core.internal.DashboardMetadataProviderImpl.<init>(DashboardMetadataProviderImpl.java:88)
... 51 more
Caused by: java.sql.SQLException: Cannot find database queries for PostgreSQL 9.6.10.
at org.wso2.carbon.dashboards.core.internal.database.QueryManager.getQuery(QueryManager.java:121)
at org.wso2.carbon.dashboards.core.internal.database.QueryManager.getQuery(QueryManager.java:100)
at org.wso2.carbon.dashboards.core.internal.database.DashboardMetadataDao.createDashboardResourceTable(DashboardMetadataDao.java:77)
... 53 more
Caused by: org.wso2.carbon.database.query.manager.exception.QueryMappingNotAvailableException: Mapping value for query: 'table_check' not found in Deployment config Map and Component config Map for database type: 'PostgreSQL' and version '9.6.10'.
at org.wso2.carbon.database.query.manager.QueryProvider.mergeMapping(QueryProvider.java:105)
at org.wso2.carbon.dashboards.core.internal.database.QueryManager.getQuery(QueryManager.java:119)
... 55 more
答案 0 :(得分:1)
WSO2 EI分析配置文件(流处理器)本身将创建必要的表。您只需要创建所需的数据库,然后在Deployment.yaml中对其进行配置。 This是说明完整群集设置的指南。如果只运行一个工作程序和一个仪表板,则不需要CLUSTER_DB,但其他配置将相同。文档以mysql为例编写。但是步骤对于PostgreSQL是相同的
答案 1 :(得分:0)
似乎仪表板应用程序没有针对PostgreSQL和默认查询的查询。请参阅issue
要覆盖针对Postgres的信息中心应用的查询,请参阅“ Configuring Database Queries”
wso2.dashboard:
queries:
-
type: PostgreSQL
version: default
mappings:
add_dashboard: INSERT INTO DASHBOARD_RESOURCE (URL, OWNER, NAME, DESCRIPTION, PARENT_ID , LANDING_PAGE, CONTENT) VALUES (?, ?, ?, ?, ?, ?, ?)
add_widget_config: INSERT INTO WIDGET_RESOURCE (WIDGET_ID, WIDGET_NAME, WIDGET_CONFIGS) VALUES (?, ?, ?)
get_widget_config: SELECT WIDGET_NAME, WIDGET_CONFIGS FROM WIDGET_RESOURCE WHERE WIDGET_ID = ?
get_widget_name_id_map: SELECT WIDGET_ID, WIDGET_NAME FROM WIDGET_RESOURCE
delete_widget_by_id: DELETE FROM WIDGET_RESOURCE WHERE WIDGET_ID = ?
get_dashboard_by_url: SELECT ID, URL, OWNER, NAME, DESCRIPTION, PARENT_ID, LANDING_PAGE, CONTENT FROM DASHBOARD_RESOURCE WHERE URL = ?
get_dashboard_metadata_list: SELECT ID, URL, OWNER, NAME, DESCRIPTION, PARENT_ID, LANDING_PAGE FROM DASHBOARD_RESOURCE
delete_dashboard_by_url: DELETE FROM DASHBOARD_RESOURCE WHERE URL = ?
update_dashboard_content: UPDATE DASHBOARD_RESOURCE SET NAME = ?, DESCRIPTION = ?, CONTENT = ?, PARENT_ID = ?, LANDING_PAGE = ? WHERE URL = ?