Thanks Martin! I'll check the agent against these values. Regarding the
thrift-receiver-config, it seems the puppet related changes have been
missed from the PR I submitted. The file location is passed as a system
property from stratos.sh, and it replaces the earlier thrift.receiver.ip
and thrift.receiver.port values. I'll correct these and will submit a fix
soon.


Regards,
Chamila de Alwis
Software Engineer | WSO2 | +94772207163
Blog: code.chamiladealwis.com



On Wed, Feb 25, 2015 at 11:07 AM, Martin Eppel (meppel) <mep...@cisco.com>
wrote:

>  Here is are the launch-params for the agent:
>
>
>
>
> APPLICATION_ID=cisco-sample,GROUP_NAME=null,SERVICE_NAME=cisco-sample-vm,HOST_NAME=
> csco-sample-cartridge.qmog.cisco.com
> ,MULTITENANT=false,TENANT_ID=-1234,TENANT_RANGE=*,CARTRIDGE_ALIAS=csco-sample-cartridge,CLUSTER_ID=csco-sample-cartridge.cisco-sample-vm.domain,CARTRIDGE_KEY=59oVoKLQX0wuLeii,DEPLOYMENT=default,APPLICATION_PATH=/var/www,REPO_URL=null,PORTS=22,PROVIDER=cisco,PUPPET_IP=PUPPET_IP,PUPPET_HOSTNAME=PUPPET_HOSTNAME,PUPPET_DNS_AVAILABLE=null,PUPPET_ENV=false,,,DEPENDENCY_CLUSTER_IDS=,EXPORT_METADATA_KEYS=,IMPORT_METADATA_KEYS=,TRUSTSTORE_PASSWORD=wso2carbon,SIMPLE_PROPERTY=value,QTCM_DNS_SEGMENT=,CEP_PORT=7611,MONITORING_SERVER_SECURE_PORT=7711,CEP_ADMIN_PASSWORD=admin,MB_PORT=1883,MB_IP=
> octl.qmog.cisco.com,QTCM_NETWORK_COUNT=1,CEP_IP=octl.qmog.cisco.com
> ,ENABLE_DATA_PUBLISHER=false,MONITORING_SERVER_ADMIN_PASSWORD=admin,MONITORING_SERVER_IP=
> octl.qmog.cisco.com
> ,CEP_ADMIN_USERNAME=admin,CERT_TRUSTSTORE=/opt/apache-stratos-cartridge-agent/security/client-truststore.jks,MONITORING_SERVER_ADMIN_USERNAME=admin,MONITORING_SERVER_PORT=7611,TOKEN=eyJhbGciOiJSUzI1NiJ9.eyJleHAiOi0xMDk3NDA3ODEzLCJzdWIiOiJhZG1pbiIsImF6cCI6IkFkd2prS1VRMFhJSXNuNlVTM3FMTGRPTEdiWWEiLCJhcHBJZCI6ImNpc2NvLXNhbXBsZSIsImF1ZCI6WyJBZHdqa0tVUTBYSUlzbjZVUzNxTExkT0xHYllhIl0sImlzcyI6Imh0dHBzOlwvXC9sb2NhbGhvc3Q6OTQ0M1wvb2F1dGgyZW5kcG9pbnRzXC90b2tlbiIsImlhdCI6LTEwOTc0MDY4MTF9.E6yqTEgqhO3yHvdWVpcyeHWrOgRYAGMzKR_S_-o1Uz7QKay0A8Bdvew_K4kMc1FFAoLoMRVW0ndjQR6GpXiNW-oJnOadHIaDuQcZ3z2zWlHenocavj7mEjlxBUpMiOHdYCsABBPW_7xK5wJMbIiiudPqY2A9DcN-e6hCM3wi4j0,MEMBER_ID=csco-sample-cartridge.cisco-sample-vm.domain4e7a256d-9a3a-42c9-8b00-06f8fd2d5573,INSTANCE_ID=null,CLUSTER_INSTANCE_ID=cisco-sample-1,LB_CLUSTER_ID=null,NETWORK_PARTITION_ID=N1,PARTITION_ID=RegionOne-Core,INTERNAL=false,PRIMARY=false,MIN_COUNT=1
>
>
>
>
>
> Thanks
>
>
>
> Martin
>
>
>
> *From:* Martin Eppel (meppel)
> *Sent:* Tuesday, February 24, 2015 9:12 PM
> *To:* dev@stratos.apache.org
> *Subject:* RE: ISSUE: java cartridge agent throwing exception was ....RE:
> [Discuss] Java Cartridge Agent Improvements
>
>
>
> Hi Chamila,
>
>
>
> Thanks for the response :
>
>
>
> A couple of questions:
>
>
>
> Did we remove some payload parameter recently (between 4.1.0-alpha and
> now, I’ll follow up with the payload file later, probably tomorrow) ?
>
>
>
> To point to the thrift client config file I’ll have to pass the
> “thrift.client.config.file.path” property when starting up the cartridge
> agent (pointing to the directory where it is located) – is there a default
> value (from the java code it doesn’t seem so) ?
>
>
>
> Does the config file replace the previously used system properties
> “thrift.receiver.ip” and “thrift.receiver.port” ?
>
>
>
> Regards
>
>
>
> Martin
>
>
>
> *From:* Chamila De Alwis [mailto:chami...@wso2.com <chami...@wso2.com>]
> *Sent:* Tuesday, February 24, 2015 8:00 PM
> *To:* dev
> *Subject:* Re: ISSUE: java cartridge agent throwing exception was ....RE:
> [Discuss] Java Cartridge Agent Improvements
>
>
>
> 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
> >
> >
> >
> >
>

Reply via email to