Hi Prabath, On Wed, Oct 29, 2014 at 10:29 AM, Prabath Abeysekera <[email protected]> wrote:
> Hi Indika, > > Please correct me if I'm wrong, the error trace posted in your mail > doesn't seem to suggest that the problem reported was caused by something > specific to Cassandra datasource configurations. Would you be able to > explain a little further as to how you concluded it that way? > The above exception occurred only when enabled cassadra datasource in master-datasources.xml. I have configured RDBMS datasource i.e. MySQL. But it's not gave any exception like above. > > FYI, we'd used the same configurations a few week backs while trying to > fix some Cassandra related dependency issue seen in MB, but had never come > across something like this. and I'm sure there hasn't been any changes in > Cassandra data reader implementation since then, as well. Perhaps, it's a > good idea to debug the ndatasource component and see what's gone wrong? > Yes. I will look into ndatasource component with the help of carbon team. This worked previously. The change I did is removed cassandra server feature, cassandra common feature and cassandra profile from product-mb since we are no longer using embedded cassandra. Now we use cassandra datareader feature only. Cheers! > > Cheers, > Prabath > > On Tue, Oct 28, 2014 at 4:03 PM, Indika Sampath <[email protected]> wrote: > >> Hi All, >> >> Cassandra server no longer embedded into WSO2 MB 3.0.0. Therefore I have >> removed following features from the product as well as removed cassandra >> profile too. >> >> org.wso2.carbon.cassandra.server >> org.wso2.carbon.cassandra.common >> >> The only remain cassandra related feature is >> org.wso2.carbon.cassandra.datareader. We use this feature to connect with >> external cassandra server by enabling cassandra datasource in >> master-datasources.xml. Communication happen with cassandra via >> cql-driver_1.0.8.wso2v1. >> >> We have added following <provider> under <providers> in >> master-datasources.xml >> >> >> <provider>org.wso2.carbon.cassandra.datareader.datasource.CassandraDataSourceReader</provider> >> >> Here is datasource we used to connect to external cassandra server >> >> <datasource> >> <name>WSO2_CASSANDRA_DB</name> >> <description>The datasource used for cassandra</description> >> <jndiConfig> >> <name>CassandraRepo</name> >> </jndiConfig> >> <definition type="CASSANDRA"> >> <configuration> >> <async>false</async> >> <clusterName>TestCluster</clusterName> >> <compression>SNAPPY</compression> >> <concurrency>100</concurrency> >> <username>admin</username> >> <password encrypted="true">admin</password> >> <port>9042</port> >> <maxConnections>100</maxConnections> >> >> <hosts> >> <host>127.0.0.1</host> >> </hosts> >> <loadBalancePolicy> >> <exclusionThreshold>2.5</exclusionThreshold> >> <latencyAware>true</latencyAware> >> <minMeasure>100</minMeasure> >> <policyName>RoundRobinPolicy</policyName> >> <retryPeriod>10</retryPeriod> >> <scale>2</scale> >> </loadBalancePolicy> >> >> <poolOptions> >> >> <coreConnectionsForLocal>10</coreConnectionsForLocal> >> >> <coreConnectionsForRemote>10</coreConnectionsForRemote> >> >> <maxConnectionsForLocal>10</maxConnectionsForLocal> >> >> <maxConnectionsForRemote>10</maxConnectionsForRemote> >> >> <maxSimultaneousRequestsForLocal>10</maxSimultaneousRequestsForLocal> >> >> <maxSimultaneousRequestsForRemote>10</maxSimultaneousRequestsForRemote> >> >> <minSimultaneousRequestsForLocal>10</minSimultaneousRequestsForLocal> >> >> <minSimultaneousRequestsForRemote>10</minSimultaneousRequestsForRemote> >> </poolOptions> >> >> <reconnectPolicy> >> <baseDelayMs>100</baseDelayMs> >> >> <policyName>ConstantReconnectionPolicy</policyName> >> </reconnectPolicy> >> <socketOptions> >> <connectTimeoutMillis>200</connectTimeoutMillis> >> <keepAlive>true</keepAlive> >> <readTimeoutMillis>200</readTimeoutMillis> >> <tcpNoDelay>true</tcpNoDelay> >> </socketOptions> >> >> </configuration> >> >> </definition> >> </datasource> >> >> State of org.wso2.carbon.cassandra.datareader as below. >> >> 136 ACTIVE org.wso2.carbon.cassandra.datareader_4.3.0.SNAPSHOT >> >> I have enabled DEBUG logs of DataSourceServiceComponent and it seems >> setSecretCallbackHandlerService() method called twice when bundle >> activation and private void initSystemDataSources() get called inside this >> setter method. It gives the below exception when second time calling >> initSystemDataSources() method. Is there anything wrong in our side with >> the implementation of connect to cassandra enabling datasource? >> >> [2014-10-28 14:50:23,521] INFO >> {org.wso2.carbon.databridge.agent.thrift.internal.AgentDS} - Successfully >> deployed Agent Client >> [2014-10-28 14:50:23,586] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> SecretCallbackHandlerService acquired >> [2014-10-28 14:50:23,586] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> Initializing system data sources... >> [2014-10-28 14:50:23,778] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> SecretCallbackHandlerService acquired >> [2014-10-28 14:50:23,778] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> Initializing system data sources... >> [2014-10-28 14:50:23,793] ERROR >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> Error in intializing system data sources: Error in initializing system data >> sources: Error in initializing system data sources at >> '/home/indika/dev-zone/wso2-dev/fork/product-mb/modules/distribution/target/wso2mb-3.0.0-SNAPSHOT/repository/conf/datasources/master-datasources.xml' >> - System datasource WSO2_CARBON_DBcan not be updated. >> org.wso2.carbon.ndatasource.common.DataSourceException: Error in >> initializing system data sources: Error in initializing system data sources >> at >> '/home/indika/dev-zone/wso2-dev/fork/product-mb/modules/distribution/target/wso2mb-3.0.0-SNAPSHOT/repository/conf/datasources/master-datasources.xml' >> - System datasource WSO2_CARBON_DBcan not be updated. >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSources(DataSourceManager.java:168) >> at >> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.initSystemDataSources(DataSourceServiceComponent.java:191) >> at >> org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent.setSecretCallbackHandlerService(DataSourceServiceComponent.java:177) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >> org.eclipse.equinox.internal.ds.model.ComponentReference.bind(ComponentReference.java:376) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bindReference(ServiceComponentProp.java:432) >> at >> org.eclipse.equinox.internal.ds.model.ServiceComponentProp.bind(ServiceComponentProp.java:218) >> 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.buildNewlySatisfied(Resolver.java:473) >> at >> org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217) >> at >> org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816) >> at >> org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783) >> at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89) >> at java.lang.Thread.run(Thread.java:662) >> Caused by: org.wso2.carbon.ndatasource.common.DataSourceException: Error >> in initializing system data sources at >> '/home/indika/dev-zone/wso2-dev/fork/product-mb/modules/distribution/target/wso2mb-3.0.0-SNAPSHOT/repository/conf/datasources/master-datasources.xml' >> - System datasource WSO2_CARBON_DBcan not be updated. >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSource(DataSourceManager.java:188) >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSources(DataSourceManager.java:157) >> ... 18 more >> Caused by: org.wso2.carbon.ndatasource.common.DataSourceException: System >> datasource WSO2_CARBON_DBcan not be updated. >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.registerDataSource(DataSourceRepository.java:344) >> at >> org.wso2.carbon.ndatasource.core.DataSourceRepository.addDataSource(DataSourceRepository.java:473) >> at >> org.wso2.carbon.ndatasource.core.DataSourceManager.initSystemDataSource(DataSourceManager.java:185) >> ... 19 more >> [2014-10-28 14:50:23,795] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> ServerConfigurationService acquired >> [2014-10-28 14:50:23,795] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> DataSourceServiceComponent activated >> [2014-10-28 14:50:26,250] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> RealmService acquired >> [2014-10-28 14:50:26,327] INFO >> {org.wso2.carbon.registry.core.jdbc.EmbeddedRegistryService} - Configured >> Registry in 33ms >> [2014-10-28 14:50:26,415] INFO >> {org.wso2.carbon.registry.core.internal.RegistryCoreServiceComponent} - >> Registry Mode : READ-WRITE >> [2014-10-28 14:50:26,419] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> RegistryService acquired >> [2014-10-28 14:50:26,419] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> Initializing super tenant user data sources... >> [2014-10-28 14:50:26,421] DEBUG >> {org.wso2.carbon.ndatasource.core.internal.DataSourceServiceComponent} - >> Super tenant user data sources successfully initialized >> [2014-10-28 14:50:26,559] INFO >> {org.wso2.carbon.user.core.internal.UserStoreMgtDSComponent} - Carbon >> UserStoreMgtDSComponent activated successfully. >> >> Cheers! >> >> -- >> Indika Sampath >> Software Engineer >> WSO2 Inc. >> http://wso2.com >> >> Phone: +94 716 424 744 >> Blog: http://indikasampath.blogspot.com/ >> >> > > > -- > Prabath Abeysekara > Associate Technical Lead, Data TG. > WSO2 Inc. > Email: [email protected] > Mobile: +94774171471 > -- Indika Sampath Software Engineer WSO2 Inc. http://wso2.com Phone: +94 716 424 744 Blog: http://indikasampath.blogspot.com/
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
