简体   繁体   中英

WSO2 Api Manager 3.2.0 PostgreSQL issues

I'm trying to use WSO2 API Manager 3.2.0

I configured it on postgre by following this link https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-databases/changing-default-databases/changing-to-postgresql/#setting-up-postgresql

This id my deployment.toml configuration:

[database.apim_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_apim_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_apim_db"
username = "wso2apimgr"
password = "wso2apimgr"
driver = "org.postgresql.Driver"
pool_options.maxActive = "5"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "2"
pool_options.testOnBorrow = false
pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
pool_options.defaultAutoCommit=false

[database.shared_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_shared_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_shared_db"
username = "wso2apimgr"
password = "wso2apimgr"
driver = "org.postgresql.Driver"
pool_options.maxActive = "5"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "2"
pool_options.testOnBorrow = false
pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
pool_options.defaultAutoCommit=false

[database.local]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_shared_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_shared_db"
username = "wso2apimgr"
password = "wso2apimgr"
driver = "org.postgresql.Driver"
pool_options.maxActive = "5"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "2"
pool_options.testOnBorrow = false
pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
pool_options.defaultAutoCommit=false

I put the postgreSQL driver in component/lib directory and I executed the postgre.sql script in my databases

When I start the server I get this error:

TID: [-1234] [] [2021-01-19 18:22:10,328] ERROR {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Unable to create fixed remote mounts. 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:2653)
    at org.wso2.carbon.registry.core.jdbc.handlers.UserDefinedHandlerManager.delete(UserDefinedHandlerManager.java:214)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.delete(HandlerLifecycleManager.java:443)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.delete(EmbeddedRegistry.java:851)
    at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.delete(CacheBackedRegistry.java:595)
    at org.wso2.carbon.registry.core.session.UserRegistry.deleteInternal(UserRegistry.java:879)
    at org.wso2.carbon.registry.core.session.UserRegistry.access$1100(UserRegistry.java:73)
    at org.wso2.carbon.registry.core.session.UserRegistry$12.run(UserRegistry.java:854)
    at org.wso2.carbon.registry.core.session.UserRegistry$12.run(UserRegistry.java:851)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.wso2.carbon.registry.core.session.UserRegistry.delete(UserRegistry.java:851)
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.setupMounts(RegistryCoreServiceComponent.java:299)
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.buildRegistryService(RegistryCoreServiceComponent.java:529)
    at org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent.activate(RegistryCoreServiceComponent.java:123)
    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:260)
    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:113)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:985)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:866)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:804)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:228)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:525)
    at org.wso2.carbon.user.core.internal.Activator.startDeploy(Activator.java:73)
    at org.wso2.carbon.user.core.internal.BundleCheckActivator.start(BundleCheckActivator.java:61)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:842)
    at org.eclipse.osgi.internal.framework.BundleContextImpl$3.run(BundleContextImpl.java:1)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:834)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:791)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1013)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:365)
    at org.eclipse.osgi.container.Module.doStart(Module.java:598)
    at org.eclipse.osgi.container.Module.start(Module.java:462)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$1.run(ModuleContainer.java:1820)
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$2$1.execute(EquinoxContainerAdaptor.java:150)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1813)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1770)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1735)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1661)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
Caused by: java.lang.NullPointerException
    at org.wso2.carbon.registry.core.jdbc.handlers.builtin.MountHandler.delete(MountHandler.java:490)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.delete(HandlerManager.java:2629)
    ... 53 more

