You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Russell E Glaue (Created) (JIRA)" <ji...@apache.org> on 2012/02/17 23:28:57 UTC

[jira] [Created] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

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: Bug
      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
            Priority: Minor


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: /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/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/
-- (A) ERROR [SnapshotConfigXMLBuilder] Could not make the directory /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/
-- (B) ERROR [SnapshotConfigXMLBuilder] /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/snapshot-config.xml (Not a directory)
-- Reason:
--- This is because SnapshotConfigXMLBuilder is looking for GERONIMO_HOME/var/monitoring
-- Solution:
--- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
-- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
-- Reason:
--- This is because the JMSBrokerPortlet 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.
-- Solution:
--- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
--- The full path to var should be within org.apache.geronimo.server.dir
-- 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Attachment: geronimo-6281-activemq-config-substitutions.patch

geronimo-6281-activemq-config-substitutions.patch
This patch makes changes in config-substitution.properties are previously discussed.

This patch is only a suggestion. However, it does resolve the issue with ActiveMQ documented in this jira.

                
> 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-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Resolved] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Forrest Xia resolved GERONIMO-6281.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0-beta-2
                   3.0

Russell, I set it to resolved, if not agreed, please reopen.

Thank you for your great contribution!
                
> 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
>             Fix For: 3.0, 3.0-beta-2
>
>         Attachments: geronimo-6281-activemq-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213425#comment-13213425 ] 

Forrest Xia commented on GERONIMO-6281:
---------------------------------------

Agreed that keep minimal manual steps when creating a new instance, however, PortOffset is a MUST change for any new instance if we don't expect a port conflict with the default server instance. 

In other words, keeping the changes happened in one place(config-substitutions.properties) is an acceptable way I think the user could be happy with :)

For activemq.data, you just need to use a relative path for a new instance. For example, if the instance name is GERONIMO_SERVER=inst1, then you set it like this:
activemq.data=inst1/var/activemq

No need to add a absolute path there.

Can we close this jira? :)
                
> 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-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Attachment: geronimo-6281-karaf.patch

geronimo-6281-karaf.patch
Modifies: framework/configs/karaf-framework/src/main/distribution/text/etc/system.properties

This patch changes karaf.home with karaf.base for defining the path to (1) etc/shell.init.script, and (2) etc/equinox-debug.properties

I initially misunderstood that karaf.base being set to "geronimoBase" is actually the same as being set to "org.apache.geronimo.server.dir". After reading through the procedure in "framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java" I see this is all being set correctly.

After this change, my initial testing shows this fixes the reported issue with Karaf. 

                
> 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
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6281-activemq.patch, geronimo-6281-karaf.patch, geronimo-6281-snapshot.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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212669#comment-13212669 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

Let's keep in mind GERONIMO-5164 GERONIMO-5988 . We want to be able to deploy a new instance of Geronimo with very little or no manual configuration in config-substitutions.

If we leave as last proposed, setting activemq.data will be a requirement for any Geronimo instance, including the default.

The workaround is for the shell to change directory to GERONIMO_SERVER before executing the startup procedure.
-RG

                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212096#comment-13212096 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

The remaining files reported with the Karaf issue can actually be combined into their own issues, as follows:
# Issue: Server/Client start
-- Affected Code from branches/3.0-beta:
--- 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
--- framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/geronimo/StartServerCommand.java
--- framework/modules/geronimo-shell-base/src/main/java/org/apache/geronimo/shell/geronimo/StartClientCommand.java
# Other Issue: Karaf Repository is the same as GERONIMO_HOME/repository - both should be changed at the same time. We'll open another jira for this
-- Additional Affected Code from trunk/
--- framework/features/client/src/main/filtered-resources/resources/instances/client/etc/org.ops4j.pax.url.mvn.cfg
                
> 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
>            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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213422#comment-13213422 ] 

Forrest Xia commented on GERONIMO-6281:
---------------------------------------

config-substitution.properties is dynamically generated when server is built, no source change for 3.0-beta. I've applied your config-substitutions patch into trunk@1292160. thanks!
                
> 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-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Issue Type: Sub-task  (was: Bug)
        Parent: GERONIMO-6270
    
> 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
>            Priority: Minor
>              Labels: geronimo
>
> 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: /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/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/
> -- (A) ERROR [SnapshotConfigXMLBuilder] Could not make the directory /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/
> -- (B) ERROR [SnapshotConfigXMLBuilder] /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/snapshot-config.xml (Not a directory)
> -- Reason:
> --- This is because SnapshotConfigXMLBuilder is looking for GERONIMO_HOME/var/monitoring
> -- Solution:
> --- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
> -- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
> -- Reason:
> --- This is because the JMSBrokerPortlet 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.
> -- Solution:
> --- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
> --- The full path to var should be within org.apache.geronimo.server.dir
> -- 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212685#comment-13212685 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

