Hi Imesh,
Yes it lb was using andes. I changed it to ActiveMQ and lb now work. Now I
can create cartridge, then create tenant and subscribe to that cartridge
from UI. Also I can see active instance of tomcat created from Stratos UI.
However Tomcat is not started in the cartridge instance. When I see
/var/log/stratos_init.log there is no sign of failures. I have attached
that file here. When I see tomcat log it says
---
/mnt/apache-tomcat-7.0.52/bin/catalina.sh: 1: eval: /opt/java/bin/java: not
found
----

>From stratos_init.log below I suspect Tomcat is started before Java is
ready in the instance.

-------
[[0;36mnotice:
/Stage[main]/Tomcat/File[/mnt/apache-tomcat-7.0.52/conf/server.xml]/content:
content changed '{md5}243c711930a975db7507077c41bde651' to
'{md5}49939d8265ce59858f59d0e9dbc8ed39'^[[0m
^[[0;36mnotice: /Stage[main]/Tomcat/Exec[Set tomcat home
permission]/returns: executed successfully^[[0m
^[[0;36mnotice: /Stage[main]/Tomcat/Exec[Start tomcat]/returns: executed
successfully^[[0m
--------
When I log into the cartidge instance and manually start Tomcat it work
fine.

I tried this several times and each time result is same.

Regarding my puppet installation, I copied all files from puppet3/manifests
and puppet3/modules from RC1 source to my old puppet setup configured and
restarted puppet master.

Damitha


Damitha, are you trying with ActiveMQ?
For me it looks like you are using andes client to connect to ActiveMQ. Can
you please verify?
May be we could move this discussion to release [Discuss] thread.

Thanks


On Sun, Apr 27, 2014 at 4:57 PM, damitha kumarage <damith...@gmail.com>wrote:
I downlaoded tested the binary packs with Openstack/Docker IaaS, server
starts, deployed partion, policies and tomcat cartridge. When subscribed I
get following error in lb log. Note that I run lb as standalone, not as a
cartridge.

---------------------------

[2014-04-27 11:21:47,378]  INFO - TopicSubscriber Will try to subscribe
again in 30 sec
[2014-04-27 11:21:47,381] ERROR - AMQStateManager Notifying
Waiters([org.wso2.andes.client.state.StateWaiter@6636e83b]) for
error:Exception thrown against AMQConnection:
Host: 192.168.57.30
Port: 61616
Virtual Host: carbon
Client ID: carbon
Active session count: 0: org.wso2.andes.AMQDisconnectedException: Server
closed connection and reconnection not permitted.
[2014-04-27 11:21:47,384] ERROR - AMQConnection Throwable Received but no
listener set: org.wso2.andes.AMQDisconnectedException: Server closed
connection and reconnection not permitted.
[2014-04-27 11:21:47,382] ERROR - TopicSubscriber Error while subscribing
to the topic: topology
javax.jms.JMSException: Error creating connection: Unable to Connect
    at
org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:325)
    at
org.wso2.andes.client.AMQConnectionFactory.createTopicConnection(AMQConnectionFactory.java:429)
    at
org.apache.stratos.messaging.broker.connect.TopicConnector.init(TopicConnector.java:68)
    at
org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.doSubscribe(TopicSubscriber.java:63)
    at
org.apache.stratos.messaging.broker.subscribe.TopicSubscriber.run(TopicSubscriber.java:116)
    at java.lang.Thread.run(Thread.java:662)
Caused by: org.wso2.andes.AMQConnectionFailureException: Unable to Connect
    at org.wso2.andes.client.AMQConnection.<init>(AMQConnection.java:475)
    at
org.wso2.andes.client.AMQConnectionFactory.createConnection(AMQConnectionFactory.java:315)
    ... 5 more
[2014-04-27 11:21:47,387]  INFO - TopicSubscriber Will try to subscribe
again in 30 sec


--------------------------------------

Damitha



On Thu, Apr 24, 2014 at 11:23 PM, Imesh Gunaratne <im...@apache.org> wrote:

> Hi All,
>
> This thread is for discussion of the first release candidate of Apache
> Stratos 4.0.0-incubating [1]. Please use this thread for discussion of
> issues uncovered in the RC, questions you may have about the RC, etc.
>
> The RC release packs could be found here [1]. A git tag
> (4.0.0-incubating-rc1) [2] has been created for this release and its tree
> view could be seen here [3].
>
> [1]
> https://dist.apache.org/repos/dist/dev/incubator/stratos/releases/4.0.0-incubating-rc1/
> [2]
> https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=tag;h=cd5f427d4c77380ae24c85971c3d7a1a1c4497b3
> [3]
> https://git-wip-us.apache.org/repos/asf?p=incubator-stratos.git;a=tree;h=refs/tags/4.0.0-incubating-rc1;hb=refs/tags/4.0.0-incubating-rc1
>
> Thanks
>
>
> --
> Imesh Gunaratne
>
> Technical Lead, WSO2
> Committer & PPMC Member, Apache Stratos
>



-- 
__________________________________________________________________
Damitha Kumarage
http://people.apache.org/
__________________________________________________________________
Removing all existing certificates ..

Node Id 896229041439.default.tomcat


Domain puppet.stratos.org

 * Restarting puppet agent

puppet not configured to start, please edit /etc/default/puppet to enable
   ...done.
info: Creating a new SSL key for 896229041439.default.tomcat.puppet.stratos.org
info: Caching certificate for ca
info: Creating a new SSL certificate request for 896229041439.default.tomcat.puppet.stratos.org
info: Certificate Request fingerprint (md5): 09:AC:F4:11:FF:E6:13:1D:F6:D7:CB:E0:0D:E6:1E:16
err: Could not request certificate: Could not intern from s: nested asn1 error
Exiting; failed to retrieve certificate and waitforcert is disabled
info: Caching certificate for 896229041439.default.tomcat.puppet.stratos.org
info: Caching certificate_revocation_list for ca
info: Caching catalog for 896229041439.default.tomcat.puppet.stratos.org
info: Applying configuration version '1398755091'
notice: /Stage[main]/Java/File[/etc/profile.d/java_home.sh]/ensure: created
notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/Exec[creating_local_package_repo_for_cartridge-agent]/returns: executed successfully
notice: /Stage[main]/Tomcat/File[/mnt/tomcat]/ensure: defined content as '{md5}6b3353403430f6149df7a01f52176019'
notice: /Stage[main]/Tomcat/File[//mnt/packs/apache-tomcat-7.0.52.tar.gz]/ensure: defined content as '{md5}3d780939cc4fce1661e7411bbd640c09'
notice: /Stage[main]/Tomcat/Exec[Extract tomcat package]/returns: executed successfully
notice: /Stage[main]/Tomcat/File[/mnt/apache-tomcat-7.0.52/conf/server.xml]/content: 
--- /mnt/apache-tomcat-7.0.52/conf/server.xml	2014-02-13 07:31:17.000000000 +0000
+++ /tmp/puppet-file20140429-166-13hbi16-0	2014-04-29 07:36:12.313467856 +0000
@@ -65,7 +65,7 @@
          Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
          Java AJP  Connector: /docs/config/ajp.html
          APR (HTTP/AJP) Connector: /docs/apr.html
-         Define a non-SSL HTTP/1.1 Connector on port 8080
+         Define a non-SSL HTTP/1.1 Connector on port 9090
     -->
     <Connector port="8080" protocol="HTTP/1.1"
                connectionTimeout="20000"
@@ -73,7 +73,7 @@
     <!-- A "Connector" using the shared thread pool-->
     <!--
     <Connector executor="tomcatThreadPool"
-               port="8080" protocol="HTTP/1.1"
+               port="9090" protocol="HTTP/1.1"
                connectionTimeout="20000"
                redirectPort="8443" />
     -->
@@ -81,11 +81,13 @@
          This connector uses the JSSE configuration, when using APR, the
          connector should be using the OpenSSL style configuration
          described in the APR documentation -->
-    <!--
-    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+    
+       <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
                maxThreads="150" scheme="https" secure="true"
-               clientAuth="false" sslProtocol="TLS" />
-    -->
+               clientAuth="false" sslProtocol="TLS" 
+               keystoreFile="/mnt/tomcat"
+               keystorePass="tomcat123" />
+ 
 
     <!-- Define an AJP 1.3 Connector on port 8009 -->
     <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
@@ -140,3 +142,4 @@
     </Engine>
   </Service>
 </Server>
+

info: FileBucket adding {md5}243c711930a975db7507077c41bde651
info: /Stage[main]/Tomcat/File[/mnt/apache-tomcat-7.0.52/conf/server.xml]: Filebucketed /mnt/apache-tomcat-7.0.52/conf/server.xml to puppet with sum 243c711930a975db7507077c41bde651
notice: /Stage[main]/Tomcat/File[/mnt/apache-tomcat-7.0.52/conf/server.xml]/content: content changed '{md5}243c711930a975db7507077c41bde651' to '{md5}49939d8265ce59858f59d0e9dbc8ed39'
notice: /Stage[main]/Tomcat/Exec[Set tomcat home permission]/returns: executed successfully
notice: /Stage[main]/Tomcat/Exec[Start tomcat]/returns: executed successfully
notice: /Stage[main]/Java/File[/opt/jdk1.6.0_24.tar.gz]/ensure: defined content as '{md5}35cfe7d3bd83d0f2fa383f5d77277996'
notice: /Stage[main]/Java/Exec[Install java]/returns: executed successfully
notice: /Stage[main]/Java/File[/opt/java]/ensure: created
notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/File[//mnt/packs/apache-stratos-cartridge-agent-4.0.0-incubating-bin.zip]/ensure: defined content as '{md5}216bbe191bcfbcd77262b986b931a983'
notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/Exec[creating_target_for_cartridge-agent]/returns: executed successfully
notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/Exec[extracting_stratoscartridge-agent-4.0.0-incubating.zip_for_cartridge-agent]/returns: executed successfully
notice: /Stage[main]/Agent/Agent::Initialize[cartridge-agent]/Exec[setting_permission_for_cartridge-agent]/returns: executed successfully
notice: /File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/lib/geronimo-j2ee-management_1.1_spec-1.0.1.jar]/ensure: defined content as '{md5}7e1708a3b808e9749b5789668fd9ca8b'
notice: /File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/lib/hawtbuf-1.9.jar]/ensure: defined content as '{md5}f02d55780c4f2280b58528a76b5c0286'
notice: /File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/lib/activemq-client-5.9.1.jar]/ensure: defined content as '{md5}df0d1c33b78b624c14c7ea2bbb2c7fe9'
notice: /File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/lib/activemq-broker-5.9.1.jar]/ensure: defined content as '{md5}c07f487542a0e6ca79a70dce8e853c4f'
notice: /File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/lib/geronimo-jms_1.1_spec-1.1.1.jar]/ensure: defined content as '{md5}d80ce71285696d36c1add1989b94f084'
notice: /Stage[main]/Agent/Exec[copy launch-params to carbon_home]/returns: executed successfully
notice: /Stage[main]/Agent/Agent::Push_templates[conf/templates/jndi.properties.template]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template]/content: 
--- /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template	2014-04-24 17:47:54.000000000 +0000
+++ /tmp/puppet-file20140429-166-12nazgk-0	2014-04-29 07:36:43.801466839 +0000
@@ -20,6 +20,9 @@
 # Please use loadbalancer.conf for updating mb-ip, mb-port and templates/jndi.properties.template
 # file for updating other configurations.
 #
-connectionfactoryName=topicConnectionfactory
-connectionfactory.topicConnectionfactory=amqp://admin:admin@carbon/carbon?brokerlist='tcp://$mb_ip:$mb_port'
-java.naming.factory.initial=org.wso2.andes.jndi.PropertiesFileInitialContextFactory
+
+
+    connectionfactoryName=TopicConnectionFactory
+    java.naming.provider.url=tcp://$mb_ip:$mb_port
+    java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
+

info: FileBucket adding {md5}07f4778d548e3c53de450e8f7c705317
info: /Stage[main]/Agent/Agent::Push_templates[conf/templates/jndi.properties.template]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template]: Filebucketed /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template to puppet with sum 07f4778d548e3c53de450e8f7c705317
notice: /Stage[main]/Agent/Agent::Push_templates[conf/templates/jndi.properties.template]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template]/content: content changed '{md5}07f4778d548e3c53de450e8f7c705317' to '{md5}0d8fc07f795a3ef4174e2ec7661045a0'
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/start-servers.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/start-servers.sh]/content: 
--- /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/start-servers.sh	2014-04-24 17:47:54.000000000 +0000
+++ /tmp/puppet-file20140429-166-14m6iw3-0	2014-04-29 07:36:43.889466836 +0000
@@ -24,4 +24,5 @@
 #
 
 log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo "Starting servers" | tee -a $log
\ No newline at end of file
+echo "Starting servers" | tee -a $log
+

info: FileBucket adding {md5}a8abead77a7553c098a97e8529d832e2
info: /Stage[main]/Agent/Agent::Push_templates[extensions/start-servers.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/start-servers.sh]: Filebucketed /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/start-servers.sh to puppet with sum a8abead77a7553c098a97e8529d832e2
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/start-servers.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/start-servers.sh]/content: content changed '{md5}a8abead77a7553c098a97e8529d832e2' to '{md5}3d0353dbfb51a07ce50f99cd50e08fdf'
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/instance-started.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/instance-started.sh]/content: 
--- /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/instance-started.sh	2014-04-24 17:47:54.000000000 +0000
+++ /tmp/puppet-file20140429-166-1hhzkwd-0	2014-04-29 07:36:43.977466833 +0000
@@ -24,4 +24,7 @@
 #
 
 log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo "Instance started" | tee -a $log
\ No newline at end of file
+echo "Instance started" | tee -a $log
+
+
+

info: FileBucket adding {md5}fbfd60e9aa15c905d3666666d6ec3242
info: /Stage[main]/Agent/Agent::Push_templates[extensions/instance-started.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/instance-started.sh]: Filebucketed /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/instance-started.sh to puppet with sum fbfd60e9aa15c905d3666666d6ec3242
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/instance-started.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/instance-started.sh]/content: content changed '{md5}fbfd60e9aa15c905d3666666d6ec3242' to '{md5}c19ed1f22f825549ca429257d41fcf5b'
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/artifacts-updated.sh]/content: 
--- /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/artifacts-updated.sh	2014-04-24 17:47:54.000000000 +0000
+++ /tmp/puppet-file20140429-166-e06myk-0	2014-04-29 07:36:44.077466830 +0000
@@ -25,4 +25,6 @@
 #
 
 log=/var/log/apache-stratos/cartridge-agent-extensions.log
