You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stratos.apache.org by Ignacio Ayuste <ig...@bairesdev.com> on 2014/08/21 07:56:01 UTC

Error Starting Cartbridge Agent Manually

Hi guys, im using EC2 with one instance with docker and stratos, i created
and instance with centos and then install the puppet agent, then i copy the
cartbrige agent and try to start and give me this error:

log4j:WARN No appenders could be found for logger
(org.apache.stratos.cartridge.
agent.Main).
log4j:WARN Please initialize the log4j system properly.
[2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
enabled
 payload parameter is not found
[2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
agent
configuration initialized
[2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
[2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier event
messa
ge receiver thread started
[2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
Instan
ce notifier event message delegator started
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in
[jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in
[jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
explanation.
[2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
receiver
 thread started
[2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
event mes
sage delegator started
[2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect to
[tcp:
//localhost:61616] after: 10 attempt(s) continuing to retry.
[2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect to
[tcp:
//localhost:61616] after: 10 attempt(s) continuing to retry.

the problem is the localhost, i change the jndi.properties file and also
the script but always throw me localhost. i attached the script and
property file as an evidence.

any idea why is happening this?

Thanks
Ignacio

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
The ami was provided for my client, but the ami dont have nothing special
is a centos vainilla installation.

Thanks
Ignacio


2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Thanks for the detailed explanation Ignacio.
>
> I think we need to solve the root cause (agent etc. not getting installed
> auto-matically) here, rather than fixing current situation.
>
> Can you please explain what process you followed to create the base image
> ami-2ef39a1e?
>
>
> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Ok this is my step first for my clear the whole process im trying to
>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>> whole configuration of the install is in the docker file. Then in the
>> stratos console i run the json describe in the file *Step Configure
>> Stratos Multitenant.js* , when i run step 6 create multitenant service
>> stratos create a new instance, then i log to that instance (CentOS
>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>> (same script that is in the tutorial only i changed to download init,sh
>> from centos)* i configured puppet agent.
>>
>> this whole process install me the puppet agent but not the Cartbrige
>> Agent, that why i copy from that url and try to run manually.
>>
>> For all the process i always use the version 4.0.0
>>
>> Thanks
>> Ignacio
>>
>>
>>
>>
>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi,
>>>
>>> Is the agent purely from the link you provided? or is it also configured
>>> by puppet master? Reason for asking this is, according to the logs you sent
>>> earlier, I feel there's some inconsistency in your agent pack.
>>>
>>> If this is pure agent released in 4.0 this configuration should work.
>>>
>>>
>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Sure here it is:
>>>>
>>>>
>>>>
>>>> thanks
>>>>
>>>>
>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> I see.. so you are not using the master branch. Earlier, we had used a
>>>>> jndi.properties template file. Can you please send the
>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>>> zip to my new instance that have installed the puppet agent.
>>>>>>
>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>
>>>>>> that is correct or i need to copy the agent from the stratos instance?
>>>>>>
>>>>>> i review the code and and is try to find in the server
>>>>>>
>>>>>>     public void init(String topicName) throws Exception {
>>>>>>         InitialContext ctx;
>>>>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>>>>> File.separator + "jndi.properties");
>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>>> always returns the base context.
>>>>>>         ctx = new InitialContext(environment);
>>>>>>         // Lookup connection factory
>>>>>>         String connectionFactoryName =
>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>>>>> ctx.lookup(connectionFactoryName);
>>>>>>         // Lookup the topic
>>>>>>         try {
>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>         } catch (NamingException e) {
>>>>>>         }
>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>         topicConnection.start();
>>>>>>     }
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>>> Agent from master branch?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>> system properties section.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>>>>
>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>> agent.Main).
>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>  Commits enabled
>>>>>>>>>  payload parameter is not found
>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>> Cartridge agent
>>>>>>>>> configuration initialized
>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>>>>> started
>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>> notifier event messa
>>>>>>>>> ge receiver thread started
>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>> ce notifier event message delegator started
>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>>> an explanation.
>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>> message receiver
>>>>>>>>>  thread started
>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>> Tenant event mes
>>>>>>>>> sage delegator started
>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>
>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>> and property file as an evidence.
>>>>>>>>>
>>>>>>>>> any idea why is happening this?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi,

I am using master branch. I subscribed to mysql cartridge. I can ssh into
my mysql instance.

But agent was not started. When I start it manually, I got the following
error.

Starting cartridge agent...
[2014-08-21 10:52:23,263]  INFO - [CartridgeAgentConfiguration]  INTERNAL
payload parameter is not found
[2014-08-21 10:52:23,265] ERROR - [Main] java.lang.NullPointerException
[2014-08-21 10:52:23,276]  WARN - [EventPublisherPool] Event publisher
instance not found in pool: [topic] instance-status

Then I have added INTERNAL property to the launch-params file. But it gives
same error.

What would be the cause?

Thanks.


On Thu, Aug 21, 2014 at 12:57 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> Thanks for the detailed explanation Ignacio.
>
> I think we need to solve the root cause (agent etc. not getting installed
> auto-matically) here, rather than fixing current situation.
>
> Can you please explain what process you followed to create the base image
> ami-2ef39a1e?
>
>
> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Ok this is my step first for my clear the whole process im trying to
>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>> whole configuration of the install is in the docker file. Then in the
>> stratos console i run the json describe in the file *Step Configure
>> Stratos Multitenant.js* , when i run step 6 create multitenant service
>> stratos create a new instance, then i log to that instance (CentOS
>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>> (same script that is in the tutorial only i changed to download init,sh
>> from centos)* i configured puppet agent.
>>
>> this whole process install me the puppet agent but not the Cartbrige
>> Agent, that why i copy from that url and try to run manually.
>>
>> For all the process i always use the version 4.0.0
>>
>> Thanks
>> Ignacio
>>
>>
>>
>>
>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi,
>>>
>>> Is the agent purely from the link you provided? or is it also configured
>>> by puppet master? Reason for asking this is, according to the logs you sent
>>> earlier, I feel there's some inconsistency in your agent pack.
>>>
>>> If this is pure agent released in 4.0 this configuration should work.
>>>
>>>
>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Sure here it is:
>>>>
>>>>
>>>>
>>>> thanks
>>>>
>>>>
>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> I see.. so you are not using the master branch. Earlier, we had used a
>>>>> jndi.properties template file. Can you please send the
>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>>> zip to my new instance that have installed the puppet agent.
>>>>>>
>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>
>>>>>> that is correct or i need to copy the agent from the stratos instance?
>>>>>>
>>>>>> i review the code and and is try to find in the server
>>>>>>
>>>>>>     public void init(String topicName) throws Exception {
>>>>>>         InitialContext ctx;
>>>>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>>>>> File.separator + "jndi.properties");
>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>>> always returns the base context.
>>>>>>         ctx = new InitialContext(environment);
>>>>>>         // Lookup connection factory
>>>>>>         String connectionFactoryName =
>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>>>>> ctx.lookup(connectionFactoryName);
>>>>>>         // Lookup the topic
>>>>>>         try {
>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>         } catch (NamingException e) {
>>>>>>         }
>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>         topicConnection.start();
>>>>>>     }
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>>> Agent from master branch?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>> system properties section.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>>>>
>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>> agent.Main).
>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>  Commits enabled
>>>>>>>>>  payload parameter is not found
>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>> Cartridge agent
>>>>>>>>> configuration initialized
>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>>>>> started
>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>> notifier event messa
>>>>>>>>> ge receiver thread started
>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>> ce notifier event message delegator started
>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>>> an explanation.
>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>> message receiver
>>>>>>>>>  thread started
>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>> Tenant event mes
>>>>>>>>> sage delegator started
>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>
>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>> and property file as an evidence.
>>>>>>>>>
>>>>>>>>> any idea why is happening this?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
can you share whicj configuration problem do you have, because i still cant
start cartbrige agent sucessfully.

Thanks
Ignacio


2014-08-22 0:01 GMT-03:00 Rajkumar Rajaratnam <ra...@wso2.com>:

> Got it worked now.
>
> There were some configuration problem.
>
> No problem with master branch.
>
> Thanks.
>
>
> On Thu, Aug 21, 2014 at 9:26 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> These extensions should get copied via puppet
>> https://github.com/apache/stratos/tree/master/tools/puppet3/modules/agent/templates/extensions
>>
>>
>> On Thu, Aug 21, 2014 at 9:17 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> I used the fix and apparently have communication with stratos right now
>>> but give me two exceptions
>>>
>>> First Exception:
>>>
>>> [2014-08-21 15:32:39,692] ERROR - [ExtensionUtils] Could not execute
>>> instance st
>>> arted extension
>>> java.io.IOException: Cannot run program
>>> "/root/apache-stratos-cartridge-agent-4.
>>> 0.0/bin/./../extensions/instance-started.sh": error=2, No such file or
>>> directory
>>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>>>         at
>>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUti
>>> ls.java:74)
>>>         at
>>> org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeInstanc
>>> eStartedExtension(ExtensionUtils.java:256)
>>>         at
>>> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler
>>> .onInstanceStartedEvent(DefaultExtensionHandler.java:70)
>>>         at
>>> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.
>>> java:88)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.io.IOException: error=2, No such file or directory
>>>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>>>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>>>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>>>         ... 5 more
>>>
>>>
>>> Second Exception:
>>>
>>> [2014-08-21 15:35:24,830] ERROR - [TopologyEventMessageDelegator] Failed
>>> to retrieve topology event message
>>> com.google.gson.JsonSyntaxException: java.lang.NumberFormatException:
>>> For input string: "http"
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at com.google.gson.Gson.fromJson(Gson.java:803)
>>>         at com.google.gson.Gson.fromJson(Gson.java:768)
>>>         at com.google.gson.Gson.fromJson(Gson.java:717)
>>>         at com.google.gson.Gson.fromJson(Gson.java:689)
>>>         at
>>> org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java:38)
>>>         at
>>> org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105)
>>>         at
>>> org.apache.stratos.messaging.message.processor.topology.CompleteTopol
>>> ogyMessageProcessor.process(CompleteTopologyMessageProcessor.java:53)
>>>         at
>>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.
>>> process(MessageProcessorChain.java:60)
>>>          at
>>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventM
>>> essageDelegator.run(TopologyEventMessageDelegator.java:77)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.lang.NumberFormatException: For input string: "http"
>>>         at
>>> sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
>>>         at java.lang.Double.parseDouble(Double.java:540)
>>>         at
>>> com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239)
>>>
>>> Evidence of the stratos log receiving the message
>>>
>>> ID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO {
>>> org.apache.stratos.manager.li
>>> stener.InstanceStatusListener} -  Instance status message received
>>> {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO
>>> {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>>>  -  Instance status event message received from queue:
>>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>>
>>>  {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,968]  INFO
>>> {org.apache.stratos.manager.listener.InstanceStatusListener} -
>>>  Event class name:
>>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,969]  INFO
>>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder} -  member
>>> started event adding status started
>>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,975]  INFO
>>> {org.apache.stratos.manager.listener.InstanceStatusListener} -  Cluster id:
>>> centospuppet.stratos.domain
>>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,994]  INFO
>>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher} -
>>>  Publishing member started event: [se
>>> rvice] centos [cluster] centospuppet.stratos.domain [network-partition]
>>> ec2-region1 [partition] zone-1 [member]
>>> centospuppet.stratos.domain3053afc0-786f-4a2b-b0
>>> 27-55c36e2e68c3
>>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> -
>>>   Member started: [service] centos [cluster] centospuppet.stratos.domain
>>> [member] centospuppet.strat
>>> os.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>>> {org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>>> -
>>> [MemberStartedEventListener] Received: class
>>> org.apache.stratos.messaging.event.topology.MemberStartedEvent {
>>>
>>> org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,999]  WARN
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> -
>>>   Member already started: [service] centos [cluster]
>>> centospuppet.stratos.domain [member]
>>> centospuppet.stratos.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>>>
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>>
>>> i will try to change path for the first exception, any idea or this?
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>>
>>> 2014-08-21 11:35 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> I've just committed a fix for the NPE you and Raj reported. Could you
>>>> please take a pull and build "components/org.apache.stratos.cartridge.agent"
>>>> and then the "products/cartridge-agent" and check ?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> now i mean that only when i copy the cartbrige agent really i was
>>>>> cloning from git repository but im using the master, i checkout for the
>>>>> 4.0.0 version run maven, and then i upload
>>>>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>>>>> puppet agent, then i try to run manually and i have that problem.
>>>>>
>>>>> make sense for you?
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> I think we need to clear things up a bit here :-) Did you mean to say
>>>>>> you switch back to master branch? Is your puppet master from master branch?
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>>>>> cartbrige agent now im receiving this error:
>>>>>>>
>>>>>>> Starting cartridge agent...
>>>>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>>>>  INTERNAL payloa
>>>>>>>  d parameter is not found
>>>>>>> [2014-08-21 14:20:27,553] ERROR - [Main]
>>>>>>> java.lang.NullPointerException
>>>>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event
>>>>>>> publisher instance
>>>>>>> not found in pool: [topic] instance-status
>>>>>>>
>>>>>>> any idea?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> Hi Ignacio,
>>>>>>>>
>>>>>>>> Please follow the following guide and make the base Cartridge image
>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>>>>
>>>>>>>> You should use the AMI generated out of the above step, in your
>>>>>>>> cartridge definition (json file).
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>>>>> master* and download it from there, this is correct?
>>>>>>>>>
>>>>>>>>> If so which may be the reason that this this failing, because the
>>>>>>>>> config file run sucessfully?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>>>>
>>>>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>>>>
>>>>>>>>>> Can you please explain what process you followed to create the
>>>>>>>>>> base image ami-2ef39a1e?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Ok this is my step first for my clear the whole process im
>>>>>>>>>>> trying to configure a multitenant Cartbirge for that i run a docker in a
>>>>>>>>>>> Centos that is hosted in EC2, then in the docker image i install stratos
>>>>>>>>>>> 4.0.0 the whole configuration of the install is in the docker file. Then in
>>>>>>>>>>> the stratos console i run the json describe in the file *Step
>>>>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>>>>
>>>>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>>>>
>>>>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Ignacio
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>>>>
>>>>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>>>>> work.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Sure here it is:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> thanks
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we
>>>>>>>>>>>>>> had used a jndi.properties template file. Can you please send the
>>>>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> i donwload the agent from this url, i build with maven and
>>>>>>>>>>>>>>> copy the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>>>>> instance?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>>>>         try {
>>>>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>>>>         }
>>>>>>>>>>>>>>>         topicConnection =
>>>>>>>>>>>>>>> connFactory.createTopicConnection();
>>>>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>>>>     }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>>> Cartridge agent started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>>> Instance notifier event messa
>>>>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>>> SLF4J: See
>>>>>>>>>>>>>>>>>> http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>>>>>>>>>>>>> explanation.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> the problem is the localhost, i change the
>>>>>>>>>>>>>>>>>> jndi.properties file and also the script but always throw me localhost. i
>>>>>>>>>>>>>>>>>> attached the script and property file as an evidence.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>
>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>
>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Software Engineer | WSO2, Inc.
>  Mobile +94777568639 | +94783498120
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Great!


On Fri, Aug 22, 2014 at 8:31 AM, Rajkumar Rajaratnam <ra...@wso2.com>
wrote:

> Got it worked now.
>
> There were some configuration problem.
>
> No problem with master branch.
>
> Thanks.
>
>
> On Thu, Aug 21, 2014 at 9:26 PM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> These extensions should get copied via puppet
>> https://github.com/apache/stratos/tree/master/tools/puppet3/modules/agent/templates/extensions
>>
>>
>> On Thu, Aug 21, 2014 at 9:17 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> I used the fix and apparently have communication with stratos right now
>>> but give me two exceptions
>>>
>>> First Exception:
>>>
>>> [2014-08-21 15:32:39,692] ERROR - [ExtensionUtils] Could not execute
>>> instance st
>>> arted extension
>>> java.io.IOException: Cannot run program
>>> "/root/apache-stratos-cartridge-agent-4.
>>> 0.0/bin/./../extensions/instance-started.sh": error=2, No such file or
>>> directory
>>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>>>         at
>>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUti
>>> ls.java:74)
>>>         at
>>> org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeInstanc
>>> eStartedExtension(ExtensionUtils.java:256)
>>>         at
>>> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler
>>> .onInstanceStartedEvent(DefaultExtensionHandler.java:70)
>>>         at
>>> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.
>>> java:88)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.io.IOException: error=2, No such file or directory
>>>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>>>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>>>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>>>         ... 5 more
>>>
>>>
>>> Second Exception:
>>>
>>> [2014-08-21 15:35:24,830] ERROR - [TopologyEventMessageDelegator] Failed
>>> to retrieve topology event message
>>> com.google.gson.JsonSyntaxException: java.lang.NumberFormatException:
>>> For input string: "http"
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
>>>         at
>>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>>         at
>>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>>         at com.google.gson.Gson.fromJson(Gson.java:803)
>>>         at com.google.gson.Gson.fromJson(Gson.java:768)
>>>         at com.google.gson.Gson.fromJson(Gson.java:717)
>>>         at com.google.gson.Gson.fromJson(Gson.java:689)
>>>         at
>>> org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java:38)
>>>         at
>>> org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105)
>>>         at
>>> org.apache.stratos.messaging.message.processor.topology.CompleteTopol
>>> ogyMessageProcessor.process(CompleteTopologyMessageProcessor.java:53)
>>>         at
>>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.
>>> process(MessageProcessorChain.java:60)
>>>          at
>>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventM
>>> essageDelegator.run(TopologyEventMessageDelegator.java:77)
>>>         at java.lang.Thread.run(Thread.java:745)
>>> Caused by: java.lang.NumberFormatException: For input string: "http"
>>>         at
>>> sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
>>>         at java.lang.Double.parseDouble(Double.java:540)
>>>         at
>>> com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178)
>>>         at
>>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239)
>>>
>>> Evidence of the stratos log receiving the message
>>>
>>> ID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO {
>>> org.apache.stratos.manager.li
>>> stener.InstanceStatusListener} -  Instance status message received
>>> {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO
>>> {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>>>  -  Instance status event message received from queue:
>>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>>
>>>  {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,968]  INFO
>>> {org.apache.stratos.manager.listener.InstanceStatusListener} -
>>>  Event class name:
>>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,969]  INFO
>>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder} -  member
>>> started event adding status started
>>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,975]  INFO
>>> {org.apache.stratos.manager.listener.InstanceStatusListener} -  Cluster id:
>>> centospuppet.stratos.domain
>>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,994]  INFO
>>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher} -
>>>  Publishing member started event: [se
>>> rvice] centos [cluster] centospuppet.stratos.domain [network-partition]
>>> ec2-region1 [partition] zone-1 [member]
>>> centospuppet.stratos.domain3053afc0-786f-4a2b-b0
>>> 27-55c36e2e68c3
>>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> -
>>>   Member started: [service] centos [cluster] centospuppet.stratos.domain
>>> [member] centospuppet.strat
>>> os.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>>> {org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>>> -
>>> [MemberStartedEventListener] Received: class
>>> org.apache.stratos.messaging.event.topology.MemberStartedEvent {
>>>
>>> org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>>> TID: [0] [STRATOS] [2014-08-21 15:33:15,999]  WARN
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>> -
>>>   Member already started: [service] centos [cluster]
>>> centospuppet.stratos.domain [member]
>>> centospuppet.stratos.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>>>
>>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>>
>>> i will try to change path for the first exception, any idea or this?
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>>
>>> 2014-08-21 11:35 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> I've just committed a fix for the NPE you and Raj reported. Could you
>>>> please take a pull and build "components/org.apache.stratos.cartridge.agent"
>>>> and then the "products/cartridge-agent" and check ?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> now i mean that only when i copy the cartbrige agent really i was
>>>>> cloning from git repository but im using the master, i checkout for the
>>>>> 4.0.0 version run maven, and then i upload
>>>>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>>>>> puppet agent, then i try to run manually and i have that problem.
>>>>>
>>>>> make sense for you?
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> I think we need to clear things up a bit here :-) Did you mean to say
>>>>>> you switch back to master branch? Is your puppet master from master branch?
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>>>>> cartbrige agent now im receiving this error:
>>>>>>>
>>>>>>> Starting cartridge agent...
>>>>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>>>>  INTERNAL payloa
>>>>>>>  d parameter is not found
>>>>>>> [2014-08-21 14:20:27,553] ERROR - [Main]
>>>>>>> java.lang.NullPointerException
>>>>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event
>>>>>>> publisher instance
>>>>>>> not found in pool: [topic] instance-status
>>>>>>>
>>>>>>> any idea?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> Hi Ignacio,
>>>>>>>>
>>>>>>>> Please follow the following guide and make the base Cartridge image
>>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>>>>
>>>>>>>> You should use the AMI generated out of the above step, in your
>>>>>>>> cartridge definition (json file).
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>>>>> master* and download it from there, this is correct?
>>>>>>>>>
>>>>>>>>> If so which may be the reason that this this failing, because the
>>>>>>>>> config file run sucessfully?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>>>>
>>>>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>>>>
>>>>>>>>>> Can you please explain what process you followed to create the
>>>>>>>>>> base image ami-2ef39a1e?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Ok this is my step first for my clear the whole process im
>>>>>>>>>>> trying to configure a multitenant Cartbirge for that i run a docker in a
>>>>>>>>>>> Centos that is hosted in EC2, then in the docker image i install stratos
>>>>>>>>>>> 4.0.0 the whole configuration of the install is in the docker file. Then in
>>>>>>>>>>> the stratos console i run the json describe in the file *Step
>>>>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>>>>
>>>>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>>>>
>>>>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Ignacio
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>>>>
>>>>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>>>>> work.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Sure here it is:
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> thanks
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we
>>>>>>>>>>>>>> had used a jndi.properties template file. Can you please send the
>>>>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> i donwload the agent from this url, i build with maven and
>>>>>>>>>>>>>>> copy the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>>>>> instance?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>>>>         try {
>>>>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>>>>         }
>>>>>>>>>>>>>>>         topicConnection =
>>>>>>>>>>>>>>> connFactory.createTopicConnection();
>>>>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>>>>     }
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>>> Cartridge agent started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>>> Instance notifier event messa
>>>>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>>> SLF4J: See
>>>>>>>>>>>>>>>>>> http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>>>>>>>>>>>>> explanation.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> the problem is the localhost, i change the
>>>>>>>>>>>>>>>>>> jndi.properties file and also the script but always throw me localhost. i
>>>>>>>>>>>>>>>>>> attached the script and property file as an evidence.
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>
>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>
>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Rajkumar Rajaratnam
> Software Engineer | WSO2, Inc.
>  Mobile +94777568639 | +94783498120
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Got it worked now.

