Hi Amila, Configuration looks good. Got a few questions regarding the worker's setup.
1. Did you first create the tenant on the manager and then setup the worker? 2. Did you take a copy of the manager's DB and setup the worker (for the local H2 database)? 3. Was the config/governance registry Database previously or parallely used for some other deployment? Also, please look into what Sumedha is mentioning. Thanks, Senaka. On Sun, Sep 8, 2013 at 10:11 AM, Amila De Silva <[email protected]> wrote: > Hi Senaka, > Mounts were created for both Config and Governance spaces. I have attached > the configurations files of the failing node. > > AmilaD > > > On Sat, Sep 7, 2013 at 10:07 PM, Senaka Fernando <[email protected]> wrote: > >> Hi Amila, >> >> This is most probably a result of improper mounting configurations. Can >> you please explain how the mounts were setup and how the registry databases >> were configured? >> >> Thanks, >> Senaka. >> >> >> On Sat, Sep 7, 2013 at 12:40 AM, Amila De Silva <[email protected]> wrote: >> >>> Hi, >>> I'm getting the following exception when invoking an API in a >>> distributed APIM setup. In the deployment, we have two gateway nodes, one >>> serving as a manager and the other as the worker. Published APIs are first >>> deployed on the manager node and then propagated to the worker node >>> through the svn deployment synchronizer. >>> This was only observed when invoking an API created by a tenant. >>> >>> [2013-09-06 18:41:29,653] ERROR - JDBCResourceDAO Failed to add resource >>> to path /. Referential integrity constraint violation: >>> "REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE FOREIGN KEY(REG_PATH_ID, >>> REG_TENANT_ID) REFERENCES PUBLIC.REG_PATH(REG_PATH_ID, REG_TENANT_ID)"; SQL >>> statement: >>> INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE, >>> REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME, >>> REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, >>> ?, ?) [23002-140] >>> org.h2.jdbc.JdbcSQLException: Referential integrity constraint >>> violation: "REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE FOREIGN >>> KEY(REG_PATH_ID, REG_TENANT_ID) REFERENCES PUBLIC.REG_PATH(REG_PATH_ID, >>> REG_TENANT_ID)"; SQL statement: >>> INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE, >>> REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME, >>> REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, >>> ?, ?) [23002-140] >>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) >>> at org.h2.message.DbException.get(DbException.java:167) >>> at org.h2.message.DbException.get(DbException.java:144) >>> at >>> org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:329) >>> at >>> org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271) >>> at org.h2.table.Table.fireConstraints(Table.java:801) >>> at org.h2.table.Table.fireAfterRow(Table.java:818) >>> at org.h2.command.dml.Insert.insertRows(Insert.java:122) >>> at org.h2.command.dml.Insert.update(Insert.java:82) >>> at org.h2.command.CommandContainer.update(CommandContainer.java:70) >>> at org.h2.command.Command.executeUpdate(Command.java:199) >>> at >>> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) >>> at >>> org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) >>> at >>> org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addResourceWithoutContentId(JDBCResourceDAO.java:1391) >>> at >>> org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addRoot(JDBCResourceDAO.java:445) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.addRootCollection(UserRegistry.java:365) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:299) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:226) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:205) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getConfigSystemRegistry(EmbeddedRegistryService.java:485) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:295) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:135) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:196) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:77) >>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:378) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184) >>> at >>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >>> at java.lang.Thread.run(Unknown Source) >>> [2013-09-06 18:41:29,656] FATAL - UserRegistry Failed to add the root >>> collection to the coreRegistry. >>> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to >>> add resource to path /. Referential integrity constraint violation: >>> "REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE FOREIGN KEY(REG_PATH_ID, >>> REG_TENANT_ID) REFERENCES PUBLIC.REG_PATH(REG_PATH_ID, REG_TENANT_ID)"; SQL >>> statement: >>> INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE, >>> REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME, >>> REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, >>> ?, ?) [23002-140] >>> at >>> org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addResourceWithoutContentId(JDBCResourceDAO.java:1410) >>> at >>> org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addRoot(JDBCResourceDAO.java:445) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.addRootCollection(UserRegistry.java:365) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:299) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:226) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:205) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getConfigSystemRegistry(EmbeddedRegistryService.java:485) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:295) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:135) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:196) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:77) >>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:378) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184) >>> at >>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown >>> Source) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >>> at java.lang.Thread.run(Unknown Source) >>> Caused by: org.h2.jdbc.JdbcSQLException: Referential integrity >>> constraint violation: "REG_RESOURCE_FK_BY_PATH_ID: PUBLIC.REG_RESOURCE >>> FOREIGN KEY(REG_PATH_ID, REG_TENANT_ID) REFERENCES >>> PUBLIC.REG_PATH(REG_PATH_ID, REG_TENANT_ID)"; SQL statement: >>> INSERT INTO REG_RESOURCE (REG_PATH_ID, REG_NAME, REG_MEDIA_TYPE, >>> REG_CREATOR, REG_CREATED_TIME, REG_LAST_UPDATOR, REG_LAST_UPDATED_TIME, >>> REG_DESCRIPTION, REG_TENANT_ID, REG_UUID) VALUES (?, ?, ?, ?, ?, ?, ?, ?, >>> ?, ?) [23002-140] >>> at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) >>> at org.h2.message.DbException.get(DbException.java:167) >>> at org.h2.message.DbException.get(DbException.java:144) >>> at >>> org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:329) >>> at >>> org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271) >>> at org.h2.table.Table.fireConstraints(Table.java:801) >>> at org.h2.table.Table.fireAfterRow(Table.java:818) >>> at org.h2.command.dml.Insert.insertRows(Insert.java:122) >>> at org.h2.command.dml.Insert.update(Insert.java:82) >>> at org.h2.command.CommandContainer.update(CommandContainer.java:70) >>> at org.h2.command.Command.executeUpdate(Command.java:199) >>> at >>> org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) >>> at >>> org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) >>> at >>> org.wso2.carbon.registry.core.jdbc.dao.JDBCResourceDAO.addResourceWithoutContentId(JDBCResourceDAO.java:1391) >>> ... 20 more >>> [2013-09-06 18:41:29,657] ERROR - TenantAxisUtils Error occurred while >>> running deployment for tenant foo1.com >>> org.wso2.carbon.registry.core.exceptions.RegistryException: Failed to >>> add the root collection to the coreRegistry. >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.addRootCollection(UserRegistry.java:399) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.init(UserRegistry.java:299) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:226) >>> at >>> org.wso2.carbon.registry.core.session.UserRegistry.<init>(UserRegistry.java:205) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getUserRegistry(EmbeddedRegistryService.java:427) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getSystemRegistry(EmbeddedRegistryService.java:292) >>> at >>> org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService.getConfigSystemRegistry(EmbeddedRegistryService.java:485) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.createTenantConfigurationContext(TenantAxisUtils.java:295) >>> at >>> org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils.getTenantConfigurationContext(TenantAxisUtils.java:135) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.processRequest(MultitenantMessageReceiver.java:196) >>> at >>> org.wso2.carbon.core.multitenancy.MultitenantMessageReceiver.receive(MultitenantMessageReceiver.java:77) >>> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:378) >>> at >>> org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:184) >>> at >>> org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) >>> at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) >>> at java.lang.Thread.run(Unknown Source) >>> >>> >>> -- >>> *Amila De Silva* >>> * >>> * >>> *Software Engineer* >>> WSO2 Inc.* >>> * >>> mobile :(+94) 775119302 >>> >>> >> >> >> -- >> * <http://us13.wso2con.com/> >> * >> * >> * >> *Senaka Fernando* >> Senior Technical Lead; WSO2 Inc.; http://wso2.com* >> Member; Apache Software Foundation; http://apache.org >> >> E-mail: senaka AT wso2.com >> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 >> Linked-In: http://linkedin.com/in/senakafernando >> >> *Lean . Enterprise . Middleware >> > > > > -- > *Amila De Silva* > * > * > *Software Engineer* > WSO2 Inc.* > * > mobile :(+94) 775119302 > > -- * <http://us13.wso2con.com/> * * * *Senaka Fernando* Senior Technical Lead; WSO2 Inc.; http://wso2.com* Member; Apache Software Foundation; http://apache.org E-mail: senaka AT wso2.com **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 Linked-In: http://linkedin.com/in/senakafernando *Lean . Enterprise . Middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