-echo "Artifacts updated" | tee -a $log
\ No newline at end of file
+echo "Artifacts updated" | tee -a $log
+
+

info: FileBucket adding {md5}b9fd3f7b5b4c7d0194897666705f1bf8
info: /Stage[main]/Agent/Agent::Push_templates[extensions/artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/artifacts-updated.sh]: Filebucketed /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/artifacts-updated.sh to puppet with sum b9fd3f7b5b4c7d0194897666705f1bf8
notice: /Stage[main]/Agent/Agent::Push_templates[extensions/artifacts-updated.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/extensions/artifacts-updated.sh]/content: content changed '{md5}b9fd3f7b5b4c7d0194897666705f1bf8' to '{md5}ad56631a1fcae9ff7fbbd3e0dac9f948'
notice: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/bin/stratos.sh]/content: 
--- /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/bin/stratos.sh	2014-04-24 17:47:54.000000000 +0000
+++ /tmp/puppet-file20140429-166-1b0ku20-0	2014-04-29 07:36:44.169466827 +0000
@@ -24,33 +24,32 @@
 script_path="$( cd -P "$( dirname "$SOURCE" )" && pwd )/`dirname $0`"
 lib_path=${script_path}/../lib/
 class_path=`echo ${lib_path}/*.jar | tr ' ' ':'`