TID: [-1234] [] [2021-01-19 18:22:10,393]  INFO {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - Registry Mode    : READ-WRITE
TID: [-1234] [] [2021-01-19 18:22:10,609]  INFO {org.wso2.carbon.metrics.impl.util.JmxReporterBuilder} - Creating JMX reporter for Metrics with domain 'org.wso2.carbon.metrics'
TID: [-1234] [] [2021-01-19 18:22:10,613]  INFO {org.wso2.carbon.metrics.impl.reporter.AbstractReporter} - Started JMX reporter for Metrics
TID: [-1234] [] [2021-01-19 18:22:12,800]  INFO {org.wso2.carbon.registry.indexing.solr.SolrClient} - Default Embedded Solr Server Initialized
TID: [-1234] [] [2021-01-19 18:22:13,216]  INFO {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} - Carbon UserStoreMgtDSComponent activated successfully.
TID: [-1234] [] [2021-01-19 18:22:15,309]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} - User Store Configuration Deployer initiated.
TID: [-1234] [] [2021-01-19 18:22:15,310]  INFO {org.wso2.carbon.identity.user.store.configuration.deployer.UserStoreConfigurationDeployer} - User Store Configuration Deployer initiated.
TID: [-1234] [] [2021-01-19 18:22:16,061]  INFO {org.wso2.carbon.websocket.transport.WebsocketTransportSender} - WSS Sender started
TID: [-1234] [] [2021-01-19 18:22:16,065]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSender} - Initializing Pass-through HTTP/S Sender...
TID: [-1234] [] [2021-01-19 18:22:16,096]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSender} - Pass-through HTTP Sender started...
TID: [-1234] [] [2021-01-19 18:22:16,097]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLSender} - Initializing Pass-through HTTP/S Sender...
TID: [-1234] [] [2021-01-19 18:22:16,262]  INFO {org.apache.synapse.transport.nhttp.config.ClientConnFactoryBuilder} - customSSLProfiles configuration is loaded from path: /opt/diomedee/wso2am-3.2.0/repository/resources/security/sslprofiles.xml
TID: [-1234] [] [2021-01-19 18:22:16,262]  INFO {org.apache.synapse.transport.nhttp.config.ClientConnFactoryBuilder} - HTTPS Loading custom SSL profiles for the HTTPS sender
TID: [-1234] [] [2021-01-19 18:22:16,432]  INFO {org.apache.synapse.transport.nhttp.config.ClientConnFactoryBuilder} - HTTPS Custom SSL profiles initialized for 1 servers
TID: [-1234] [] [2021-01-19 18:22:16,433]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpSSLSender} - Pass-through HTTPS Sender started...
TID: [-1234] [] [2021-01-19 18:22:16,437]  INFO {org.wso2.carbon.websocket.transport.WebsocketTransportSender} - WS Sender started
TID: [-1234] [] [2021-01-19 18:22:16,454]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpListener} - Initializing Pass-through HTTP/S Listener...
TID: [-1234] [] [2021-01-19 18:22:16,475]  INFO {org.apache.synapse.transport.passthru.PassThroughHttpMultiSSLListener} - Initializing Pass-through HTTP/S Listener...
TID: [-1234] [] [2021-01-19 18:22:16,632]  INFO {org.apache.synapse.transport.nhttp.config.ServerConnFactoryBuilder} - SSLProfile configuration is loaded from path: /opt/diomedee/wso2am-3.2.0/repository/resources/security/listenerprofiles.xml
TID: [-1234] [] [2021-01-19 18:22:16,827] ERROR {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry} - Registry Exception occurred while executing the query org.wso2.carbon.registry.core.exceptions.RegistryException: PooledConnection has already been closed.
    at org.wso2.carbon.registry.core.jdbc.dataaccess.SQLQueryProcessor.executeQuery(SQLQueryProcessor.java:239)
    at org.wso2.carbon.registry.core.jdbc.queries.QueryProcessorManager.executeQuery(QueryProcessorManager.java:137)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.executeQuery(EmbeddedRegistry.java:2299)
    at org.wso2.carbon.governance.api.util.GovernanceUtils.getDirectArtifactPath(GovernanceUtils.java:851)
    at org.wso2.carbon.governance.registry.extensions.handlers.MetaDataCacheHandler.clearPreFetchArtifact(MetaDataCacheHandler.java:72)
    at org.wso2.carbon.governance.registry.extensions.handlers.MetaDataCacheHandler.put(MetaDataCacheHandler.java:47)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerManager.put(HandlerManager.java:2505)
    at org.wso2.carbon.registry.core.jdbc.handlers.HandlerLifecycleManager.put(HandlerLifecycleManager.java:958)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.put(EmbeddedRegistry.java:705)
    at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.put(CacheBackedRegistry.java:591)
    at org.wso2.carbon.registry.core.session.UserRegistry.putInternal(UserRegistry.java:840)
    at org.wso2.carbon.registry.core.session.UserRegistry.access$1000(UserRegistry.java:73)
    at org.wso2.carbon.registry.core.session.UserRegistry$11.run(UserRegistry.java:816)
    at org.wso2.carbon.registry.core.session.UserRegistry$11.run(UserRegistry.java:813)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.wso2.carbon.registry.core.session.UserRegistry.put(UserRegistry.java:813)
    at org.wso2.carbon.core.init.CarbonServerManager.populateConnectionProperties(CarbonServerManager.java:678)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:450)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:305)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)