I just found this bug: GERONIMO-6272: server can not be started if installation path contains bracket "()"
This is definitely related, and the resolution as I proposed will also resolve GERONIMO-6272

Here is why:
- When we start Geronimo, our start scripts take care of remove all unsafe characters and resolve sym links
- GERONIMO_HOME, GERONIMO_SERVER are safe paths before being based on to startup the JVM
- ActiveMQ uses the working directory path which may not be safe, as is the case with GERONIMO-6272

This is another reason to change ActiveMQ to use GERONIMO_SERVER.
ActiveMQ seems to want to use a variable named ${activemq.base}, but it does not appear to be set in Geronimo.

                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13213762#comment-13213762 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

"
For activemq.data, you just need to use a relative path for a new instance. For example, if the instance name is GERONIMO_SERVER=inst1, then you set it like this:
activemq.data=inst1/var/activemq

No need to add a absolute path there.
"

The problem is that ActiveMQ access "activemq.data" relative to the directory you are in when you start Geronimo.
That is if you start Geronimo, without the no configured instances, like this:
- $ cd /opt
- $ export GERONIMO_HOME=/opt/geronimo
- $ /opt/geronomo/bin/geronimo start
Then ActiveMQ uses the following path as "activemq.data":
- /opt/var/activemq

In this scenario, we want ActiveMQ to use {{GERONIMO_HOME/var/activemq}}, and not {{PWD/var/activemq}}
For the configured instance example you provide, ActiveMQ would create {{/opt/inst1/var/activemq}}. It would not use {{/opt/geronimo/inst1/var/activemq}} as you would expect.

Now take for example that I want to start Geronimo as a unix service.
If {{GERONIMO_HOME=/opt/geronimo}}
And the unix service starts geronimo in {{/}} (file system root)
ActiveMQ will create {{/var/activemq}}
ActiveMQ does not use {{GERONIMO_HOME/var/activemq}} as you would be expecting

Geronimo will fail to start if it is being started by a non-root user since ActiveMQ will not have permissions to create {{/var/activemq}}

How do we address this?
My recommendation is to change ActiveMQ to use org.apache.geronimo.server.dir as the base path and not PWD.
                
> 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-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Attachment: geronimo-6281-trunk-karaf.patch

geronimo-6281-trunk-karaf.patch
Modifies:
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

This changes use of karaf.home to karaf.base in configuration files located only in trunk and are not found in branches/3.0-beta

                
> 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
>            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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13214248#comment-13214248 ] 

Forrest Xia commented on GERONIMO-6281:
---------------------------------------

Yes, as you said, it uses $PWD as the root dir, I does not notice that before :)

I made a change in order to use o.a.g.server.dir property for activemq.data.

3.0-beta@1292631, 3.0 trunk@1292632

thanks!
                