-properties="-Dmb.ip=MB-IP
-            -Dmb.port=MB-PORT
+properties="-Dmb.ip=192.168.57.30
+            -Dmb.port=61616
             -Dlisten.address=localhost
-            -Dthrift.receiver.ip=CEP-IP
-            -Dthrift.receiver.port=CEP-PORT
-            -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
-            -Dparam.file.path=${script_path}/../payload/launch-params
+            -Dthrift.receiver.ip=192.168.57.30
+            -Dthrift.receiver.port=7611
+            -Djndi.properties.template.file.path=/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/templates/jndi.properties.template
+            -Djndi.properties.dir=/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf
+            -Dlog4j.properties.file.path=/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/conf/log4j.properties
+            -Dparam.file.path=/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/payload/launch-params
             -Dextensions.dir=${script_path}/../extensions
             -Dcep.stats.publisher.enabled=true
-            -Djavax.net.ssl.trustStore=CERT-TRUSTSTORE
-            -Djavax.net.ssl.trustStorePassword=TRUSTSTORE-PASSWORD
+            -Djavax.net.ssl.trustStore=/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/security/client-truststore.jks
+            -Djavax.net.ssl.trustStorePassword=wso2carbon
 	    -Denable.artifact.update=true
-	    -Dartifact.update.interval=10
-	    -Denable.data.publisher=ENABLE-DATA-PUBLISHER
-            -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"
+	    -Dartifact.update.interval=15
+	    -Denable.data.publisher=false
+            -Dmonitoring.server.ip=192.168.57.30
+            -Dmonitoring.server.port=7611
+            -Dmonitoring.server.secure.port=7711
+            -Dmonitoring.server.admin.username=admin
+            -Dmonitoring.server.admin.password=admin
+	    -DAPP_PATH=/mnt/apache-tomcat-7.0.52/webapps/"
 
 # 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