There were some configuration problem.

No problem with master branch.

Thanks.


On Thu, Aug 21, 2014 at 9:26 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> These extensions should get copied via puppet
> https://github.com/apache/stratos/tree/master/tools/puppet3/modules/agent/templates/extensions
>
>
> On Thu, Aug 21, 2014 at 9:17 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> I used the fix and apparently have communication with stratos right now
>> but give me two exceptions
>>
>> First Exception:
>>
>> [2014-08-21 15:32:39,692] ERROR - [ExtensionUtils] Could not execute
>> instance st
>> arted extension
>> java.io.IOException: Cannot run program
>> "/root/apache-stratos-cartridge-agent-4.
>> 0.0/bin/./../extensions/instance-started.sh": error=2, No such file or
>> directory
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>>         at
>> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUti
>> ls.java:74)
>>         at
>> org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeInstanc
>> eStartedExtension(ExtensionUtils.java:256)
>>         at
>> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler
>> .onInstanceStartedEvent(DefaultExtensionHandler.java:70)
>>         at
>> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.
>> java:88)
>>         at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.io.IOException: error=2, No such file or directory
>>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>>         ... 5 more
>>
>>
>> Second Exception:
>>
>> [2014-08-21 15:35:24,830] ERROR - [TopologyEventMessageDelegator] Failed
>> to retrieve topology event message
>> com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For
>> input string: "http"
>>         at
>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
>>         at
>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
>>         at
>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>         at
>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
>>         at
>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>         at
>> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>>         at
>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
>>         at
>> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>>         at
>> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>>         at com.google.gson.Gson.fromJson(Gson.java:803)
>>         at com.google.gson.Gson.fromJson(Gson.java:768)
>>         at com.google.gson.Gson.fromJson(Gson.java:717)
>>         at com.google.gson.Gson.fromJson(Gson.java:689)
>>         at
>> org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java:38)
>>         at
>> org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105)
>>         at
>> org.apache.stratos.messaging.message.processor.topology.CompleteTopol
>> ogyMessageProcessor.process(CompleteTopologyMessageProcessor.java:53)
>>         at
>> org.apache.stratos.messaging.message.processor.MessageProcessorChain.
>> process(MessageProcessorChain.java:60)
>>          at
>> org.apache.stratos.messaging.message.receiver.topology.TopologyEventM
>> essageDelegator.run(TopologyEventMessageDelegator.java:77)
>>         at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.lang.NumberFormatException: For input string: "http"
>>         at
>> sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
>>         at java.lang.Double.parseDouble(Double.java:540)
>>         at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178)
>>         at
>> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239)
>>
>> Evidence of the stratos log receiving the message
>>
>> ID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO {
>> org.apache.stratos.manager.li
>> stener.InstanceStatusListener} -  Instance status message received
>> {org.apache.stratos.manager.listener.InstanceStatusListener}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO
>> {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>>  -  Instance status event message received from queue:
>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>
>>  {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,968]  INFO
>> {org.apache.stratos.manager.listener.InstanceStatusListener} -
>>  Event class name:
>> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,969]  INFO
>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder} -  member
>> started event adding status started
>> {org.apache.stratos.cloud.controller.topology.TopologyBuilder}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,975]  INFO
>> {org.apache.stratos.manager.listener.InstanceStatusListener} -  Cluster id:
>> centospuppet.stratos.domain
>>  {org.apache.stratos.manager.listener.InstanceStatusListener}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,994]  INFO
>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher} -
>>  Publishing member started event: [se
>> rvice] centos [cluster] centospuppet.stratos.domain [network-partition]
>> ec2-region1 [partition] zone-1 [member]
>> centospuppet.stratos.domain3053afc0-786f-4a2b-b0
>> 27-55c36e2e68c3
>> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>> -
>>   Member started: [service] centos [cluster] centospuppet.stratos.domain
>> [member] centospuppet.strat
>> os.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
>> {org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>> -
>> [MemberStartedEventListener] Received: class
>> org.apache.stratos.messaging.event.topology.MemberStartedEvent {
>>
>> org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
>> TID: [0] [STRATOS] [2014-08-21 15:33:15,999]  WARN
>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>> -
>>   Member already started: [service] centos [cluster]
>> centospuppet.stratos.domain [member]
>> centospuppet.stratos.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>>
>> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>>
>> i will try to change path for the first exception, any idea or this?
>>
>> Thanks
>> Ignacio
>>
>>
>>
>> 2014-08-21 11:35 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> I've just committed a fix for the NPE you and Raj reported. Could you
>>> please take a pull and build "components/org.apache.stratos.cartridge.agent"
>>> and then the "products/cartridge-agent" and check ?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> now i mean that only when i copy the cartbrige agent really i was
>>>> cloning from git repository but im using the master, i checkout for the
>>>> 4.0.0 version run maven, and then i upload
>>>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>>>> puppet agent, then i try to run manually and i have that problem.
>>>>
>>>> make sense for you?
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Hi,
>>>>>
>>>>> I think we need to clear things up a bit here :-) Did you mean to say
>>>>> you switch back to master branch? Is your puppet master from master branch?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>>>> cartbrige agent now im receiving this error:
>>>>>>
>>>>>> Starting cartridge agent...
>>>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>>>  INTERNAL payloa
>>>>>>  d parameter is not found
>>>>>> [2014-08-21 14:20:27,553] ERROR - [Main]
>>>>>> java.lang.NullPointerException
>>>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event
>>>>>> publisher instance
>>>>>> not found in pool: [topic] instance-status
>>>>>>
>>>>>> any idea?
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Hi Ignacio,
>>>>>>>
>>>>>>> Please follow the following guide and make the base Cartridge image
>>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>>>
>>>>>>> You should use the AMI generated out of the above step, in your
>>>>>>> cartridge definition (json file).
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>>>> master* and download it from there, this is correct?
>>>>>>>>
>>>>>>>> If so which may be the reason that this this failing, because the
>>>>>>>> config file run sucessfully?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Ignacio
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>>
>>>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>>>
>>>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>>>
>>>>>>>>> Can you please explain what process you followed to create the
>>>>>>>>> base image ami-2ef39a1e?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>
>>>>>>>>>> Ok this is my step first for my clear the whole process im trying
>>>>>>>>>> to configure a multitenant Cartbirge for that i run a docker in a Centos
>>>>>>>>>> that is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>>>>>> stratos console i run the json describe in the file *Step
>>>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>>>
>>>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>>>
>>>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Ignacio
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <nirmal070125@gmail.com
>>>>>>>>>> >:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>>>
>>>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>>>> work.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Sure here it is:
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> thanks
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> i donwload the agent from this url, i build with maven and
>>>>>>>>>>>>>> copy the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>>>> instance?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>>>         try {
>>>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>>>         }
>>>>>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>>>     }
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>> Cartridge agent started
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>>> Instance notifier event messa
>>>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>>> SLF4J: See
>>>>>>>>>>>>>>>>> http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>>>>>>>>>>>> explanation.
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to
>>>>>>>>>>>>>>>>> retry.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>
>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Nirmal
>>>>>>>>>>>
>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>
>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
Mobile +94777568639 | +94783498120

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
These extensions should get copied via puppet
https://github.com/apache/stratos/tree/master/tools/puppet3/modules/agent/templates/extensions