I tested this on postgreSQL 10 and postgreSQL 13 but in both cases as soon as I start the server I get the error and server doesn't start.

May anybody tell me how to solve the issue?

Angelo

UPDATE

As suggested I changed my deployment.toml by using separated DB for shared and user. Now my deployment.toml is:

[database.apim_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_apim_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_apim_db"
username = "credentials"
password = "credentials"
driver = "org.postgresql.Driver"
validationQuery="SELECT 1"
pool_options.maxActive = "20"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "10"
#pool_options.testOnBorrow = false
#pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
#pool_options.defaultAutoCommit=false

[database.shared_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_shared_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_shared_db"
username = "credentials"
password = "credentials"
driver = "org.postgresql.Driver"
validationQuery="SELECT 1"
pool_options.maxActive = "20"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "10"
#pool_options.testOnBorrow = false
#pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
#pool_options.defaultAutoCommit=false

[database.local]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/api_mgr_carbon_db"
#hostname = "xxx.yyy.zz.ww"
#port = "5432"
#name = "api_mgr_shared_db"
username = "credentials"
password = "credentials"
driver = "org.postgresql.Driver"
validationQuery="SELECT 1"
pool_options.maxActive = "20"
pool_options.maxWait = "60000"
pool_options.minIdle = "1"
pool_options.maxIdle = "10"
#pool_options.testOnBorrow = false
#pool_options.validationQuery="SELECT 1; COMMIT"
pool_options.validationInterval="30000"
#pool_options.defaultAutoCommit=false

But now i get this error:

TID: [-1234] [accountrecoveryendpoint] [2021-01-20 11:47:19,186]  INFO {org.wso2.carbon.webapp.mgt.TomcatGenericWebappsDeployer} - Deployed webapp: StandardEngine[Catalina].StandardHost[localhost].StandardContext[/accountrecoveryendpoint].File[/opt/diomedee/wso2am-3.2.0/repository/deployment/server/webapps/accountrecoveryendpoint]
TID: [-1] [] [2021-01-20 11:47:32,227]  INFO {org.wso2.carbon.event.processor.manager.core.internal.CarbonEventManagementService} - Starting polling event receivers
TID: [-1] [] [2021-01-20 11:47:52,556]  WARN {org.wso2.carbon.application.deployer.internal.AppDeployerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.application.deployer.synapse.service.SynapseAppDeployerService,org.wso2.carbon.mediation.initializer.services.SynapseEnvironmentService,
TID: [-1] [] [2021-01-20 11:47:52,603]  WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} - Waiting for required OSGi services: org.wso2.carbon.application.deployer.service.CappDeploymentService,org.wso2.carbon.server.admin.common.IServerAdmin,org.wso2.carbon.throttling.agent.ThrottlingAgent,
TID: [-1234] [] [2021-01-20 11:48:19,172] ERROR {org.wso2.carbon.registry.core.dataaccess.TransactionManager} - Failed to start new registry transaction. org.apache.tomcat.jdbc.pool.PoolExhaustedException: [pool-111-thread-19] Timeout: Pool empty. Unable to fetch a connection in 60 seconds, none available[size:20; busy:20; idle:0; lastwait:60000].
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:712)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:198)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
    at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.beginTransaction(JDBCTransactionManager.java:83)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.beginTransaction(EmbeddedRegistry.java:443)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.get(EmbeddedRegistry.java:505)
    at org.wso2.carbon.registry.core.caching.CacheBackedRegistry.get(CacheBackedRegistry.java:175)
    at org.wso2.carbon.registry.core.session.UserRegistry.getInternal(UserRegistry.java:629)
    at org.wso2.carbon.registry.core.session.UserRegistry.access$400(UserRegistry.java:73)
    at org.wso2.carbon.registry.core.session.UserRegistry$5.run(UserRegistry.java:609)
    at org.wso2.carbon.registry.core.session.UserRegistry$5.run(UserRegistry.java:606)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.wso2.carbon.registry.core.session.UserRegistry.get(UserRegistry.java:606)
    at org.wso2.carbon.registry.indexing.AsyncIndexer$IndexingTask.createIndexDocument(AsyncIndexer.java:242)
    at org.wso2.carbon.registry.indexing.AsyncIndexer$IndexingTask.run(AsyncIndexer.java:210)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