> 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-config-substitutions.patch, 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Description: 
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/
-- (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 GERONIMO_HOME/var/monitoring
-- Solution:
--- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
-- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
-- Reason:
--- This is because the JMSBrokerPortlet 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.
-- Solution:
--- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
--- The full path to var should be within org.apache.geronimo.server.dir
-- 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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}





  was:
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: /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/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/
-- (A) ERROR [SnapshotConfigXMLBuilder] Could not make the directory /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/
-- (B) ERROR [SnapshotConfigXMLBuilder] /data/geronimo2/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/snapshot-config.xml (Not a directory)
-- Reason:
--- This is because SnapshotConfigXMLBuilder is looking for GERONIMO_HOME/var/monitoring
-- Solution:
--- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
-- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
-- Reason:
--- This is because the JMSBrokerPortlet 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.
-- Solution:
--- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
--- The full path to var should be within org.apache.geronimo.server.dir
-- 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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}





    
> 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
>            Priority: Minor
>              Labels: geronimo
>
> 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/
> -- (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 GERONIMO_HOME/var/monitoring
> -- Solution:
> --- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
> -- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
> -- Reason:
> --- This is because the JMSBrokerPortlet 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.
> -- Solution:
> --- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
> --- The full path to var should be within org.apache.geronimo.server.dir
> -- 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212727#comment-13212727 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

Okay,
I figured out how to, for the time being, resolve this issue in a way that if this were done the user would not have to change activemq.data in config-substitutions.properties to account for a Geronimo instance configuration.

Set activemq.data in GERONIMO_SERVER/var/config/config-substitions.properties to the following:

activemq.data = ${org.apache.geronimo.server.dir}/var/activemq

With the patch from GERONIMO-6275 applied, which always sets org.apache.geronimo.server.dir on startup, this will work. I consider this a temporary fix, however. I still advocate for ActiveMQ to internally use org.apache.geronimo.server.dir as the root path to activemq.data only if activemq.data is a relative path.

                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212688#comment-13212688 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

Where this should be done or not, when setting
activemq.data = ${activemq.base}/var/activemq
I receive this error output when I attempt to use ${activemq.base} in config-substitutions:

WARN  [JexlEngine] org.apache.aries.blueprint.ext.JexlExpressionParser.evaluate@56![0,13]: 'activemq.base;' undefined variable activemq.base

It is similar to the error in GERONIMO-6272
ActiveMQ is not able to find a safe path on its own. Thus Geronimo must configure a safe path for ActiveMQ.
                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212597#comment-13212597 ] 

Forrest Xia commented on GERONIMO-6281:
---------------------------------------

Committed "geronimo-6281-karaf.patch" to 3.0-beta@1291786 and trunk@1291787, thanks!
                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Attachment: geronimo-6281-activemq.patch

geronimo-6281-activemq.patch
Modifies: plugins/activemq/activemq-portlets/src/main/java/org/apache/geronimo/console/jmsmanager/server/JMSBrokerPortlet.java

This patch adds a finalized variable (pathToVarActiveMQ) that defines the full path to "GERONIMO_SERVER/var/activemq/". This variable is then used in each place the "var/activemq/" working directory needs to be provided.
                
> 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
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6281-activemq.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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Attachment: geronimo-6281-snapshot.patch

geronimo-6281-snapshot.patch
Modifies:
plugins/monitoring/agent-jar/src/main/java/org/apache/geronimo/monitoring/snapshot/SnapshotConfigXMLBuilder.java
plugins/monitoring/agent-ejb/src/main/java/org/apache/geronimo/monitoring/ejb/snapshot/SnapshotProcessor.java

This patch changes the construction of org.apache.geronimo.home.dir/var/monitoring/ to org.apache.geronimo.server.dir/var/monitoring/

                
> 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
>            Priority: Minor
>              Labels: geronimo
>         Attachments: geronimo-6281-activemq.patch, geronimo-6281-snapshot.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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Forrest Xia (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212592#comment-13212592 ] 

Forrest Xia commented on GERONIMO-6281:
---------------------------------------

Committed "geronimo-6281-snapshot.patch" to 3.0-beta@1291782 and trunk@1291784, thanks!
                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Commented] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13212629#comment-13212629 ] 

Russell E Glaue commented on GERONIMO-6281:
-------------------------------------------

If we change the "activemq.data" property in "newinstance/var/config/config-substitutions.properties", then it MUST be changed as follows:

activemq.data = /fullpathto/geronimo_home/newinstance/var/activemq

Refer to the example I gave "showing ActiveMQ creating var directory relative to the path Geronimo was started". You can see that "activemq.data" is relative to the current working directory.

So this means there is a potential problem when starting Geronimo as a Unix init service. If the init script does not "change directory" to GERONIMO_HOME, and "activemq.data = newinstance/var/activemq" then you will end up with ActiveMQ deploying all its files in "/etc/newinstance/var/activemq"

I really believe we need to change the ActiveMQ to use GERONIMO_SERVER as the root working path instead of the current path Geronimo is in upon startup.

                
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Updated] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue updated GERONIMO-6281:
--------------------------------------

    Description: 
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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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}





  was:
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/
-- (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 GERONIMO_HOME/var/monitoring
-- Solution:
--- SnapshotConfigXMLBuilder should instead be looking for GERONIMO_SERVER/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 Lock File
-- WARN  [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq
-- Reason:
--- This is because the JMSBrokerPortlet 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.
-- Solution:
--- A full path to the var directory should be used, or at least a path relative to org.apache.geronimo.server.dir
--- The full path to var should be within org.apache.geronimo.server.dir
-- 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' 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}





    
> 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
>            Priority: Minor
>              Labels: geronimo
>
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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

        

[jira] [Assigned] (GERONIMO-6281) Geronimo home.dir is being used when server.dir should be used instead for SnapshotConfigXMLBuilder, ActiveMQ, and Karaf

Posted by "Russell E Glaue (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-6281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Russell E Glaue reassigned GERONIMO-6281:
-----------------------------------------

    Assignee: Russell E Glaue
    
> 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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 '<tab>' for a list of available commands
> and '[cmd] --help' for help on a specific command.
> Hit '<ctrl-d>' 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