On Thu, Aug 21, 2014 at 9:17 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> I used the fix and apparently have communication with stratos right now
> but give me two exceptions
>
> First Exception:
>
> [2014-08-21 15:32:39,692] ERROR - [ExtensionUtils] Could not execute
> instance st
> arted extension
> java.io.IOException: Cannot run program
> "/root/apache-stratos-cartridge-agent-4.
> 0.0/bin/./../extensions/instance-started.sh": error=2, No such file or
> directory
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
>         at
> org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUti
> ls.java:74)
>         at
> org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeInstanc
> eStartedExtension(ExtensionUtils.java:256)
>         at
> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler
> .onInstanceStartedEvent(DefaultExtensionHandler.java:70)
>         at
> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.
> java:88)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.io.IOException: error=2, No such file or directory
>         at java.lang.UNIXProcess.forkAndExec(Native Method)
>         at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
>         at java.lang.ProcessImpl.start(ProcessImpl.java:130)
>         at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
>         ... 5 more
>
>
> Second Exception:
>
> [2014-08-21 15:35:24,830] ERROR - [TopologyEventMessageDelegator] Failed
> to retrieve topology event message
> com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For
> input string: "http"
>         at
> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
>         at
> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
>         at
> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>         at
> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
>         at
> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>         at
> com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
>         at
> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
>         at
> com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
>         at
> com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
>         at com.google.gson.Gson.fromJson(Gson.java:803)
>         at com.google.gson.Gson.fromJson(Gson.java:768)
>         at com.google.gson.Gson.fromJson(Gson.java:717)
>         at com.google.gson.Gson.fromJson(Gson.java:689)
>         at
> org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java:38)
>         at
> org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105)
>         at
> org.apache.stratos.messaging.message.processor.topology.CompleteTopol
> ogyMessageProcessor.process(CompleteTopologyMessageProcessor.java:53)
>         at
> org.apache.stratos.messaging.message.processor.MessageProcessorChain.
> process(MessageProcessorChain.java:60)
>         at
> org.apache.stratos.messaging.message.receiver.topology.TopologyEventM
> essageDelegator.run(TopologyEventMessageDelegator.java:77)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NumberFormatException: For input string: "http"
>         at
> sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
>         at java.lang.Double.parseDouble(Double.java:540)
>         at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178)
>         at
> com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239)
>
> Evidence of the stratos log receiving the message
>
> ID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO {
> org.apache.stratos.manager.li
> stener.InstanceStatusListener} -  Instance status message received
> {org.apache.stratos.manager.listener.InstanceStatusListener}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO
> {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
>  -  Instance status event message received from queue:
> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>
>  {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,968]  INFO
> {org.apache.stratos.manager.listener.InstanceStatusListener} -
>  Event class name:
> org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
>  {org.apache.stratos.manager.listener.InstanceStatusListener}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,969]  INFO
> {org.apache.stratos.cloud.controller.topology.TopologyBuilder} -  member
> started event adding status started
> {org.apache.stratos.cloud.controller.topology.TopologyBuilder}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,975]  INFO
> {org.apache.stratos.manager.listener.InstanceStatusListener} -  Cluster id:
> centospuppet.stratos.domain
>  {org.apache.stratos.manager.listener.InstanceStatusListener}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,994]  INFO
> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher} -
>  Publishing member started event: [se
> rvice] centos [cluster] centospuppet.stratos.domain [network-partition]
> ec2-region1 [partition] zone-1 [member]
> centospuppet.stratos.domain3053afc0-786f-4a2b-b0
> 27-55c36e2e68c3
> {org.apache.stratos.cloud.controller.topology.TopologyEventPublisher}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
> -
>   Member started: [service] centos [cluster] centospuppet.stratos.domain
> [member] centospuppet.strat
> os.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
> {org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
> -
> [MemberStartedEventListener] Received: class
> org.apache.stratos.messaging.event.topology.MemberStartedEvent {
>
> org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
> TID: [0] [STRATOS] [2014-08-21 15:33:15,999]  WARN
> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
> -
>   Member already started: [service] centos [cluster]
> centospuppet.stratos.domain [member]
> centospuppet.stratos.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
>
> {org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
>
> i will try to change path for the first exception, any idea or this?
>
> Thanks
> Ignacio
>
>
>
> 2014-08-21 11:35 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> I've just committed a fix for the NPE you and Raj reported. Could you
>> please take a pull and build "components/org.apache.stratos.cartridge.agent"
>> and then the "products/cartridge-agent" and check ?
>>
>>
>> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> now i mean that only when i copy the cartbrige agent really i was
>>> cloning from git repository but im using the master, i checkout for the
>>> 4.0.0 version run maven, and then i upload
>>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>>> puppet agent, then i try to run manually and i have that problem.
>>>
>>> make sense for you?
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> Hi,
>>>>
>>>> I think we need to clear things up a bit here :-) Did you mean to say
>>>> you switch back to master branch? Is your puppet master from master branch?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>>> cartbrige agent now im receiving this error:
>>>>>
>>>>> Starting cartridge agent...
>>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>>  INTERNAL payloa
>>>>>  d parameter is not found
>>>>> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
>>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
>>>>> instance
>>>>> not found in pool: [topic] instance-status
>>>>>
>>>>> any idea?
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>>
>>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Hi Ignacio,
>>>>>>
>>>>>> Please follow the following guide and make the base Cartridge image
>>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>>
>>>>>> You should use the AMI generated out of the above step, in your
>>>>>> cartridge definition (json file).
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>>> master* and download it from there, this is correct?
>>>>>>>
>>>>>>> If so which may be the reason that this this failing, because the
>>>>>>> config file run sucessfully?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>>
>>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>>
>>>>>>>> Can you please explain what process you followed to create the base
>>>>>>>> image ami-2ef39a1e?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> Ok this is my step first for my clear the whole process im trying
>>>>>>>>> to configure a multitenant Cartbirge for that i run a docker in a Centos
>>>>>>>>> that is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>>>>> stratos console i run the json describe in the file *Step
>>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>>
>>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>>
>>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>>
>>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>>> work.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Sure here it is:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> thanks
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> i donwload the agent from this url, i build with maven and
>>>>>>>>>>>>> copy the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>>
>>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>>> instance?
>>>>>>>>>>>>>
>>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>>
>>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>>         try {
>>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>>         }
>>>>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>>     }
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>>
>>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent]
>>>>>>>>>>>>>>>> Cartridge agent started
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>>> SLF4J: See
>>>>>>>>>>>>>>>> http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>>>>>>>>>>> explanation.
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport]
>>>>>>>>>>>>>>>> Failed to connect to [tcp:
>>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> --
>>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>
>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>
>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
I used the fix and apparently have communication with stratos right now but
give me two exceptions

First Exception:

[2014-08-21 15:32:39,692] ERROR - [ExtensionUtils] Could not execute
instance st
arted extension
java.io.IOException: Cannot run program
"/root/apache-stratos-cartridge-agent-4.
0.0/bin/./../extensions/instance-started.sh": error=2, No such file or
directory
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
        at
org.apache.stratos.common.util.CommandUtils.executeCommand(CommandUti
ls.java:74)
        at
org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeInstanc
eStartedExtension(ExtensionUtils.java:256)
        at
org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler
.onInstanceStartedEvent(DefaultExtensionHandler.java:70)
        at
org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.
java:88)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: error=2, No such file or directory
        at java.lang.UNIXProcess.forkAndExec(Native Method)
        at java.lang.UNIXProcess.<init>(UNIXProcess.java:186)
        at java.lang.ProcessImpl.start(ProcessImpl.java:130)
        at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028)
        ... 5 more


Second Exception:

[2014-08-21 15:35:24,830] ERROR - [TopologyEventMessageDelegator] Failed to
retrieve topology event message
com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: For
input string: "http"
        at
com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:241)
        at
com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:231)
        at
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
        at
com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:186)
        at
com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at
com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
        at
com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187)
        at
com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93)
        at
com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        at com.google.gson.Gson.fromJson(Gson.java:768)
        at com.google.gson.Gson.fromJson(Gson.java:717)
        at com.google.gson.Gson.fromJson(Gson.java:689)
        at
org.apache.stratos.messaging.message.JsonMessage.<init>(JsonMessage.java:38)
        at
org.apache.stratos.messaging.util.Util.jsonToObject(Util.java:105)
        at
org.apache.stratos.messaging.message.processor.topology.CompleteTopol
ogyMessageProcessor.process(CompleteTopologyMessageProcessor.java:53)
        at
org.apache.stratos.messaging.message.processor.MessageProcessorChain.
process(MessageProcessorChain.java:60)
        at
org.apache.stratos.messaging.message.receiver.topology.TopologyEventM
essageDelegator.run(TopologyEventMessageDelegator.java:77)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NumberFormatException: For input string: "http"
        at
sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1250)
        at java.lang.Double.parseDouble(Double.java:540)
        at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1178)
        at
com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239)

Evidence of the stratos log receiving the message

ID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO {
org.apache.stratos.manager.li
stener.InstanceStatusListener} -  Instance status message received
{org.apache.stratos.manager.listener.InstanceStatusListener}
TID: [0] [STRATOS] [2014-08-21 15:33:15,967]  INFO
{org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
 -  Instance status event message received from queue:
org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
 {org.apache.stratos.cloud.controller.topic.instance.status.InstanceStatusEventMessageDelegator}
TID: [0] [STRATOS] [2014-08-21 15:33:15,968]  INFO
{org.apache.stratos.manager.listener.InstanceStatusListener} -
 Event class name:
org.apache.stratos.messaging.event.instance.status.InstanceStartedEvent
 {org.apache.stratos.manager.listener.InstanceStatusListener}
TID: [0] [STRATOS] [2014-08-21 15:33:15,969]  INFO
{org.apache.stratos.cloud.controller.topology.TopologyBuilder} -  member
started event adding status started
{org.apache.stratos.cloud.controller.topology.TopologyBuilder}
TID: [0] [STRATOS] [2014-08-21 15:33:15,975]  INFO
{org.apache.stratos.manager.listener.InstanceStatusListener} -  Cluster id:
centospuppet.stratos.domain
 {org.apache.stratos.manager.listener.InstanceStatusListener}
TID: [0] [STRATOS] [2014-08-21 15:33:15,994]  INFO
{org.apache.stratos.cloud.controller.topology.TopologyEventPublisher} -
 Publishing member started event: [se
rvice] centos [cluster] centospuppet.stratos.domain [network-partition]
ec2-region1 [partition] zone-1 [member]
centospuppet.stratos.domain3053afc0-786f-4a2b-b0
27-55c36e2e68c3
{org.apache.stratos.cloud.controller.topology.TopologyEventPublisher}
TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
{org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
-
  Member started: [service] centos [cluster] centospuppet.stratos.domain
[member] centospuppet.strat
os.domain3053afc0-786f-4a2b-b027-55c36e2e68c3
{org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
TID: [0] [STRATOS] [2014-08-21 15:33:15,998]  INFO
{org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
-
[MemberStartedEventListener] Received: class
org.apache.stratos.messaging.event.topology.MemberStartedEvent {
org.apache.stratos.manager.topology.receiver.StratosManagerTopologyEventReceiver}
TID: [0] [STRATOS] [2014-08-21 15:33:15,999]  WARN
{org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}
-
  Member already started: [service] centos [cluster]
centospuppet.stratos.domain [member]
centospuppet.stratos.domain3053afc0-786f-4a2b-b027-55c36e2e68c3

{org.apache.stratos.messaging.message.processor.topology.MemberStartedMessageProcessor}

i will try to change path for the first exception, any idea or this?

Thanks
Ignacio



2014-08-21 11:35 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> I've just committed a fix for the NPE you and Raj reported. Could you
> please take a pull and build "components/org.apache.stratos.cartridge.agent"
> and then the "products/cartridge-agent" and check ?
>
>
> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> now i mean that only when i copy the cartbrige agent really i was cloning
>> from git repository but im using the master, i checkout for the 4.0.0
>> version run maven, and then i upload
>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>> puppet agent, then i try to run manually and i have that problem.
>>
>> make sense for you?
>>
>> Thanks
>> Ignacio
>>
>>
>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi,
>>>
>>> I think we need to clear things up a bit here :-) Did you mean to say
>>> you switch back to master branch? Is your puppet master from master branch?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>> cartbrige agent now im receiving this error:
>>>>
>>>> Starting cartridge agent...
>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>  INTERNAL payloa
>>>>  d parameter is not found
>>>> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
>>>> instance
>>>> not found in pool: [topic] instance-status
>>>>
>>>> any idea?
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>>
>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Hi Ignacio,
>>>>>
>>>>> Please follow the following guide and make the base Cartridge image
>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>
>>>>> You should use the AMI generated out of the above step, in your
>>>>> cartridge definition (json file).
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>> master* and download it from there, this is correct?
>>>>>>
>>>>>> If so which may be the reason that this this failing, because the
>>>>>> config file run sucessfully?
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>
>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>
>>>>>>> Can you please explain what process you followed to create the base
>>>>>>> image ami-2ef39a1e?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> Ok this is my step first for my clear the whole process im trying
>>>>>>>> to configure a multitenant Cartbirge for that i run a docker in a Centos
>>>>>>>> that is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>>>> stratos console i run the json describe in the file *Step
>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>
>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>
>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Ignacio
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>
>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>> work.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>
>>>>>>>>>> Sure here it is:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> thanks
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <nirmal070125@gmail.com
>>>>>>>>>> >:
>>>>>>>>>>
>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> i donwload the agent from this url, i build with maven and copy
>>>>>>>>>>>> the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>
>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>> instance?
>>>>>>>>>>>>
>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>
>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>         try {
>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>         }
>>>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>     }
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>>>>>> agent started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>>>>>> for an explanation.
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>
>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Nirmal
>>>>>>>>>>>
>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>
>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Rajkumar Rajaratnam <ra...@wso2.com>.
Hi,

I have debugged it.

Seems system properties are not set, even though we are passing system
properties via stratos.sh

Root cause is at this function in CartridgeAgentConfiguration.java

    private Map<String, String> loadParametersFile() {
        Map<String, String> parameters = new HashMap<String, String>();
        try {

            // read launch params
            File file = new
File(System.getProperty(CartridgeAgentConstants.PARAM_FILE_PATH));
            if (!file.exists()) {
                log.warn(String.format("File not found: %s",
CartridgeAgentConstants.PARAM_FILE_PATH));
                return parameters;
            }
            Scanner scanner = new Scanner(file);
            while (scanner.hasNextLine()) {
                String line = scanner.nextLine();
                String[] params = line.split(",");
                for (String string : params) {
                    if (string != null) {
                        String[] var = string.split("=");
                        if (var.length >= 2) {
                            parameters.put(var[0], var[1]);
                        }
                    }
                }
            }
            scanner.close();
        } catch (Exception e) {
            String message = "Could not read launch parameter file, hence
trying to read from System properties.";
            log.warn(message, e);
        }

        return parameters;
    }

System property param.file.path is null. So this function returns null.
Actually function is not reading launch-params file. That is the reason why
me and Ignacio got the same error even if we define those parameter in
launch-params file.

Any idea why system properties are not set?

Thanks.


On Thu, Aug 21, 2014 at 8:05 PM, Nirmal Fernando <ni...@gmail.com>
wrote:

> I've just committed a fix for the NPE you and Raj reported. Could you
> please take a pull and build "components/org.apache.stratos.cartridge.agent"
> and then the "products/cartridge-agent" and check ?
>
>
> On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> now i mean that only when i copy the cartbrige agent really i was cloning
>> from git repository but im using the master, i checkout for the 4.0.0
>> version run maven, and then i upload
>> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
>> puppet agent, then i try to run manually and i have that problem.
>>
>> make sense for you?
>>
>> Thanks
>> Ignacio
>>
>>
>> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi,
>>>
>>> I think we need to clear things up a bit here :-) Did you mean to say
>>> you switch back to master branch? Is your puppet master from master branch?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>>> cartbrige agent now im receiving this error:
>>>>
>>>> Starting cartridge agent...
>>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>>  INTERNAL payloa
>>>>  d parameter is not found
>>>> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
>>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
>>>> instance
>>>> not found in pool: [topic] instance-status
>>>>
>>>> any idea?
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>>
>>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Hi Ignacio,
>>>>>
>>>>> Please follow the following guide and make the base Cartridge image
>>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>>
>>>>> You should use the AMI generated out of the above step, in your
>>>>> cartridge definition (json file).
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> When the *cartbrige agent* is installed on the instance? I
>>>>>> understand that the *puppet agent* should connect to the *puppet
>>>>>> master* and download it from there, this is correct?
>>>>>>
>>>>>> If so which may be the reason that this this failing, because the
>>>>>> config file run sucessfully?
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>>
>>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>>
>>>>>>> Can you please explain what process you followed to create the base
>>>>>>> image ami-2ef39a1e?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> Ok this is my step first for my clear the whole process im trying
>>>>>>>> to configure a multitenant Cartbirge for that i run a docker in a Centos
>>>>>>>> that is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>>>> stratos console i run the json describe in the file *Step
>>>>>>>> Configure Stratos Multitenant.js* , when i run step 6 create
>>>>>>>> multitenant service stratos create a new instance, then i log to that
>>>>>>>> instance (CentOS instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>>> from centos)* i configured puppet agent.
>>>>>>>>
>>>>>>>> this whole process install me the puppet agent but not the
>>>>>>>> Cartbrige Agent, that why i copy from that url and try to run manually.
>>>>>>>>
>>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Ignacio
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>>
>>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>>> work.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>
>>>>>>>>>> Sure here it is:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> thanks
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <nirmal070125@gmail.com
>>>>>>>>>> >:
>>>>>>>>>>
>>>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> i donwload the agent from this url, i build with maven and copy
>>>>>>>>>>>> the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>>
>>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>>> instance?
>>>>>>>>>>>>
>>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>>
>>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>>         Properties environment =
>>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT,
>>>>>>>>>>>> "true"); // always returns the base context.
>>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>>         try {
>>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>>         }
>>>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>>     }
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>>>>>> agent started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>>>>>> for an explanation.
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> --
>>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>
>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Nirmal
>>>>>>>>>>>
>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>
>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Rajkumar Rajaratnam
Software Engineer | WSO2, Inc.
 Mobile +94777568639 | +94783498120

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
I've just committed a fix for the NPE you and Raj reported. Could you
please take a pull and build "components/org.apache.stratos.cartridge.agent"
and then the "products/cartridge-agent" and check ?


On Thu, Aug 21, 2014 at 8:01 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> now i mean that only when i copy the cartbrige agent really i was cloning
> from git repository but im using the master, i checkout for the 4.0.0
> version run maven, and then i upload
> the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
> puppet agent, then i try to run manually and i have that problem.
>
> make sense for you?
>
> Thanks
> Ignacio
>
>
> 2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> Hi,
>>
>> I think we need to clear things up a bit here :-) Did you mean to say you
>> switch back to master branch? Is your puppet master from master branch?
>>
>>
>> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Hi you have right i was using MASTER instead version 4.0.0 in my
>>> cartbrige agent now im receiving this error:
>>>
>>> Starting cartridge agent...
>>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]
>>>  INTERNAL payloa
>>>  d parameter is not found
>>> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
>>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
>>> instance
>>> not found in pool: [topic] instance-status
>>>
>>> any idea?
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>>
>>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> Hi Ignacio,
>>>>
>>>> Please follow the following guide and make the base Cartridge image
>>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>>
>>>> You should use the AMI generated out of the above step, in your
>>>> cartridge definition (json file).
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> When the *cartbrige agent* is installed on the instance? I understand
>>>>> that the *puppet agent* should connect to the *puppet master* and
>>>>> download it from there, this is correct?
>>>>>
>>>>> If so which may be the reason that this this failing, because the
>>>>> config file run sucessfully?
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Thanks for the detailed explanation Ignacio.
>>>>>>
>>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>>
>>>>>> Can you please explain what process you followed to create the base
>>>>>> image ami-2ef39a1e?
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> Ok this is my step first for my clear the whole process im trying to
>>>>>>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>>>>>>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>>> stratos console i run the json describe in the file *Step Configure
>>>>>>> Stratos Multitenant.js* , when i run step 6 create multitenant
>>>>>>> service stratos create a new instance, then i log to that instance (CentOS
>>>>>>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>>> from centos)* i configured puppet agent.
>>>>>>>
>>>>>>> this whole process install me the puppet agent but not the Cartbrige
>>>>>>> Agent, that why i copy from that url and try to run manually.
>>>>>>>
>>>>>>> For all the process i always use the version 4.0.0
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>>
>>>>>>>> If this is pure agent released in 4.0 this configuration should
>>>>>>>> work.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> Sure here it is:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> thanks
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> i donwload the agent from this url, i build with maven and copy
>>>>>>>>>>> the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>>
>>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>>
>>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>>> instance?
>>>>>>>>>>>
>>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>>
>>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>>         Properties environment =
>>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true");
>>>>>>>>>>> // always returns the base context.
>>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>>         try {
>>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>>         }
>>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>>     }
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Ignacio
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <
>>>>>>>>>>> nirmal070125@gmail.com>:
>>>>>>>>>>>
>>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi,
>>>>>>>>>>>>>
>>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh
>>>>>>>>>>>>> file's system properties section.
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>>> error:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>>>>> agent started
>>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>>>>> for an explanation.
>>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>>
>>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>
>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>
>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
now i mean that only when i copy the cartbrige agent really i was cloning
from git repository but im using the master, i checkout for the 4.0.0
version run maven, and then i upload
the apache-stratos-cartridge-agent-4.0.0.zip to my instance that have the
puppet agent, then i try to run manually and i have that problem.

make sense for you?

Thanks
Ignacio


2014-08-21 11:25 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Hi,
>
> I think we need to clear things up a bit here :-) Did you mean to say you
> switch back to master branch? Is your puppet master from master branch?
>
>
> On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Hi you have right i was using MASTER instead version 4.0.0 in my
>> cartbrige agent now im receiving this error:
>>
>> Starting cartridge agent...
>> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]  INTERNAL
>> payloa
>>  d parameter is not found
>> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
>> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
>> instance
>> not found in pool: [topic] instance-status
>>
>> any idea?
>>
>> Thanks
>> Ignacio
>>
>>
>>
>> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi Ignacio,
>>>
>>> Please follow the following guide and make the base Cartridge image
>>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>>
>>> You should use the AMI generated out of the above step, in your
>>> cartridge definition (json file).
>>>
>>>
>>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> When the *cartbrige agent* is installed on the instance? I understand
>>>> that the *puppet agent* should connect to the *puppet master* and
>>>> download it from there, this is correct?
>>>>
>>>> If so which may be the reason that this this failing, because the
>>>> config file run sucessfully?
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Thanks for the detailed explanation Ignacio.
>>>>>
>>>>> I think we need to solve the root cause (agent etc. not getting
>>>>> installed auto-matically) here, rather than fixing current situation.
>>>>>
>>>>> Can you please explain what process you followed to create the base
>>>>> image ami-2ef39a1e?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> Ok this is my step first for my clear the whole process im trying to
>>>>>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>>>>>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>>> whole configuration of the install is in the docker file. Then in the
>>>>>> stratos console i run the json describe in the file *Step Configure
>>>>>> Stratos Multitenant.js* , when i run step 6 create multitenant
>>>>>> service stratos create a new instance, then i log to that instance (CentOS
>>>>>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>>> from centos)* i configured puppet agent.
>>>>>>
>>>>>> this whole process install me the puppet agent but not the Cartbrige
>>>>>> Agent, that why i copy from that url and try to run manually.
>>>>>>
>>>>>> For all the process i always use the version 4.0.0
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Hi,
>>>>>>>
>>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>>
>>>>>>> If this is pure agent released in 4.0 this configuration should work.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> Sure here it is:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> thanks
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>>
>>>>>>>> I see.. so you are not using the master branch. Earlier, we had
>>>>>>>>> used a jndi.properties template file. Can you please send the
>>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>
>>>>>>>>>> i donwload the agent from this url, i build with maven and copy
>>>>>>>>>> the zip to my new instance that have installed the puppet agent.
>>>>>>>>>>
>>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>>
>>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>>> instance?
>>>>>>>>>>
>>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>>
>>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>>         InitialContext ctx;
>>>>>>>>>>         Properties environment =
>>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true");
>>>>>>>>>> // always returns the base context.
>>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>>         // Lookup connection factory
>>>>>>>>>>         String connectionFactoryName =
>>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>>         // Lookup the topic
>>>>>>>>>>         try {
>>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>>         }
>>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>>         topicConnection.start();
>>>>>>>>>>     }
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Ignacio
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <nirmal070125@gmail.com
>>>>>>>>>> >:
>>>>>>>>>>
>>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi,
>>>>>>>>>>>>
>>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>>>>>> system properties section.
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>>> error:
>>>>>>>>>>>>>
>>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR -
>>>>>>>>>>>>> [CartridgeAgentConfiguration]  Commits enabled
>>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO -
>>>>>>>>>>>>> [CartridgeAgentConfiguration] Cartridge agent
>>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>>>> agent started
>>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>
>>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>>
>>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>>>> for an explanation.
>>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant
>>>>>>>>>>>>> event message receiver
>>>>>>>>>>>>>  thread started
>>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO -
>>>>>>>>>>>>> [TenantEventMessageDelegator] Tenant event mes
>>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed
>>>>>>>>>>>>> to connect to [tcp:
>>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>>
>>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties
>>>>>>>>>>>>> file and also the script but always throw me localhost. i attached the
>>>>>>>>>>>>> script and property file as an evidence.
>>>>>>>>>>>>>
>>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks
>>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>> Best Regards,
>>>>>>>>>>>> Nirmal
>>>>>>>>>>>>
>>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>>
>>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Nirmal
>>>>>>>>>>>
>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>
>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi,

I think we need to clear things up a bit here :-) Did you mean to say you
switch back to master branch? Is your puppet master from master branch?