TID: [-1234] [] [2021-01-20 11:48:19,179] ERROR {org.wso2.carbon.registry.indexing.AsyncIndexer} - Error while indexing. Resource at path "/_system/config/identity/questionCollection"could not be indexedorg.wso2.carbon.registry.core.exceptions.RegistryException: Failed to start new registry transaction.
TID: [-1234] [] [2021-01-20 11:48:19,190] ERROR {org.wso2.carbon.registry.core.dataaccess.TransactionManager} - Failed to start new registry transaction. org.apache.tomcat.jdbc.pool.PoolExhaustedException: [pool-111-thread-1] Timeout: Pool empty. Unable to fetch a connection in 60 seconds, none available[size:20; busy:20; idle:0; lastwait:60000].
    at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:712)
    at org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:198)
    at org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:132)
    at org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.beginTransaction(JDBCTransactionManager.java:83)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.beginTransaction(EmbeddedRegistry.java:443)
    at org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.getTags(EmbeddedRegistry.java:1540)

May anybody, kindly, why I'm getting this error?

To avoid confusion create 2 separate databases for SHARED_DB + WSO2CARBON_DB and APIM_DB .

SHARED_DB stores API Manager related data and SHARED_DB stores registry and user management data. By default, WSO2CARBON_DB will be an embedded H2 database and it is not necessary to change it to another database

eg: SHARED_DB --> shared_db APIM_DB --> apim_db CARBON_DB --> carbon_db

To create the necessary tables for shared_db execute the script of APIM_HOME//dbscripts/postgresql.sql .

To create the necessary tables for carbon_db execute the script of APIM_HOME//dbscripts/postgresql.sql .

Note that APIM_HOME//dbscripts/postgresql.sql contains both Registry and User management tables. So we are using the same scripts.

To create the necessary tables for apim_db execute the script of APIM_HOME//dbscripts/apimgt/postgresql.sql .

When configuring those DBs in APIM make sure that you specified the correct DB name in the configuration elements.

[database.apim_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/apim_db"

[database.shared_db]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/shared_db"

[database.local]
type = "postgre"
url = "jdbc:postgresql://xxx.yyy.zz.ww:5432/shared_db"

Seems the same database is pointed to SHARED_DB and CARBON_DB . You can use the embedded H2 database for CARBON_DB(database.local) as it is not necessary to change it. Can try changing the database.local to use the H2 DB or create new database for CARBON_DB and startup the pack.

Refer the Changing WSO2CARBON_DB to MySQL section in [1]

[1] https://apim.docs.wso2.com/en/latest/install-and-setup/setup/setting-up-databases/changing-default-databases/changing-to-mysql/

Regarding the new issue which is,

ERROR {org.wso2.carbon.registry.core.dataaccess.TransactionManager} - Failed to start new registry transaction. org.apache.tomcat.jdbc.pool.PoolExhaustedException: [pool-111-thread-1] Timeout: Pool empty. Unable to fetch a connection in 60 seconds, none available[size:20; busy:20; idle:0; lastwait:60000].

it looks like the connection pool is exhausted. Can you increase the maxActive connections value and recheck?

#set this to a higher value ex: 50 which is the default value APIM
pool_options.maxActive = "50" 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM