Hi Martin, Please find my response inline. On Feb 25, 2015 8:23 AM, "Martin Eppel (meppel)" <mep...@cisco.com> wrote: > > Hi Chamila, > > > > With the latest code as of today (see last commit) and run into the exceptions (see below) when bringing up the cartridge agent ? Not sure if something is missing or the code is simple not yet ready ? > > > > I attached the logs as well, > > > > Thanks > > > > Martin > > > > Last commit: > > commit a0003d85353bea6d1937f2e06db05f6335f34078 > > Author: Lahiru Sandaruwan <lahi...@apache.org> > > Date: Wed Feb 25 05:40:42 2015 +0530 > > > > Exceptions: > > > > [2015-02-25 02:38:05,563] INFO - [CartridgeAgentEventPublisher] Instance started event published > > [2015-02-25 02:38:05,563] INFO - [DefaultExtensionHandler] [start server extension] complete topology event received > > [2015-02-25 02:38:05,564] ERROR - [ExtensionUtils] Could not execute start servers extension > > java.lang.UnsupportedOperationException >
This seems to be resulting from an unusual payload parameter. Is it possible to attach a payload params file? > at java.util.AbstractMap.put(AbstractMap.java:203) > > at org.apache.stratos.cartridge.agent.util.ExtensionUtils.addPayloadParameters(ExtensionUtils.java:66) > > at org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeStartServersExtension(ExtensionUtils.java:153) > > at org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler.startServerExtension(DefaultExtensionHandler.java:426) > > at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:122) > > at java.lang.Thread.run(Thread.java:745) > > > > … > > [2015-02-25 02:38:10,633] INFO - [CartridgeAgentEventPublisher] Starting health statistics notifier > > Exception in thread "Thread-1" java.lang.RuntimeException: Could not parse thrift client configuration > > at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfigParser.parse(ThriftClientConfigParser.java:136) > > at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:44) > > at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56) > > at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPHealthStatisticsPublisher.<init>(WSO2CEPHealthStatisticsPublisher.java:43) > > at org.apache.stratos.common.statistics.publisher.HealthStatisticsPublisherFactory.createHealthStatisticsPublisher(HealthStatisticsPublisherFactory.java:31) > > at org.apache.stratos.cartridge.agent.statistics.publisher.HealthStatisticsNotifier.<init>(HealthStatisticsNotifier.java:45) > > at org.apache.stratos.cartridge.agent.event.publisher.CartridgeAgentEventPublisher.publishInstanceActivatedEvent(CartridgeAgentEventPublisher.java:139) > > at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:145) > > at java.lang.Thread.run(Thread.java:745) > > Caused by: java.lang.NullPointerException > > at java.io.File.<init>(File.java:277) > > at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfigParser.parse(ThriftClientConfigParser.java:67) > > ... 8 more > > Please check if thrift-client-config.xml is present in <agent home>/conf/ dolder. Also please check that the puppet master is up to date. > > …. > > [2015-02-25 02:40:14,097] ERROR - [CartridgeAgentEventListeners] Error processing member terminated event > > java.lang.NullPointerException > This can result because of a corrupted topology model. I'll look in to this.3 > at org.apache.stratos.cartridge.agent.util.ExtensionUtils.checkTopologyConsistency(ExtensionUtils.java:500) > > at org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler.onMemberTerminatedEvent(DefaultExtensionHandler.java:345) > > at org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$11.onEvent(CartridgeAgentEventListeners.java:292) > > at org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42) > > at java.util.Observable.notifyObservers(Observable.java:159) > > at org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51) > > at org.apache.stratos.messaging.message.processor.topology.MemberTerminatedMessageProcessor.doProcess(MemberTerminatedMessageProcessor.java:129) > > at org.apache.stratos.messaging.message.processor.topology.MemberTerminatedMessageProcessor.process(MemberTerminatedMessageProcessor.java:59) > > at org.apache.stratos.messaging.message.processor.topology.MemberSuspendedMessageProcessor.process(MemberSuspendedMessageProcessor.java:69) > > … > > > > From: Martin Eppel (meppel) > Sent: Tuesday, February 24, 2015 4:45 PM > To: dev@stratos.apache.org > Subject: RE: [Discuss] Java Cartridge Agent Improvements > > > > Never mind, I see the commits > > > > Thanks > > > > Martin > > From: Martin Eppel (meppel) > Sent: Tuesday, February 24, 2015 3:17 PM > To: dev@stratos.apache.org > Subject: RE: [Discuss] Java Cartridge Agent Improvements > > > > Hi Chamila, > > > > I was just wondering if you already merged these fixes back to the master (or by when ) ? > > > > I think I am hitting these issues, see exceptions below, > > > > Thanks > > > > Martin > > > > > > [2015-02-24 23:06:02,707] ERROR - [TopologyEventMessageDelegator] Failed to retrieve topology event message > > java.lang.IllegalMonitorStateException: attempt to unlock read lock, not locked by current thread > > at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockException(ReentrantReadWriteLock.java:447) > > at java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(ReentrantReadWriteLock.java:431) > > at java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(AbstractQueuedSynchronizer.java:1340) > > at java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(ReentrantReadWriteLock.java:883) > > at org.apache.stratos.common.concurrent.locks.ReadWriteLock.releaseReadLock(ReadWriteLock.java:199) > > at org.apache.stratos.messaging.message.receiver.topology.TopologyManager.releaseReadLockForService(TopologyManager.java:144) > > > > …. > > > > [2015-02-24 23:06:07,706] INFO - [CartridgeAgentEventPublisher] Starting health statistics notifierException in thread "Thread-1" java.lang.RuntimeException: Could not parse thrift client configuration > > at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfigParser.parse(ThriftClientConfigParser.java:136) at org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java:44) > > at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:56) at org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPHealthStatisticsPublisher.<init>(WSO2CEPHealthStatisticsPublisher.java:43) at org.apache.stratos.common.statistics.publisher.HealthStatisticsPublisherFactory.createHealthStatisticsPublisher(HealthStatisticsPublisherFactory.java:31) at org.apache.stratos.cartridge.agent.statistics.publisher.HealthStatisticsNotifier.<init>(HealthStatisticsNotifier.java:45) at org.apache.stratos.cartridge.agent.event.publisher.CartridgeAgentEventPublisher.publishInstanceActivatedEvent(CartridgeAgentEventPublisher.java:129) > > at org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:171) > > at java.lang.Thread.run(Thread.java:745)Caused by: java.lang.NullPointerException > > at java.io.File.<init>(File.java:277) > > > > > > From: Chamila De Alwis [mailto:chami...@wso2.com] > Sent: Friday, February 20, 2015 1:36 PM > To: dev > Subject: [Discuss] Java Cartridge Agent Improvements > > > > Hi, > > > > I'm in the process of getting the JCA to a matching state with the PCA. As a part of this I copied over the integration test that was written by Imesh for the PCA, to simplify error checks and find bugs in the JCA. > > > > There was an issue in the CartridgeEventListener where TopologyManager.acquireReadLock() was called after a conditional return statement. The lock is released in the finally{} block and thus it executes before the return statement completes, i.e. before actually acquiring the lock. > > > > Another issue I've found so far is the -Dthrift.client.config.file.path system property and the thrift-client-config.xml being missing in the Cartridge agent product assembly. > > > > I will soon submit a PR with a stable JCA. > > > > Any feedback, ideas are appreciated! :) > > > > Regards, > > Chamila de Alwis > > Software Engineer | WSO2 | +94772207163 > > Blog: code.chamiladealwis.com > > > >