On Thu, Aug 21, 2014 at 7:52 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> Hi you have right i was using MASTER instead version 4.0.0 in my cartbrige
> agent now im receiving this error:
>
> Starting cartridge agent...
> [2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]  INTERNAL
> payloa
> d parameter is not found
> [2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
> [2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
> instance
> not found in pool: [topic] instance-status
>
> any idea?
>
> Thanks
> Ignacio
>
>
>
> 2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> Hi Ignacio,
>>
>> Please follow the following guide and make the base Cartridge image
>> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>>
>> You should use the AMI generated out of the above step, in your cartridge
>> definition (json file).
>>
>>
>> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> When the *cartbrige agent* is installed on the instance? I understand
>>> that the *puppet agent* should connect to the *puppet master* and
>>> download it from there, this is correct?
>>>
>>> If so which may be the reason that this this failing, because the config
>>> file run sucessfully?
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> Thanks for the detailed explanation Ignacio.
>>>>
>>>> I think we need to solve the root cause (agent etc. not getting
>>>> installed auto-matically) here, rather than fixing current situation.
>>>>
>>>> Can you please explain what process you followed to create the base
>>>> image ami-2ef39a1e?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> Ok this is my step first for my clear the whole process im trying to
>>>>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>>>>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>>> whole configuration of the install is in the docker file. Then in the
>>>>> stratos console i run the json describe in the file *Step Configure
>>>>> Stratos Multitenant.js* , when i run step 6 create multitenant
>>>>> service stratos create a new instance, then i log to that instance (CentOS
>>>>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>>> (same script that is in the tutorial only i changed to download init,sh
>>>>> from centos)* i configured puppet agent.
>>>>>
>>>>> this whole process install me the puppet agent but not the Cartbrige
>>>>> Agent, that why i copy from that url and try to run manually.
>>>>>
>>>>> For all the process i always use the version 4.0.0
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Hi,
>>>>>>
>>>>>> Is the agent purely from the link you provided? or is it also
>>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>>
>>>>>> If this is pure agent released in 4.0 this configuration should work.
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> Sure here it is:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> thanks
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> I see.. so you are not using the master branch. Earlier, we had used
>>>>>>>> a jndi.properties template file. Can you please send the
>>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> i donwload the agent from this url, i build with maven and copy
>>>>>>>>> the zip to my new instance that have installed the puppet agent.
>>>>>>>>>
>>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>>
>>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>>> instance?
>>>>>>>>>
>>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>>
>>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>>         InitialContext ctx;
>>>>>>>>>         Properties environment =
>>>>>>>>> Util.getProperties(jndiPropFileDir + File.separator + "jndi.properties");
>>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true");
>>>>>>>>> // always returns the base context.
>>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>>         // Lookup connection factory
>>>>>>>>>         String connectionFactoryName =
>>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>>         // Lookup the topic
>>>>>>>>>         try {
>>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>>         } catch (NamingException e) {
>>>>>>>>>         }
>>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>>         topicConnection.start();
>>>>>>>>>     }
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>
>>>>>>>>> :
>>>>>>>>>
>>>>>>>>> Sorry, I should have asked to set correct MB_URL in
>>>>>>>>>> jndi.properties file. And AFAIS you have already done that. I'm assuming
>>>>>>>>>> you are using Agent from master branch?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>>>>> system properties section.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and
>>>>>>>>>>>> stratos, i created and instance with centos and then install the puppet
>>>>>>>>>>>> agent, then i copy the cartbrige agent and try to start and give me this
>>>>>>>>>>>> error:
>>>>>>>>>>>>
>>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>>> agent.Main).
>>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>>>>  Commits enabled
>>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>>>>> Cartridge agent
>>>>>>>>>>>> configuration initialized
>>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>>> agent started
>>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>>> notifier event messa
>>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>
>>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>>
>>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>>> for an explanation.
>>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>>>>> message receiver
>>>>>>>>>>>>  thread started
>>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>>>>> Tenant event mes
>>>>>>>>>>>> sage delegator started
>>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>>>>> connect to [tcp:
>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>>>>> connect to [tcp:
>>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>>
>>>>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>>>>> and property file as an evidence.
>>>>>>>>>>>>
>>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>> Ignacio
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Best Regards,
>>>>>>>>>>> Nirmal
>>>>>>>>>>>
>>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>>
>>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
Hi you have right i was using MASTER instead version 4.0.0 in my cartbrige
agent now im receiving this error:

Starting cartridge agent...
[2014-08-21 14:20:27,550]  INFO - [CartridgeAgentConfiguration]  INTERNAL
payloa
d parameter is not found
[2014-08-21 14:20:27,553] ERROR - [Main] java.lang.NullPointerException
[2014-08-21 14:20:27,587]  WARN - [EventPublisherPool] Event publisher
instance
not found in pool: [topic] instance-status

any idea?

Thanks
Ignacio



2014-08-21 11:18 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Hi Ignacio,
>
> Please follow the following guide and make the base Cartridge image
> https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2
>
> You should use the AMI generated out of the above step, in your cartridge
> definition (json file).
>
>
> On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> When the *cartbrige agent* is installed on the instance? I understand
>> that the *puppet agent* should connect to the *puppet master* and
>> download it from there, this is correct?
>>
>> If so which may be the reason that this this failing, because the config
>> file run sucessfully?
>>
>> Thanks
>> Ignacio
>>
>>
>> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Thanks for the detailed explanation Ignacio.
>>>
>>> I think we need to solve the root cause (agent etc. not getting
>>> installed auto-matically) here, rather than fixing current situation.
>>>
>>> Can you please explain what process you followed to create the base
>>> image ami-2ef39a1e?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Ok this is my step first for my clear the whole process im trying to
>>>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>>>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>>> whole configuration of the install is in the docker file. Then in the
>>>> stratos console i run the json describe in the file *Step Configure
>>>> Stratos Multitenant.js* , when i run step 6 create multitenant service
>>>> stratos create a new instance, then i log to that instance (CentOS
>>>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>>>> (same script that is in the tutorial only i changed to download init,sh
>>>> from centos)* i configured puppet agent.
>>>>
>>>> this whole process install me the puppet agent but not the Cartbrige
>>>> Agent, that why i copy from that url and try to run manually.
>>>>
>>>> For all the process i always use the version 4.0.0
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>>
>>>>
>>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Hi,
>>>>>
>>>>> Is the agent purely from the link you provided? or is it also
>>>>> configured by puppet master? Reason for asking this is, according to the
>>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>>
>>>>> If this is pure agent released in 4.0 this configuration should work.
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> Sure here it is:
>>>>>>
>>>>>>
>>>>>>
>>>>>> thanks
>>>>>>
>>>>>>
>>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> I see.. so you are not using the master branch. Earlier, we had used
>>>>>>> a jndi.properties template file. Can you please send the
>>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>>>>> zip to my new instance that have installed the puppet agent.
>>>>>>>>
>>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>>
>>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>>> instance?
>>>>>>>>
>>>>>>>> i review the code and and is try to find in the server
>>>>>>>>
>>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>>         InitialContext ctx;
>>>>>>>>         Properties environment = Util.getProperties(jndiPropFileDir
>>>>>>>> + File.separator + "jndi.properties");
>>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>>>>> always returns the base context.
>>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>>         // Lookup connection factory
>>>>>>>>         String connectionFactoryName =
>>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>>         // Lookup the topic
>>>>>>>>         try {
>>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>>         } catch (NamingException e) {
>>>>>>>>         }
>>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>>         topicConnection.start();
>>>>>>>>     }
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Ignacio
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>>
>>>>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>>>>> Agent from master branch?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>>>> system properties section.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>>
>>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos,
>>>>>>>>>>> i created and instance with centos and then install the puppet agent, then
>>>>>>>>>>> i copy the cartbrige agent and try to start and give me this error:
>>>>>>>>>>>
>>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>>> agent.Main).
>>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>>>  Commits enabled
>>>>>>>>>>>  payload parameter is not found
>>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>>>> Cartridge agent
>>>>>>>>>>> configuration initialized
>>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>>> agent started
>>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>>> notifier event messa
>>>>>>>>>>> ge receiver thread started
>>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>
>>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>>
>>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings
>>>>>>>>>>> for an explanation.
>>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>>>> message receiver
>>>>>>>>>>>  thread started
>>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>>>> Tenant event mes
>>>>>>>>>>> sage delegator started
>>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>>>> connect to [tcp:
>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>>>> connect to [tcp:
>>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>>
>>>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>>>> and property file as an evidence.
>>>>>>>>>>>
>>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>> Ignacio
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Best Regards,
>>>>>>>>>> Nirmal
>>>>>>>>>>
>>>>>>>>>> Nirmal Fernando.
>>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>>
>>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi Ignacio,

Please follow the following guide and make the base Cartridge image
https://cwiki.apache.org/confluence/display/STRATOS/4.0.0+Creating+a+Cartridge+on+EC2

You should use the AMI generated out of the above step, in your cartridge
definition (json file).


On Thu, Aug 21, 2014 at 6:45 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> When the *cartbrige agent* is installed on the instance? I understand
> that the *puppet agent* should connect to the *puppet master* and
> download it from there, this is correct?
>
> If so which may be the reason that this this failing, because the config
> file run sucessfully?
>
> Thanks
> Ignacio
>
>
> 2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> Thanks for the detailed explanation Ignacio.
>>
>> I think we need to solve the root cause (agent etc. not getting installed
>> auto-matically) here, rather than fixing current situation.
>>
>> Can you please explain what process you followed to create the base image
>> ami-2ef39a1e?
>>
>>
>> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Ok this is my step first for my clear the whole process im trying to
>>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>>> whole configuration of the install is in the docker file. Then in the
>>> stratos console i run the json describe in the file *Step Configure
>>> Stratos Multitenant.js* , when i run step 6 create multitenant service
>>> stratos create a new instance, then i log to that instance (CentOS
>>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>>> (same script that is in the tutorial only i changed to download init,sh
>>> from centos)* i configured puppet agent.
>>>
>>> this whole process install me the puppet agent but not the Cartbrige
>>> Agent, that why i copy from that url and try to run manually.
>>>
>>> For all the process i always use the version 4.0.0
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>>
>>>
>>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> Hi,
>>>>
>>>> Is the agent purely from the link you provided? or is it also
>>>> configured by puppet master? Reason for asking this is, according to the
>>>> logs you sent earlier, I feel there's some inconsistency in your agent pack.
>>>>
>>>> If this is pure agent released in 4.0 this configuration should work.
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> Sure here it is:
>>>>>
>>>>>
>>>>>
>>>>> thanks
>>>>>
>>>>>
>>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> I see.. so you are not using the master branch. Earlier, we had used a
>>>>>> jndi.properties template file. Can you please send the
>>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>>>> zip to my new instance that have installed the puppet agent.
>>>>>>>
>>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>>
>>>>>>> that is correct or i need to copy the agent from the stratos
>>>>>>> instance?
>>>>>>>
>>>>>>> i review the code and and is try to find in the server
>>>>>>>
>>>>>>>     public void init(String topicName) throws Exception {
>>>>>>>         InitialContext ctx;
>>>>>>>         Properties environment = Util.getProperties(jndiPropFileDir
>>>>>>> + File.separator + "jndi.properties");
>>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>>>> always returns the base context.
>>>>>>>         ctx = new InitialContext(environment);
>>>>>>>         // Lookup connection factory
>>>>>>>         String connectionFactoryName =
>>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>>         TopicConnectionFactory connFactory =
>>>>>>> (TopicConnectionFactory) ctx.lookup(connectionFactoryName);
>>>>>>>         // Lookup the topic
>>>>>>>         try {
>>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>>         } catch (NamingException e) {
>>>>>>>         }
>>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>>         topicConnection.start();
>>>>>>>     }
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>>
>>>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>>>> Agent from master branch?
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>>> system properties section.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos,
>>>>>>>>>> i created and instance with centos and then install the puppet agent, then
>>>>>>>>>> i copy the cartbrige agent and try to start and give me this error:
>>>>>>>>>>
>>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>>> agent.Main).
>>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>>  Commits enabled
>>>>>>>>>>  payload parameter is not found
>>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>>> Cartridge agent
>>>>>>>>>> configuration initialized
>>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge
>>>>>>>>>> agent started
>>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>>> notifier event messa
>>>>>>>>>> ge receiver thread started
>>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>>> ce notifier event message delegator started
>>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>
>>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>> SLF4J: Found binding in
>>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>>
>>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>>>> an explanation.
>>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>>> message receiver
>>>>>>>>>>  thread started
>>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>>> Tenant event mes
>>>>>>>>>> sage delegator started
>>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>>> connect to [tcp:
>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>>> connect to [tcp:
>>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>>
>>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>>> and property file as an evidence.
>>>>>>>>>>
>>>>>>>>>> any idea why is happening this?
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>> Ignacio
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Best Regards,
>>>>>>>>> Nirmal
>>>>>>>>>
>>>>>>>>> Nirmal Fernando.
>>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>>
>>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
When the *cartbrige agent* is installed on the instance? I understand that
the *puppet agent* should connect to the *puppet master* and download it
from there, this is correct?

If so which may be the reason that this this failing, because the config
file run sucessfully?

Thanks
Ignacio


2014-08-21 4:27 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Thanks for the detailed explanation Ignacio.
>
> I think we need to solve the root cause (agent etc. not getting installed
> auto-matically) here, rather than fixing current situation.
>
> Can you please explain what process you followed to create the base image
> ami-2ef39a1e?
>
>
> On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Ok this is my step first for my clear the whole process im trying to
>> configure a multitenant Cartbirge for that i run a docker in a Centos that
>> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
>> whole configuration of the install is in the docker file. Then in the
>> stratos console i run the json describe in the file *Step Configure
>> Stratos Multitenant.js* , when i run step 6 create multitenant service
>> stratos create a new instance, then i log to that instance (CentOS
>> instance) and using the following script *configurePuppeyAgentCentOS.sh
>> (same script that is in the tutorial only i changed to download init,sh
>> from centos)* i configured puppet agent.
>>
>> this whole process install me the puppet agent but not the Cartbrige
>> Agent, that why i copy from that url and try to run manually.
>>
>> For all the process i always use the version 4.0.0
>>
>> Thanks
>> Ignacio
>>
>>
>>
>>
>> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Hi,
>>>
>>> Is the agent purely from the link you provided? or is it also configured
>>> by puppet master? Reason for asking this is, according to the logs you sent
>>> earlier, I feel there's some inconsistency in your agent pack.
>>>
>>> If this is pure agent released in 4.0 this configuration should work.
>>>
>>>
>>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Sure here it is:
>>>>
>>>>
>>>>
>>>> thanks
>>>>
>>>>
>>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> I see.. so you are not using the master branch. Earlier, we had used a
>>>>> jndi.properties template file. Can you please send the
>>>>> conf/templates/jndi.properties.template file of your agent?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>>> zip to my new instance that have installed the puppet agent.
>>>>>>
>>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>>
>>>>>> that is correct or i need to copy the agent from the stratos instance?
>>>>>>
>>>>>> i review the code and and is try to find in the server
>>>>>>
>>>>>>     public void init(String topicName) throws Exception {
>>>>>>         InitialContext ctx;
>>>>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>>>>> File.separator + "jndi.properties");
>>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>>> always returns the base context.
>>>>>>         ctx = new InitialContext(environment);
>>>>>>         // Lookup connection factory
>>>>>>         String connectionFactoryName =
>>>>>> environment.get("connectionfactoryName").toString();
>>>>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>>>>> ctx.lookup(connectionFactoryName);
>>>>>>         // Lookup the topic
>>>>>>         try {
>>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>>         } catch (NamingException e) {
>>>>>>         }
>>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>>         topicConnection.start();
>>>>>>     }
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>>
>>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>>> Agent from master branch?
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>>> system properties section.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>>
>>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>>>>
>>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>>> agent.Main).
>>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>>  Commits enabled
>>>>>>>>>  payload parameter is not found
>>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>>> Cartridge agent
>>>>>>>>> configuration initialized
>>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>>>>> started
>>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>>> notifier event messa
>>>>>>>>> ge receiver thread started
>>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>>> ce notifier event message delegator started
>>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: Found binding in
>>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>>
>>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>>> an explanation.
>>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>>> message receiver
>>>>>>>>>  thread started
>>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>>> Tenant event mes
>>>>>>>>> sage delegator started
>>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>>> connect to [tcp:
>>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>>
>>>>>>>>> the problem is the localhost, i change the jndi.properties file
>>>>>>>>> and also the script but always throw me localhost. i attached the script
>>>>>>>>> and property file as an evidence.
>>>>>>>>>
>>>>>>>>> any idea why is happening this?
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>> Ignacio
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Best Regards,
>>>>>>>> Nirmal
>>>>>>>>
>>>>>>>> Nirmal Fernando.
>>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>>
>>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Thanks for the detailed explanation Ignacio.

I think we need to solve the root cause (agent etc. not getting installed
auto-matically) here, rather than fixing current situation.

Can you please explain what process you followed to create the base image
ami-2ef39a1e?


On Thu, Aug 21, 2014 at 12:40 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> Ok this is my step first for my clear the whole process im trying to
> configure a multitenant Cartbirge for that i run a docker in a Centos that
> is hosted in EC2, then in the docker image i install stratos 4.0.0 the
> whole configuration of the install is in the docker file. Then in the
> stratos console i run the json describe in the file *Step Configure
> Stratos Multitenant.js* , when i run step 6 create multitenant service
> stratos create a new instance, then i log to that instance (CentOS
> instance) and using the following script *configurePuppeyAgentCentOS.sh
> (same script that is in the tutorial only i changed to download init,sh
> from centos)* i configured puppet agent.
>
> this whole process install me the puppet agent but not the Cartbrige
> Agent, that why i copy from that url and try to run manually.
>
> For all the process i always use the version 4.0.0
>
> Thanks
> Ignacio
>
>
>
>
> 2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> Hi,
>>
>> Is the agent purely from the link you provided? or is it also configured
>> by puppet master? Reason for asking this is, according to the logs you sent
>> earlier, I feel there's some inconsistency in your agent pack.
>>
>> If this is pure agent released in 4.0 this configuration should work.
>>
>>
>> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Sure here it is:
>>>
>>>
>>>
>>> thanks
>>>
>>>
>>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> I see.. so you are not using the master branch. Earlier, we had used a
>>>> jndi.properties template file. Can you please send the
>>>> conf/templates/jndi.properties.template file of your agent?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> i donwload the agent from this url, i build with maven and copy the
>>>>> zip to my new instance that have installed the puppet agent.
>>>>>
>>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>>
>>>>> that is correct or i need to copy the agent from the stratos instance?
>>>>>
>>>>> i review the code and and is try to find in the server
>>>>>
>>>>>     public void init(String topicName) throws Exception {
>>>>>         InitialContext ctx;
>>>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>>>> File.separator + "jndi.properties");
>>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>>> always returns the base context.
>>>>>         ctx = new InitialContext(environment);
>>>>>         // Lookup connection factory
>>>>>         String connectionFactoryName =
>>>>> environment.get("connectionfactoryName").toString();
>>>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>>>> ctx.lookup(connectionFactoryName);
>>>>>         // Lookup the topic
>>>>>         try {
>>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>>         } catch (NamingException e) {
>>>>>         }
>>>>>         topicConnection = connFactory.createTopicConnection();
>>>>>         topicConnection.start();
>>>>>     }
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>>
>>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>>> Agent from master branch?
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>>> nirmal070125@gmail.com> wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>>> system properties section.
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>>
>>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>>>
>>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>>> (org.apache.stratos.cartridge.
>>>>>>>> agent.Main).
>>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>>  Commits enabled
>>>>>>>>  payload parameter is not found
>>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>>> Cartridge agent
>>>>>>>> configuration initialized
>>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>>>> started
>>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance
>>>>>>>> notifier event messa
>>>>>>>> ge receiver thread started
>>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>>> ce notifier event message delegator started
>>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>>> SLF4J: Found binding in
>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>
>>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>> SLF4J: Found binding in
>>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>>
>>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for
>>>>>>>> an explanation.
>>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>>> message receiver
>>>>>>>>  thread started
>>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>>> Tenant event mes
>>>>>>>> sage delegator started
>>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>>> connect to [tcp:
>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>>> connect to [tcp:
>>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>>
>>>>>>>> the problem is the localhost, i change the jndi.properties file and
>>>>>>>> also the script but always throw me localhost. i attached the script and
>>>>>>>> property file as an evidence.
>>>>>>>>
>>>>>>>> any idea why is happening this?
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Ignacio
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Best Regards,
>>>>>>> Nirmal
>>>>>>>
>>>>>>> Nirmal Fernando.
>>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>>
>>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
Ok this is my step first for my clear the whole process im trying to
configure a multitenant Cartbirge for that i run a docker in a Centos that
is hosted in EC2, then in the docker image i install stratos 4.0.0 the
whole configuration of the install is in the docker file. Then in the
stratos console i run the json describe in the file *Step Configure Stratos
Multitenant.js* , when i run step 6 create multitenant service stratos
create a new instance, then i log to that instance (CentOS instance) and
using the following script *configurePuppeyAgentCentOS.sh (same script that
is in the tutorial only i changed to download init,sh from centos)* i
configured puppet agent.

this whole process install me the puppet agent but not the Cartbrige Agent,
that why i copy from that url and try to run manually.

For all the process i always use the version 4.0.0

Thanks
Ignacio




2014-08-21 3:58 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Hi,
>
> Is the agent purely from the link you provided? or is it also configured
> by puppet master? Reason for asking this is, according to the logs you sent
> earlier, I feel there's some inconsistency in your agent pack.
>
> If this is pure agent released in 4.0 this configuration should work.
>
>
> On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Sure here it is:
>>
>>
>>
>> thanks
>>
>>
>> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> I see.. so you are not using the master branch. Earlier, we had used a
>>> jndi.properties template file. Can you please send the
>>> conf/templates/jndi.properties.template file of your agent?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> i donwload the agent from this url, i build with maven and copy the zip
>>>> to my new instance that have installed the puppet agent.
>>>>
>>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>>
>>>> that is correct or i need to copy the agent from the stratos instance?
>>>>
>>>> i review the code and and is try to find in the server
>>>>
>>>>     public void init(String topicName) throws Exception {
>>>>         InitialContext ctx;
>>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>>> File.separator + "jndi.properties");
>>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>>> always returns the base context.
>>>>         ctx = new InitialContext(environment);
>>>>         // Lookup connection factory
>>>>         String connectionFactoryName =
>>>> environment.get("connectionfactoryName").toString();
>>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>>> ctx.lookup(connectionFactoryName);
>>>>         // Lookup the topic
>>>>         try {
>>>>             setTopic((Topic) ctx.lookup(topicName));
>>>>         } catch (NamingException e) {
>>>>         }
>>>>         topicConnection = connFactory.createTopicConnection();
>>>>         topicConnection.start();
>>>>     }
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>>
>>>>
>>>>
>>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>>
>>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>>> Agent from master branch?
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>>> nirmal070125@gmail.com> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> You need to add the correct mb_url in Agent's stratos.sh file's
>>>>>> system properties section.
>>>>>>
>>>>>>
>>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>>
>>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>>
>>>>>>> log4j:WARN No appenders could be found for logger
>>>>>>> (org.apache.stratos.cartridge.
>>>>>>> agent.Main).
>>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>>  Commits enabled
>>>>>>>  payload parameter is not found
>>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>>> Cartridge agent
>>>>>>> configuration initialized
>>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>>> started
>>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>>>>>> event messa
>>>>>>> ge receiver thread started
>>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>>> ce notifier event message delegator started
>>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>
>>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: Found binding in
>>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>>
>>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>>> explanation.
>>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>>> message receiver
>>>>>>>  thread started
>>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>>> Tenant event mes
>>>>>>> sage delegator started
>>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>>> connect to [tcp:
>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>>> connect to [tcp:
>>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>>
>>>>>>> the problem is the localhost, i change the jndi.properties file and
>>>>>>> also the script but always throw me localhost. i attached the script and
>>>>>>> property file as an evidence.
>>>>>>>
>>>>>>> any idea why is happening this?
>>>>>>>
>>>>>>> Thanks
>>>>>>> Ignacio
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards,
>>>>>> Nirmal
>>>>>>
>>>>>> Nirmal Fernando.
>>>>>> PPMC Member & Committer of Apache Stratos,
>>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>>
>>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi,

Is the agent purely from the link you provided? or is it also configured by
puppet master? Reason for asking this is, according to the logs you sent
earlier, I feel there's some inconsistency in your agent pack.

If this is pure agent released in 4.0 this configuration should work.


On Thu, Aug 21, 2014 at 12:19 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> Sure here it is:
>
>
>
> thanks
>
>
> 2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> I see.. so you are not using the master branch. Earlier, we had used a
>> jndi.properties template file. Can you please send the
>> conf/templates/jndi.properties.template file of your agent?
>>
>>
>> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> i donwload the agent from this url, i build with maven and copy the zip
>>> to my new instance that have installed the puppet agent.
>>>
>>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>>
>>> that is correct or i need to copy the agent from the stratos instance?
>>>
>>> i review the code and and is try to find in the server
>>>
>>>     public void init(String topicName) throws Exception {
>>>         InitialContext ctx;
>>>         Properties environment = Util.getProperties(jndiPropFileDir +
>>> File.separator + "jndi.properties");
>>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>>> always returns the base context.
>>>         ctx = new InitialContext(environment);
>>>         // Lookup connection factory
>>>         String connectionFactoryName =
>>> environment.get("connectionfactoryName").toString();
>>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>>> ctx.lookup(connectionFactoryName);
>>>         // Lookup the topic
>>>         try {
>>>             setTopic((Topic) ctx.lookup(topicName));
>>>         } catch (NamingException e) {
>>>         }
>>>         topicConnection = connFactory.createTopicConnection();
>>>         topicConnection.start();
>>>     }
>>>
>>> Thanks
>>> Ignacio
>>>
>>>
>>>
>>>
>>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>>
>>> Sorry, I should have asked to set correct MB_URL in jndi.properties
>>>> file. And AFAIS you have already done that. I'm assuming you are using
>>>> Agent from master branch?
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>>> nirmal070125@gmail.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> You need to add the correct mb_url in Agent's stratos.sh file's system
>>>>> properties section.
>>>>>
>>>>>
>>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>>
>>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>>> created and instance with centos and then install the puppet agent, then i
>>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>>
>>>>>> log4j:WARN No appenders could be found for logger
>>>>>> (org.apache.stratos.cartridge.
>>>>>> agent.Main).
>>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>>  Commits enabled
>>>>>>  payload parameter is not found
>>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>>> Cartridge agent
>>>>>> configuration initialized
>>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>>> started
>>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>>>>> event messa
>>>>>> ge receiver thread started
>>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>>> ce notifier event message delegator started
>>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>>> SLF4J: Found binding in
>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>
>>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>> SLF4J: Found binding in
>>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>>
>>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>>> explanation.
>>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>>> message receiver
>>>>>>  thread started
>>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator]
>>>>>> Tenant event mes
>>>>>> sage delegator started
>>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>>> connect to [tcp:
>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>>> connect to [tcp:
>>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>>
>>>>>> the problem is the localhost, i change the jndi.properties file and
>>>>>> also the script but always throw me localhost. i attached the script and
>>>>>> property file as an evidence.
>>>>>>
>>>>>> any idea why is happening this?
>>>>>>
>>>>>> Thanks
>>>>>> Ignacio
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Best Regards,
>>>>> Nirmal
>>>>>
>>>>> Nirmal Fernando.
>>>>> PPMC Member & Committer of Apache Stratos,
>>>>> Senior Software Engineer, WSO2 Inc.
>>>>>
>>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
Sure here it is:



thanks


2014-08-21 3:42 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> I see.. so you are not using the master branch. Earlier, we had used a
> jndi.properties template file. Can you please send the
> conf/templates/jndi.properties.template file of your agent?
>
>
> On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> i donwload the agent from this url, i build with maven and copy the zip
>> to my new instance that have installed the puppet agent.
>>
>> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>>
>> that is correct or i need to copy the agent from the stratos instance?
>>
>> i review the code and and is try to find in the server
>>
>>     public void init(String topicName) throws Exception {
>>         InitialContext ctx;
>>         Properties environment = Util.getProperties(jndiPropFileDir +
>> File.separator + "jndi.properties");
>>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); //
>> always returns the base context.
>>         ctx = new InitialContext(environment);
>>         // Lookup connection factory
>>         String connectionFactoryName =
>> environment.get("connectionfactoryName").toString();
>>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
>> ctx.lookup(connectionFactoryName);
>>         // Lookup the topic
>>         try {
>>             setTopic((Topic) ctx.lookup(topicName));
>>         } catch (NamingException e) {
>>         }
>>         topicConnection = connFactory.createTopicConnection();
>>         topicConnection.start();
>>     }
>>
>> Thanks
>> Ignacio
>>
>>
>>
>>
>> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>>
>> Sorry, I should have asked to set correct MB_URL in jndi.properties file.
>>> And AFAIS you have already done that. I'm assuming you are using Agent from
>>> master branch?
>>>
>>>
>>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <
>>> nirmal070125@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> You need to add the correct mb_url in Agent's stratos.sh file's system
>>>> properties section.
>>>>
>>>>
>>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>>> ignacio.ayuste@bairesdev.com> wrote:
>>>>
>>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>>> created and instance with centos and then install the puppet agent, then i
>>>>> copy the cartbrige agent and try to start and give me this error:
>>>>>
>>>>> log4j:WARN No appenders could be found for logger
>>>>> (org.apache.stratos.cartridge.
>>>>> agent.Main).
>>>>> log4j:WARN Please initialize the log4j system properly.
>>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>>  Commits enabled
>>>>>  payload parameter is not found
>>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>>> Cartridge agent
>>>>> configuration initialized
>>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>>> started
>>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>>>> event messa
>>>>> ge receiver thread started
>>>>> [2014-08-21 05:47:01,538]  INFO -
>>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>>> ce notifier event message delegator started
>>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>>> SLF4J: Found binding in
>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>
>>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>> SLF4J: Found binding in
>>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>>
>>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>>> explanation.
>>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event
>>>>> message receiver
>>>>>  thread started
>>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>>>>> event mes
>>>>> sage delegator started
>>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to
>>>>> connect to [tcp:
>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to
>>>>> connect to [tcp:
>>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>>
>>>>> the problem is the localhost, i change the jndi.properties file and
>>>>> also the script but always throw me localhost. i attached the script and
>>>>> property file as an evidence.
>>>>>
>>>>> any idea why is happening this?
>>>>>
>>>>> Thanks
>>>>> Ignacio
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards,
>>>> Nirmal
>>>>
>>>> Nirmal Fernando.
>>>> PPMC Member & Committer of Apache Stratos,
>>>> Senior Software Engineer, WSO2 Inc.
>>>>
>>>> Blog: http://nirmalfdo.blogspot.com/
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
I see.. so you are not using the master branch. Earlier, we had used a
jndi.properties template file. Can you please send the
conf/templates/jndi.properties.template
file of your agent?


On Thu, Aug 21, 2014 at 12:08 PM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> i donwload the agent from this url, i build with maven and copy the zip to
> my new instance that have installed the puppet agent.
>
> http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip
>
> that is correct or i need to copy the agent from the stratos instance?
>
> i review the code and and is try to find in the server
>
>     public void init(String topicName) throws Exception {
>         InitialContext ctx;
>         Properties environment = Util.getProperties(jndiPropFileDir +
> File.separator + "jndi.properties");
>         environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); // always
> returns the base context.
>         ctx = new InitialContext(environment);
>         // Lookup connection factory
>         String connectionFactoryName =
> environment.get("connectionfactoryName").toString();
>         TopicConnectionFactory connFactory = (TopicConnectionFactory)
> ctx.lookup(connectionFactoryName);
>         // Lookup the topic
>         try {
>             setTopic((Topic) ctx.lookup(topicName));
>         } catch (NamingException e) {
>         }
>         topicConnection = connFactory.createTopicConnection();
>         topicConnection.start();
>     }
>
> Thanks
> Ignacio
>
>
>
>
> 2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:
>
> Sorry, I should have asked to set correct MB_URL in jndi.properties file.
>> And AFAIS you have already done that. I'm assuming you are using Agent from
>> master branch?
>>
>>
>> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <nirmal070125@gmail.com
>> > wrote:
>>
>>> Hi,
>>>
>>> You need to add the correct mb_url in Agent's stratos.sh file's system
>>> properties section.
>>>
>>>
>>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>>> ignacio.ayuste@bairesdev.com> wrote:
>>>
>>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>>> created and instance with centos and then install the puppet agent, then i
>>>> copy the cartbrige agent and try to start and give me this error:
>>>>
>>>> log4j:WARN No appenders could be found for logger
>>>> (org.apache.stratos.cartridge.
>>>> agent.Main).
>>>> log4j:WARN Please initialize the log4j system properly.
>>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]
>>>>  Commits enabled
>>>>  payload parameter is not found
>>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>>> Cartridge agent
>>>> configuration initialized
>>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>>> started
>>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>>> event messa
>>>> ge receiver thread started
>>>> [2014-08-21 05:47:01,538]  INFO -
>>>> [InstanceNotifierEventMessageDelegator] Instan
>>>> ce notifier event message delegator started
>>>> SLF4J: Class path contains multiple SLF4J bindings.
>>>> SLF4J: Found binding in
>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>
>>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>> SLF4J: Found binding in
>>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>>
>>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>>> explanation.
>>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>>>> receiver
>>>>  thread started
>>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>>>> event mes
>>>> sage delegator started
>>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>>>> to [tcp:
>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>>>> to [tcp:
>>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>>
>>>> the problem is the localhost, i change the jndi.properties file and
>>>> also the script but always throw me localhost. i attached the script and
>>>> property file as an evidence.
>>>>
>>>> any idea why is happening this?
>>>>
>>>> Thanks
>>>> Ignacio
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards,
>>> Nirmal
>>>
>>> Nirmal Fernando.
>>> PPMC Member & Committer of Apache Stratos,
>>> Senior Software Engineer, WSO2 Inc.
>>>
>>> Blog: http://nirmalfdo.blogspot.com/
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>


-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
i donwload the agent from this url, i build with maven and copy the zip to
my new instance that have installed the puppet agent.

http://apache.dattatec.com/stratos/4.0.0/apache-stratos-4.0.0.zip

that is correct or i need to copy the agent from the stratos instance?

i review the code and and is try to find in the server

    public void init(String topicName) throws Exception {
        InitialContext ctx;
        Properties environment = Util.getProperties(jndiPropFileDir +
File.separator + "jndi.properties");
        environment.put(Constants.REQUEST_BASE_CONTEXT, "true"); // always
returns the base context.
        ctx = new InitialContext(environment);
        // Lookup connection factory
        String connectionFactoryName =
environment.get("connectionfactoryName").toString();
        TopicConnectionFactory connFactory = (TopicConnectionFactory)
ctx.lookup(connectionFactoryName);
        // Lookup the topic
        try {
            setTopic((Topic) ctx.lookup(topicName));
        } catch (NamingException e) {
        }
        topicConnection = connFactory.createTopicConnection();
        topicConnection.start();
    }

Thanks
Ignacio




2014-08-21 3:28 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Sorry, I should have asked to set correct MB_URL in jndi.properties file.
> And AFAIS you have already done that. I'm assuming you are using Agent from
> master branch?
>
>
> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> Hi,
>>
>> You need to add the correct mb_url in Agent's stratos.sh file's system
>> properties section.
>>
>>
>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>> created and instance with centos and then install the puppet agent, then i
>>> copy the cartbrige agent and try to start and give me this error:
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.apache.stratos.cartridge.
>>> agent.Main).
>>> log4j:WARN Please initialize the log4j system properly.
>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>>> enabled
>>>  payload parameter is not found
>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>> Cartridge agent
>>> configuration initialized
>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>> started
>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>> event messa
>>> ge receiver thread started
>>> [2014-08-21 05:47:01,538]  INFO -
>>> [InstanceNotifierEventMessageDelegator] Instan
>>> ce notifier event message delegator started
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>>> receiver
>>>  thread started
>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>>> event mes
>>> sage delegator started
>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>
>>> the problem is the localhost, i change the jndi.properties file and also
>>> the script but always throw me localhost. i attached the script and
>>> property file as an evidence.
>>>
>>> any idea why is happening this?
>>>
>>> Thanks
>>> Ignacio
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
On a related note, seems like with the MB_URL change, we haven't updated
the Agent product's jndi.properties file [1].

[1]
https://github.com/apache/stratos/blob/master/products/cartridge-agent/modules/distribution/src/main/bin/stratos.sh



On Thu, Aug 21, 2014 at 11:58 AM, Nirmal Fernando <ni...@gmail.com>
wrote:

> Sorry, I should have asked to set correct MB_URL in jndi.properties file.
> And AFAIS you have already done that. I'm assuming you are using Agent from
> master branch?
>
>
> On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <ni...@gmail.com>
> wrote:
>
>> Hi,
>>
>> You need to add the correct mb_url in Agent's stratos.sh file's system
>> properties section.
>>
>>
>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>> created and instance with centos and then install the puppet agent, then i
>>> copy the cartbrige agent and try to start and give me this error:
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.apache.stratos.cartridge.
>>> agent.Main).
>>> log4j:WARN Please initialize the log4j system properly.
>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>>> enabled
>>>  payload parameter is not found
>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>> Cartridge agent
>>> configuration initialized
>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>> started
>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>> event messa
>>> ge receiver thread started
>>> [2014-08-21 05:47:01,538]  INFO -
>>> [InstanceNotifierEventMessageDelegator] Instan
>>> ce notifier event message delegator started
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>>> receiver
>>>  thread started
>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>>> event mes
>>> sage delegator started
>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>
>>> the problem is the localhost, i change the jndi.properties file and also
>>> the script but always throw me localhost. i attached the script and
>>> property file as an evidence.
>>>
>>> any idea why is happening this?
>>>
>>> Thanks
>>> Ignacio
>>>
>>
>>
>>
>> --
>> Best Regards,
>> Nirmal
>>
>> Nirmal Fernando.
>> PPMC Member & Committer of Apache Stratos,
>> Senior Software Engineer, WSO2 Inc.
>>
>> Blog: http://nirmalfdo.blogspot.com/
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Sorry, I should have asked to set correct MB_URL in jndi.properties file.
And AFAIS you have already done that. I'm assuming you are using Agent from
master branch?


On Thu, Aug 21, 2014 at 11:44 AM, Nirmal Fernando <ni...@gmail.com>
wrote:

> Hi,
>
> You need to add the correct mb_url in Agent's stratos.sh file's system
> properties section.
>
>
> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Hi guys, im using EC2 with one instance with docker and stratos, i
>> created and instance with centos and then install the puppet agent, then i
>> copy the cartbrige agent and try to start and give me this error:
>>
>> log4j:WARN No appenders could be found for logger
>> (org.apache.stratos.cartridge.
>> agent.Main).
>> log4j:WARN Please initialize the log4j system properly.
>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>> enabled
>>  payload parameter is not found
>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
>> agent
>> configuration initialized
>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>> event messa
>> ge receiver thread started
>> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
>> Instan
>> ce notifier event message delegator started
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>> receiver
>>  thread started
>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>> event mes
>> sage delegator started
>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>
>> the problem is the localhost, i change the jndi.properties file and also
>> the script but always throw me localhost. i attached the script and
>> property file as an evidence.
>>
>> any idea why is happening this?
>>
>> Thanks
>> Ignacio
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
i copy and the problem still

echo "Starting cartridge agent..."
script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
lib_path=${script_path}/../lib/
class_path=`echo ${lib_path}/*.jar | tr ' ' ':'`
properties="-Dmb.ip=172.31.25.28
            -Dmb.port=61616
-Dmb_url=tcp://172.31.25.28:61616
            -Dlisten.address=localhost
            -Dthrift.receiver.ip=172.31.25.28
            -Dthrift.receiver.port=7611

-Djndi.properties.template.file.path=${script_path}/../conf/templates/jndi.properties.template
            -Djndi.properties.dir=${script_path}/../conf

-Dlog4j.properties.file.path=${script_path}/../conf/log4j.properties
            -Dextensions.dir=${script_path}/../extensions
    -Dparam.file.path=${script_path}/../payload/launch-params
            -Dcep.stats.publisher.enabled=true
            -Djavax.net.ssl.trustStore=CERT-TRUSTSTORE
            -Djavax.net.ssl.trustStorePassword=wso2carbon
    -Denable.artifact.update=true
    -Dartifact.update.interval=10
    -Denable.data.publisher=true
            -Dmonitoring.server.ip=MONITORING-SERVER-IP
    -Dmonitoring.server.port=MONITORING-SERVER-PORT
    -Dmonitoring.server.secure.port=MONITORING-SERVER-SECURE-PORT
    -Dmonitoring.server.admin.username=MONITORING-SERVER-ADMIN-USERNAME
    -Dmonitoring.server.admin.password=MONITORING-SERVER-ADMIN-PASSWORD
    -DAPP_PATH=APP-PATH"

# Uncomment below line to enable remote debugging
#debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"

java -cp "${class_path}" ${properties} ${debug}
org.apache.stratos.cartridge.agent.Main

Thanks


2014-08-21 3:14 GMT-03:00 Nirmal Fernando <ni...@gmail.com>:

> Hi,
>
> You need to add the correct mb_url in Agent's stratos.sh file's system
> properties section.
>
>
> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Hi guys, im using EC2 with one instance with docker and stratos, i
>> created and instance with centos and then install the puppet agent, then i
>> copy the cartbrige agent and try to start and give me this error:
>>
>> log4j:WARN No appenders could be found for logger
>> (org.apache.stratos.cartridge.
>> agent.Main).
>> log4j:WARN Please initialize the log4j system properly.
>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>> enabled
>>  payload parameter is not found
>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
>> agent
>> configuration initialized
>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>> event messa
>> ge receiver thread started
>> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
>> Instan
>> ce notifier event message delegator started
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>> receiver
>>  thread started
>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>> event mes
>> sage delegator started
>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>
>> the problem is the localhost, i change the jndi.properties file and also
>> the script but always throw me localhost. i attached the script and
>> property file as an evidence.
>>
>> any idea why is happening this?
>>
>> Thanks
>> Ignacio
>>
>
>
>
> --
> Best Regards,
> Nirmal
>
> Nirmal Fernando.
> PPMC Member & Committer of Apache Stratos,
> Senior Software Engineer, WSO2 Inc.
>
> Blog: http://nirmalfdo.blogspot.com/
>

Re: Error Starting Cartbridge Agent Manually

Posted by Nirmal Fernando <ni...@gmail.com>.
Hi,

You need to add the correct mb_url in Agent's stratos.sh file's system
properties section.


On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> Hi guys, im using EC2 with one instance with docker and stratos, i created
> and instance with centos and then install the puppet agent, then i copy the
> cartbrige agent and try to start and give me this error:
>
> log4j:WARN No appenders could be found for logger
> (org.apache.stratos.cartridge.
> agent.Main).
> log4j:WARN Please initialize the log4j system properly.
> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
> enabled
>  payload parameter is not found
> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
> agent
> configuration initialized
> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier event
> messa
> ge receiver thread started
> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
> Instan
> ce notifier event message delegator started
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
> receiver
>  thread started
> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
> event mes
> sage delegator started
> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect to
> [tcp:
> //localhost:61616] after: 10 attempt(s) continuing to retry.
> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect to
> [tcp:
> //localhost:61616] after: 10 attempt(s) continuing to retry.
>
> the problem is the localhost, i change the jndi.properties file and also
> the script but always throw me localhost. i attached the script and
> property file as an evidence.
>
> any idea why is happening this?
>
> Thanks
> Ignacio
>



-- 
Best Regards,
Nirmal

Nirmal Fernando.
PPMC Member & Committer of Apache Stratos,
Senior Software Engineer, WSO2 Inc.

Blog: http://nirmalfdo.blogspot.com/

Re: Error Starting Cartbridge Agent Manually

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

As Nirmal pointed out please set the correct MB URL in the stratos.sh file.
Cartridge agent tries to connect to the MB. However you have put localhost
as MB which causes the issue.


On Thu, Aug 21, 2014 at 11:46 AM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> I put the COMMIT_ENABLED=true in the launch-params and the error still
> persist, i copy the same key that i found in the java class
>
> CartridgeAgentConstants
>
> public static final String COMMIT_ENABLED = "COMMIT_ENABLED";
>
> is expected other value?
>
> Thanks
> Ignacio
>
>
>
> 2014-08-21 3:03 GMT-03:00 Udara Liyanage <ud...@wso2.com>:
>
> Hi,
>>
>> The error occurs since Commit-enabled property is not present inside
>> launch params. Cartridge agent look for value of this property.
>>
>>
>>
>> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
>> ignacio.ayuste@bairesdev.com> wrote:
>>
>>> Hi guys, im using EC2 with one instance with docker and stratos, i
>>> created and instance with centos and then install the puppet agent, then i
>>> copy the cartbrige agent and try to start and give me this error:
>>>
>>> log4j:WARN No appenders could be found for logger
>>> (org.apache.stratos.cartridge.
>>> agent.Main).
>>> log4j:WARN Please initialize the log4j system properly.
>>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>>> enabled
>>>  payload parameter is not found
>>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration]
>>> Cartridge agent
>>> configuration initialized
>>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent
>>> started
>>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>>> event messa
>>> ge receiver thread started
>>> [2014-08-21 05:47:01,538]  INFO -
>>> [InstanceNotifierEventMessageDelegator] Instan
>>> ce notifier event message delegator started
>>> SLF4J: Class path contains multiple SLF4J bindings.
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: Found binding in
>>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>>
>>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>>> explanation.
>>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>>> receiver
>>>  thread started
>>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>>> event mes
>>> sage delegator started
>>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>>> to [tcp:
>>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>>
>>> the problem is the localhost, i change the jndi.properties file and also
>>> the script but always throw me localhost. i attached the script and
>>> property file as an evidence.
>>>
>>> any idea why is happening this?
>>>
>>> Thanks
>>> Ignacio
>>>
>>
>>
>>
>> --
>>
>> Udara Liyanage
>> Software Engineer
>>  WSO2, Inc.: http://wso2.com
>> lean. enterprise. middleware
>>
>> web: http://udaraliyanage.wordpress.com
>> phone: +94 71 443 6897
>>
>
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Error Starting Cartbridge Agent Manually

Posted by Ignacio Ayuste <ig...@bairesdev.com>.
I put the COMMIT_ENABLED=true in the launch-params and the error still
persist, i copy the same key that i found in the java class

CartridgeAgentConstants

public static final String COMMIT_ENABLED = "COMMIT_ENABLED";

is expected other value?

Thanks
Ignacio



2014-08-21 3:03 GMT-03:00 Udara Liyanage <ud...@wso2.com>:

> Hi,
>
> The error occurs since Commit-enabled property is not present inside
> launch params. Cartridge agent look for value of this property.
>
>
>
> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Hi guys, im using EC2 with one instance with docker and stratos, i
>> created and instance with centos and then install the puppet agent, then i
>> copy the cartbrige agent and try to start and give me this error:
>>
>> log4j:WARN No appenders could be found for logger
>> (org.apache.stratos.cartridge.
>> agent.Main).
>> log4j:WARN Please initialize the log4j system properly.
>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>> enabled
>>  payload parameter is not found
>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
>> agent
>> configuration initialized
>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>> event messa
>> ge receiver thread started
>> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
>> Instan
>> ce notifier event message delegator started
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>> receiver
>>  thread started
>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>> event mes
>> sage delegator started
>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>
>> the problem is the localhost, i change the jndi.properties file and also
>> the script but always throw me localhost. i attached the script and
>> property file as an evidence.
>>
>> any idea why is happening this?
>>
>> Thanks
>> Ignacio
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>

Re: Error Starting Cartbridge Agent Manually

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

Small correction, COMMIT_ENABLED is the name of the property. It should has
the value either true or false. This property is added at the time of
subscription.


On Thu, Aug 21, 2014 at 11:33 AM, Udara Liyanage <ud...@wso2.com> wrote:

> Hi,
>
> The error occurs since Commit-enabled property is not present inside
> launch params. Cartridge agent look for value of this property.
>
>
>
> On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
> ignacio.ayuste@bairesdev.com> wrote:
>
>> Hi guys, im using EC2 with one instance with docker and stratos, i
>> created and instance with centos and then install the puppet agent, then i
>> copy the cartbrige agent and try to start and give me this error:
>>
>> log4j:WARN No appenders could be found for logger
>> (org.apache.stratos.cartridge.
>> agent.Main).
>> log4j:WARN Please initialize the log4j system properly.
>> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
>> enabled
>>  payload parameter is not found
>> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
>> agent
>> configuration initialized
>> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
>> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier
>> event messa
>> ge receiver thread started
>> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
>> Instan
>> ce notifier event message delegator started
>> SLF4J: Class path contains multiple SLF4J bindings.
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: Found binding in
>> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
>>
>> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
>> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
>> explanation.
>> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
>> receiver
>>  thread started
>> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
>> event mes
>> sage delegator started
>> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect
>> to [tcp:
>> //localhost:61616] after: 10 attempt(s) continuing to retry.
>>
>> the problem is the localhost, i change the jndi.properties file and also
>> the script but always throw me localhost. i attached the script and
>> property file as an evidence.
>>
>> any idea why is happening this?
>>
>> Thanks
>> Ignacio
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
>  WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Re: Error Starting Cartbridge Agent Manually

Posted by Udara Liyanage <ud...@wso2.com>.
Hi,

The error occurs since Commit-enabled property is not present inside launch
params. Cartridge agent look for value of this property.



On Thu, Aug 21, 2014 at 11:26 AM, Ignacio Ayuste <
ignacio.ayuste@bairesdev.com> wrote:

> Hi guys, im using EC2 with one instance with docker and stratos, i created
> and instance with centos and then install the puppet agent, then i copy the
> cartbrige agent and try to start and give me this error:
>
> log4j:WARN No appenders could be found for logger
> (org.apache.stratos.cartridge.
> agent.Main).
> log4j:WARN Please initialize the log4j system properly.
> [2014-08-21 05:47:01,290] ERROR - [CartridgeAgentConfiguration]  Commits
> enabled
>  payload parameter is not found
> [2014-08-21 05:47:01,293]  INFO - [CartridgeAgentConfiguration] Cartridge
> agent
> configuration initialized
> [2014-08-21 05:47:01,360]  INFO - [CartridgeAgent] Cartridge agent started
> [2014-08-21 05:47:01,497]  INFO - [CartridgeAgent] Instance notifier event
> messa
> ge receiver thread started
> [2014-08-21 05:47:01,538]  INFO - [InstanceNotifierEventMessageDelegator]
> Instan
> ce notifier event message delegator started
> SLF4J: Class path contains multiple SLF4J bindings.
> SLF4J: Found binding in
> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
> PSHOT/lib/slf4j-1.5.10.wso2v1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: Found binding in
> [jar:file:/root/apache-stratos-cartridge-agent-4.0.0-SNA
> PSHOT/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.
> [2014-08-21 05:47:01,819]  INFO - [CartridgeAgent] Tenant event message
> receiver
>  thread started
> [2014-08-21 05:47:01,824]  INFO - [TenantEventMessageDelegator] Tenant
> event mes
> sage delegator started
> [2014-08-21 05:47:07,637]  WARN - [FailoverTransport] Failed to connect to
> [tcp:
> //localhost:61616] after: 10 attempt(s) continuing to retry.
> [2014-08-21 05:47:07,638]  WARN - [FailoverTransport] Failed to connect to
> [tcp:
> //localhost:61616] after: 10 attempt(s) continuing to retry.
>
> the problem is the localhost, i change the jndi.properties file and also
> the script but always throw me localhost. i attached the script and
> property file as an evidence.
>
> any idea why is happening this?
>
> Thanks
> Ignacio
>



-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897