+/opt/java/bin/java -cp "${class_path}" ${properties} ${debug} org.apache.stratos.cartridge.agent.Main
+
 
-# If you want to add your custom Cartridge Agent implementation, Please provide an implementation of 
-# org.apache.stratos.cartridge.agent.CartridgeAgent as an argument to the Main class
-#java -cp "${class_path}" ${properties} ${debug} org.apache.stratos.cartridge.agent.Main org.apache.stratos.cartridge.agent.CartridgeAgentABC

info: FileBucket adding {md5}1ff098fe19db2ca2479acb4eabf67460
info: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/bin/stratos.sh]: Filebucketed /mnt/apache-stratos-cartridge-agent-4.0.0-incubating/bin/stratos.sh to puppet with sum 1ff098fe19db2ca2479acb4eabf67460
notice: /Stage[main]/Agent/Agent::Push_templates[bin/stratos.sh]/File[/mnt/apache-stratos-cartridge-agent-4.0.0-incubating/bin/stratos.sh]/content: content changed '{md5}1ff098fe19db2ca2479acb4eabf67460' to '{md5}a1a032c86e1b367ecb3ca50fbb84bc72'
notice: /Stage[main]/Agent/Agent::Start[cartridge-agent]/Exec[starting_cartridge-agent]/returns: executed successfully
info: Creating state file /var/lib/puppet/state/state.yaml
notice: Finished catalog run in 34.24 seconds
Initialization completed successfully.

Reply via email to