Return-Path: X-Original-To: apmail-geronimo-dev-archive@www.apache.org Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 377A296B9 for ; Tue, 21 Feb 2012 13:25:04 +0000 (UTC) Received: (qmail 47573 invoked by uid 500); 21 Feb 2012 13:25:03 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 47479 invoked by uid 500); 21 Feb 2012 13:25:03 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 47470 invoked by uid 99); 21 Feb 2012 13:25:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 13:25:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Feb 2012 13:24:56 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id A5C1B332D9A for ; Tue, 21 Feb 2012 13:24:34 +0000 (UTC) Date: Tue, 21 Feb 2012 13:24:34 +0000 (UTC) From: "Forrest Xia (Commented) (JIRA)" To: dev@geronimo.apache.org Message-ID: <1869796361.5719.1329830674680.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <313157705.52385.1329517737145.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212573#comment-13212573 ] Forrest Xia commented on GERONIMO-6281: --------------------------------------- Hi Russell, Thanks for providing these patches. I am going through these patches one by one. Firstly, I think geronimo-6281-activemq.patch won't help resolve the issue when starting another instance within a same installation. To fix the issue, a configuration change should be made against "newinstance/var/config/config-substitutions.properties" like this: activemq.data = newinstance/var/activemq Will post more when touching other patches :) > Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf > ------------------------------------------------------------------------------------------------------------------------ > > Key: GERONIMO-6281 > URL: https://issues.apache.org/jira/browse/GERONIMO-6281 > Project: Geronimo > Issue Type: Sub-task > Security Level: public(Regular issues) > Components: ActiveMQ, javaee6 > Affects Versions: 3.0-beta-1 > Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga); Java JDK1.6.0_25 > Reporter: Russell E Glaue > Assignee: Russell E Glaue > Priority: Minor > Labels: geronimo > Attachments: geronimo-6281-activemq.patch, geronimo-6281-karaf.patch, geronimo-6281-snapshot.patch, geronimo-6281-trunk-karaf.patch > > > This issue is related to GERONIMO-6270 , GERONIMO-6175 , GERONIMO-6174 , GERONIMO-5987 , and is being used to specifically track modifications related to correctly using the following properties: > # org.apache.geronimo.home.dir (GERONIMO_HOME) > # org.apache.geronimo.server.dir (GERONIMO_SERVER - new shell variable introduced in GERONIMO-6275) > # karaf.base > # karaf.home > Primary issue to be resolved: The org.apache.geronimo.home.dir property (GERONIMO_HOME) is being referenced when the org.apache.geronimo.server.dir property (GERONIMO_SERVER) should be instead. > I have identified three places in Geronimo errors are occurring due to improper use of the above java properties: > # SnapshotConfigXMLBuilder - originally reported in GERONIMO-6270 > # ActiveMQ - is reported in a comment of GERONIMO-5987 , and is being reported here as requested. > # Karaf - is additionally reported in GERONIMO-6174 . > Note the three issues in startup: > # Karaf initialization script etc/shell.init.script > -- Error in initialization script: /opt/geronimo3/etc/shell.init.script (No such file or directory) > -- Reason: > --- This is because karaf.home/etc/shell.init.script is being accessed when instead it should be karaf.base/etc/shell.init.script > -- Solution: > --- The {karaf.base} property should be the same value as the {org.apache.geronimo.server.dir} property > -- Affected Code: > --- framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo.java > --- framework/buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo.java > --- trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/system.properties > --- trunk/framework/features/framework/src/main/distribution/text/etc/system.properties > --- trunk/framework/features/client/src/main/filtered-resources/resources/instances/client/etc/system.properties > --- trunk/framework/features/client/src/main/filtered-resources/resources/instances/client/etc/org.ops4j.pax.url.mvn.cfg > --- trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/geronimo/StartServerCommand.java > --- trunk/framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/geronimo/StartClientCommand.java > --- trunk/framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java > --- trunk/framework/modules/geronimo-main/src/main/java/org/apache/geronimo/main/FrameworkLauncher.java > -- These code files are affected, but in relation to specifying the repository > --- trunk/framework/configs/karaf-framework/src/main/distribution/text/etc/org.ops4j.pax.url.mvn.cfg > --- trunk/framework/features/framework/src/main/distribution/text/etc/org.ops4j.pax.url.mvn.cfg > # SnapshotConfigXMLBuilder var/monitoring/ directory > -- (A) ERROR [SnapshotConfigXMLBuilder] Could not make the directory /opt/geronimo3/var/monitoring/ > -- (B) ERROR [SnapshotConfigXMLBuilder] /opt/geronimo3/var/monitoring/snapshot-config.xml (Not a directory) > -- Reason: > --- This is because SnapshotConfigXMLBuilder is looking for $PWD/var/monitoring > -- Solution: > --- SnapshotConfigXMLBuilder should instead be using a full path to var/monitoring, i.e. org.apache.geronimo.server.dir/var/monitoring > -- Affected code: > --- trunk/plugins/monitoring/agent-ejb/src/main/java/org/apache/geronimo/monitoring/ejb/snapshot/SnapshotProcessor.java > --- trunk/plugins/monitoring/agent-jar/src/main/java/org/apache/geronimo/monitoring/snapshot/SnapshotConfigXMLBuilder.java > # ActiveMQ var/activemq/ directory and Lock File > -- WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq > -- Reason: > --- This is because the ActiveMQ will create and use a var directory relative to the path in which Geronimo was started (Note this may not be the actual GERONIMO_HOME or GERONIMO_SERVER directory). > --- If two Geronimo instances are started from the same directory, they will share the same var directory, thus they will both want to use the same ActiveMQ lock file. This will conflict in the usage of other files in var/activemq too. > -- Solution: > --- ActiveMQ should instead be using a full path to var/activemq, i.e. org.apache.geronimo.server.dir/var/activemq > -- Affected code: > --- trunk/plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSBrokerPortlet.java > Setup for reproducing the errors: > Follow the example for running multiple instances within the Geronimo Wiki, here: > # https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances > # Then remove the GERONIMO_HOME/var and GERONIMO_HOME/etc directories > # Create an empty file $PWD/var/monitoring to prevent SnapshotConfigXMLBuilder from creating $PWD/var/monitoring when it discovers it does not exist > The errors can be reproduced setting up Geronimo as directed and using the start procedure below, resulting with the startup output given. The patch in GERONIMO-6275 was applied which allows the easier start procedure of Geronimo instances. However, the patch is not necessary to reproduce the errors. Use the start scripts in the above mentioned wiki page for "running multiple geronimo instances" as an alternative. The snapshot geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220 was used for testing. > Example showing both the issue with Karaf and SnapshotConfigXMLBuilder > {noformat:borderStyle=solid} > [ger@server /opt/geronimo3]# /bin/rm -r var > [ger@server /opt/geronimo3]# mkdir var; touch var/monitoring > [ger@server /opt/geronimo3]# env JAVA_HOME=/usr/jdk1.6.0 GERONIMO_SERVER=/opt/geronimo3/gserv1 /opt/geronimo3/bin/geronimo run > Using GERONIMO_HOME: /opt/geronimo3 > Using GERONIMO_SERVER: /opt/geronimo3/gserv1 > Using GERONIMO_TMPDIR: /opt/geronimo3/gserv1/var/temp > Using JRE_HOME: /usr/jdk1.6.0/jre > > ______ _ > / ____/___ _________ ____ (_)____ ___ ____ > / / __ / _ \/ ___/ __ \/ __ \/ // __ `__ \/ __ \ > / /_/ // __/ / / /_/ / / / / // / / / / / /_/ / > \____/ \___/_/ \____/_/ /_/_//_/ /_/ /_/\____/ > Apache Geronimo (3.0-SNAPSHOT) > Hit '' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit '' or 'osgi:shutdown' to shutdown Geronimo. > Error in initialization script: /opt/geronimo3/etc/shell.init.script (No such file or directory) > geronimo> Booting Geronimo Kernel (in Java 1.6.0_25)... > Starting Geronimo Application Server v3.0-SNAPSHOT > [***************************** ] 73% 35s Loading agent-car-jmx 2012-02-17 16:30:59,710 ERROR [SnapshotConfigXMLBuilder] Could not make the directory /opt/geronimo3/var/monitoring/ > 2012-02-17 16:30:59,711 ERROR [SnapshotConfigXMLBuilder] /opt/geronimo3/var/monitoring/snapshot-config.xml (Not a directory) > [****************************************] 100% 45s Startup complete > Listening on Ports: > 1150 0.0.0.0 CORBA Naming Service > 1199 0.0.0.0 RMI Naming > 1627 0.0.0.0 Derby Connector > 2101 0.0.0.0 OpenEJB SSL ORB Adapter > 4301 0.0.0.0 OpenEJB Daemon > 6982 0.0.0.0 OpenEJB ORB Adapter > 8109 0.0.0.0 Tomcat Connector AJP TomcatAJPConnector > 8180 0.0.0.0 Tomcat Connector HTTP BIO TomcatWebConnector > 8543 0.0.0.0 Tomcat Connector HTTPS BIO TomcatWebSSLConnector > 10099 0.0.0.0 JMX Remoting Connector > 61716 0.0.0.0 ActiveMQ Transport Connector > Started Application Modules: > EAR: org.apache.geronimo.plugins/console-tomcat/3.0-SNAPSHOT/car > JAR: org.apache.geronimo.configs/mejb/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.configs/system-database/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins.monitoring/agent-ds/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins.monitoring/mconsole-ds/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins/uddi-db/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/remote-deploy-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/uddi-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/welcome-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins.monitoring/mconsole-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/activemq-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/debugviews-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/openejb-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/plancreator-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/plugin-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/sysdb-console-tomcat/3.0-SNAPSHOT/car > Web Applications: > / > /activemq > /console > /console-base > /debug-views > /juddi > /monitoring > /openejb-server > /plan-creator > /plugin > /remote-deploy > /system-database > Geronimo Application Server started > {noformat} > Example showing ActiveMQ creating var directory relative to the path Geronimo was started. > Obviously if a second Geronimo instance was started, there would be a conflict with the ActiveMQ lock file. > {noformat:borderStyle=solid} > [ger@server /opt]# pwd > /opt > [ger@server /opt]# ls -l var > ls: var: No such file or directory > [ger@server /opt]# env JAVA_HOME=/usr/jdk1.6.0 GERONIMO_SERVER=/opt/geronimo3/gserv1 /opt/geronimo3/bin/geronimo run > Using GERONIMO_HOME: /opt/geronimo3 > Using GERONIMO_SERVER: /opt/geronimo3/gserv1 > Using GERONIMO_TMPDIR: /opt/geronimo3/gserv1/var/temp > Using JRE_HOME: /usr/jdk1.6.0/jre > > ______ _ > / ____/___ _________ ____ (_)____ ___ ____ > / / __ / _ \/ ___/ __ \/ __ \/ // __ `__ \/ __ \ > / /_/ // __/ / / /_/ / / / / // / / / / / /_/ / > \____/ \___/_/ \____/_/ /_/_//_/ /_/ /_/\____/ > Apache Geronimo (3.0-SNAPSHOT) > Hit '' for a list of available commands > and '[cmd] --help' for help on a specific command. > Hit '' or 'osgi:shutdown' to shutdown Geronimo. > geronimo> Booting Geronimo Kernel (in Java 1.6.0_25)... > Starting Geronimo Application Server v3.0-SNAPSHOT > [**************** ] 42% 11s Loading openjpa2 2012-02-17 16:03:45,759 WARN [aries] Managed persistence context support is no longer available for use with the Aries Blueprint container > [****************************************] 100% 47s Startup complete > Listening on Ports: > 1150 0.0.0.0 CORBA Naming Service > 1199 0.0.0.0 RMI Naming > 1627 0.0.0.0 Derby Connector > 2101 0.0.0.0 OpenEJB SSL ORB Adapter > 4301 0.0.0.0 OpenEJB Daemon > 6982 0.0.0.0 OpenEJB ORB Adapter > 8109 0.0.0.0 Tomcat Connector AJP TomcatAJPConnector > 8180 0.0.0.0 Tomcat Connector HTTP BIO TomcatWebConnector > 8543 0.0.0.0 Tomcat Connector HTTPS BIO TomcatWebSSLConnector > 10099 0.0.0.0 JMX Remoting Connector > 61716 0.0.0.0 ActiveMQ Transport Connector > Started Application Modules: > EAR: org.apache.geronimo.plugins/console-tomcat/3.0-SNAPSHOT/car > JAR: org.apache.geronimo.configs/mejb/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.configs/system-database/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins.monitoring/agent-ds/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins.monitoring/mconsole-ds/3.0-SNAPSHOT/car > RAR: org.apache.geronimo.plugins/uddi-db/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/remote-deploy-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/uddi-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.configs/welcome-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins.monitoring/mconsole-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/activemq-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/debugviews-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/openejb-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/plancreator-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/plugin-console-tomcat/3.0-SNAPSHOT/car > WAR: org.apache.geronimo.plugins/sysdb-console-tomcat/3.0-SNAPSHOT/car > Web Applications: > / > /activemq > /console > /console-base > /debug-views > /juddi > /monitoring > /openejb-server > /plan-creator > /plugin > /remote-deploy > /system-database > Geronimo Application Server started > ^D > 2012-02-17 16:16:26,021 WARN [aries] Managed persistence context support is no longer available for use with the Aries Blueprint container > 2012-02-17 16:16:26,022 WARN [context] The TransactionSynchronizationRegistry used to manage persistence contexts is no longer available. Managed persistence contexts will no longer be able to integrate with JTA transactions, and will behave as if no there is no transaction context at all times until a new TransactionSynchronizationRegistry is available. Applications using managed persistence contexts may not work correctly until a new JTA Transaction services implementation is available. > [ger@server /opt]# ls -l > total 4 > drwxr-xr-x 17 root root 4096 Feb 17 14:17 geronimo3 > drwxr-xr-x 3 root root 4096 Feb 17 16:04 var > [ger@server /opt]# tree /opt/var > /opt/var > `-- activemq > |-- journal > | |-- data-1 > | `-- data-control > |-- kr-store > | |-- data > | | |-- index-container-roots > | | `-- lock > | `-- state > | |-- data-kaha-1 > | |-- data-store-state-1 > | |-- hash-index-store-state_state > | |-- index-kaha > | |-- index-store-state > | |-- index-transactions-state > | `-- lock > `-- lock > 5 directories, 12 files > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira