You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Russell E Glaue <rg...@cait.org> on 2008/08/04 22:13:33 UTC

GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

My summarized question:

What is "GERONIMO_BASE" is <GERONIMO_HOME>/bin/geronimo.sh startup script 
intended to reference?



According to the documentation in that file, GERONIMO_BASE is supposed to point 
at the base directory in which dynamic content is found.

I interpret dynamic content as content that is created or manipulated for the 
purpose and use of the run-time geronimo process.

Dynamic content would include:
  1) run-time configuration files
  2) log files
  3) temporary directories
  4) possibly web applications


GERONIMO_BASE vs. GERONIMO_HOME
If I were to break down Geronimo 2.1.1 file structure into GERONIMO_HOME and 
GERONIMO_BASE, would this break-down be correct?
  - GERONIMO_HOME/bin
  - GERONIMO_HOME/etc
  - GERONIMO_HOME/lib
  - GERONIMO_HOME/master-repository
  - GERONIMO_HOME/cluster-repository
  - GERONIMO_BASE/var
  - GERONIMO_BASE/schema


After separating that out, what is the -Dorg.apache.geronimo.base.dir=<dir> 
supposed to be pointing at?  My assumption would be GERONIMO_BASE, as everything 
from GERONIMO_HOME should be referred to on the command line, or loaded into 
environment variables before or during execution of the geronimo server... 
$GERONIMO_HOME/bin/server.jar



Point to knowing about this:

Let's say I wanted a server specific configuration stored in /etc/, say as : 
/etc/geronimo-servers/default-server
I would want GERONIMO_BASE=/etc/geronimo-servers/default-server while 
GERONIMO_HOME points to everything as I have above.

And yes, I realize GERONIMO_BASE has the temp and logs directory. Sparing me the 
convenience of keeping this example brief, how do I achieve this simple split of 
the GERONIMO_HOME and GERONIMO_BASE files?

The <GERONIMO_HOME>/bin/geronimo.sh script does not allow the separation of 
GERONIMO_HOME and GERONIMO_BASE as it is currently written. It looks like the 
liberty of both vairables pointing to the same directory has been widely 
accepted, thus seemingly invalidating the reason for having both variables to 
begin with.


A possible patch:
So assuming all my above asumptions are correct, this would be the patch to 
geronimo to fix this issue:

-----SNIP-SNIP-----PATCH-----SNIP-SNIP-----

Index: assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
===================================================================
--- assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh 
(revision 682467)
+++ assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh   (working 
copy)
@@ -235,11 +235,11 @@
    GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
    GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"`
    GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
-  EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
-  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
+  EXT_DIRS="$GERONIMO_HOME/lib/ext;$JRE_HOME/lib/ext"
+  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed;$JRE_HOME/lib/endorsed"
  else
-  EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
-  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
+  EXT_DIRS="$GERONIMO_HOME/lib/ext:$JRE_HOME/lib/ext"
+  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed:$JRE_HOME/lib/endorsed"
  fi

  # ----- Execute The Requested Command -----------------------------------------
@@ -284,7 +284,7 @@
  fi

  # Setup the Java programming language agent
-JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
+JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
  if [ -f "$JAVA_AGENT_JAR" ]; then
      JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
  else

-----SNIP-SNIP-----END-PATCH-----SNIP-SNIP-----


Discussion???

-RG

Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by Russell E Glaue <rg...@cait.org>.
I diagnosed some of the Geronimo internals, and here is what I found:

First of all, what some Geronimo Modules expect:

(1)
buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/StartServerMojo
buildsupport/geronimo-maven-plugin/src/main/java/org/apache/geronimo/mavenplugins/geronimo/server/RunClientMojo
-
It creates a object of '(Java)createTask("java")'
It does not read server configured org.apache.geronimo.base.dir
but instead it sets this attribute in this object to whatever the 
server.getGeronimoHome() returns
Then it looks for the following resources:
  - <geronimoHome>/bin/server.jar
  - <geronimoHome>/bin/jpa.jar
  - <geronimoHome>/lib/endorsed
  - <geronimoHome>/lib/ext

So it does not look like it is a show stopper, but if the end-user is expecting 
their configured variable of org.apache.geronimo.base.dir to be used, they will 
be wrong.
And if the plugin requires anything you have located in the REAL server 
org.apache.geronimo.base.dir directory, it will not find it.
-

(2)
plugins/console/plugin-portlets/src/main/java/org/apache/geronimo/console/car/AssemblyConfirmHandler.java
-
This expects org.apache.geronimo.home.dir to be the 'deployedPath' which I 
assume is the install path.
This seems okay.
-

(3)
plugins/jaxws/geronimo-jaxws-builder/src/main/java/org/apache/geronimo/jaxws/builder/JAXWSToolsCLI.java
-
This expects org.apache.geronimo.home.dir to be the location of the repositories.
This seems okay too.
-

(4)
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/snapshot/SnapshotProcessor.java
-
This expects org.apache.geronimo.home.dir to be the location of the following 
resources:
  - /var/monitoring/snapshot-config.xml
  - /var/monitoring/
Should this be org.apache.geronimo.base.dir instead, like the previous two modules?
-

(5)
Then there is finally the system BasicServerInfo class which sets up the 
configuration on run-time.
-
framework/modules/geronimo-system/src/main/java/org/apache/geronimo/system/serverinfo/BasicServerInfo.java
-
Here is what it does:
01) this.base = -Dorg.apache.geronimo.home.dir or 'defaultBaseDirectory'
02) if this.base NOT DEFINED
03)   this.base = DirectoryUtils.getGeronimoInstallDirectory();
04) if org.apache.geronimo.server.dir isAbsolute()
05)   this.baseServer = org.apache.geronimo.server.dir
06) if org.apache.geronimo.server.dir NOT isAbsolute()
07)   this.baseServer = this.base/org.apache.geronimo.server.dir
08) if org.apache.geronimo.server.dir NOT DEFINED
09)   this.baseServer = this.base/org.apache.geronimo.server.name
10) if org.apache.geronimo.server.name NOT DEFINED
11)   this.baseServer = this.base
12) set property: org.apache.geronimo.home.dir = this.base.getAbsolutePath()
13) set property: org.apache.geronimo.server.dir = this.baseServer.getAbsolutePath()

The variables org.apache.geronimo.server.dir and org.apache.geronimo.server.name 
can be used interchangeably, and appear to represent the same configuration 
property. The only difference is that org.apache.geronimo.server.dir can be 
either a relative or absolute path to your /var/... content. Whereas 
org.apache.geronimo.server.name can only be relative.
When it is relative, it is relative from the server base directory.

The server base directory is one of three determined items:
1) The installation Directory of Geronimo
2) If that cannot be determined, then it is the 'defaultBaseDirectory'
3) server configured property of org.apache.geronimo.home.dir
If you do not explicitly define org.apache.geronimo.home.dir in your server 
configuration, this value will default to #1 or #2 as stated above.
-


And my findings after the diagnoses?


(X)
What about GERONIMO_HOME vs. GERONIMO_BASE ??

After the script passes execution to java, GERONIMO_HOME value no longer exists. 
And that value is not passed into the java execution.

GERONIMO_BASE is passed into the java execution in bin/geronimo.sh, as the 
option -Dorg.apache.geronimo.base.dir . However, as you can see from the above 
modules, it does little in configuring your Geronimo install.
You can set GERONIMO_BASE to point at your var/... content, but then there are 
two problems resulting from that:
1) you cannot use org.apache.geronimo.server.name as documented in the wiki to 
configure multiple Geronimo instances, unless the value of this variable 
represents a relative path to your instance configuration from the Geronimo 
Installation directory (Not GERONIMO_HOME).
2) The modules in Geronimo may ignore your defined org.apache.geronimo.base.dir 
assuming they are located beneath the Geronimo Installation Directory (again Not 
GERONIMO_HOME)

(Y)
Q) So how do you have virtual Geronimo instances in which the var/... content is 
NOT relative to the Geronimo installation directory but relative to GERONIMO_HOME?
A) Set these variables in GERONIMO_OPTS:
  - -Dorg.apache.geronimo.home.dir=${GERONIMO_HOME}
  - -Dorg.apache.geronimo.server.name=${relative_path_to_instance}
or like this:
  - -Dorg.apache.geronimo.server.dir=${GERONIMO_HOME}/${relative_path_to_instance}
Q) How do you set it up as an absolute instance:
A) Just us this option:
  - -Dorg.apache.geronimo.server.dir=${absolute_path_to_instance}
But you need to mind the previously discussed items.

Also note, that in Geronimo 1.1.1, it was not advised to configure these options.
http://cwiki.apache.org/GMOxDOC11/release-notes-111txt.html
-
Works In Progress
-----------------

* Geronimo has two system properties that should not be modified by the user
   even though they are visible in some property files.  They are:
     org.apache.geronimo.server.dir
     org.apache.geronimo.server.name

   These are subject to change and will be documented in a future release

* The GERONIMO_HOME environment variable in the startup scripts is not
   currently used and is subject to change in a future release.
-

It would seem GERONIMO_HOME is still not used inside Geronimo as of 2.1.1.

-RG




Russell E Glaue wrote:
> 
> My summarized question:
> 
> What is "GERONIMO_BASE" is <GERONIMO_HOME>/bin/geronimo.sh startup 
> script intended to reference?
> 
> 
> 
> According to the documentation in that file, GERONIMO_BASE is supposed 
> to point at the base directory in which dynamic content is found.
> 
> I interpret dynamic content as content that is created or manipulated 
> for the purpose and use of the run-time geronimo process.
> 
> Dynamic content would include:
>  1) run-time configuration files
>  2) log files
>  3) temporary directories
>  4) possibly web applications
> 
> 
> GERONIMO_BASE vs. GERONIMO_HOME
> If I were to break down Geronimo 2.1.1 file structure into GERONIMO_HOME 
> and GERONIMO_BASE, would this break-down be correct?
>  - GERONIMO_HOME/bin
>  - GERONIMO_HOME/etc
>  - GERONIMO_HOME/lib
>  - GERONIMO_HOME/master-repository
>  - GERONIMO_HOME/cluster-repository
>  - GERONIMO_BASE/var
>  - GERONIMO_BASE/schema
> 
> 
> After separating that out, what is the 
> -Dorg.apache.geronimo.base.dir=<dir> supposed to be pointing at?  My 
> assumption would be GERONIMO_BASE, as everything from GERONIMO_HOME 
> should be referred to on the command line, or loaded into environment 
> variables before or during execution of the geronimo server... 
> $GERONIMO_HOME/bin/server.jar
> 
> 
> 
> Point to knowing about this:
> 
> Let's say I wanted a server specific configuration stored in /etc/, say 
> as : /etc/geronimo-servers/default-server
> I would want GERONIMO_BASE=/etc/geronimo-servers/default-server while 
> GERONIMO_HOME points to everything as I have above.
> 
> And yes, I realize GERONIMO_BASE has the temp and logs directory. 
> Sparing me the convenience of keeping this example brief, how do I 
> achieve this simple split of the GERONIMO_HOME and GERONIMO_BASE files?
> 
> The <GERONIMO_HOME>/bin/geronimo.sh script does not allow the separation 
> of GERONIMO_HOME and GERONIMO_BASE as it is currently written. It looks 
> like the liberty of both vairables pointing to the same directory has 
> been widely accepted, thus seemingly invalidating the reason for having 
> both variables to begin with.
> 
> 
> A possible patch:
> So assuming all my above asumptions are correct, this would be the patch 
> to geronimo to fix this issue:
> 
> -----SNIP-SNIP-----PATCH-----SNIP-SNIP-----
> 
> Index: assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
> ===================================================================
> --- assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh 
> (revision 682467)
> +++ assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh   
> (working copy)
> @@ -235,11 +235,11 @@
>    GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
>    GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"`
>    GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
> -  EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
> +  EXT_DIRS="$GERONIMO_HOME/lib/ext;$JRE_HOME/lib/ext"
> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed;$JRE_HOME/lib/endorsed"
>  else
> -  EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
> +  EXT_DIRS="$GERONIMO_HOME/lib/ext:$JRE_HOME/lib/ext"
> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed:$JRE_HOME/lib/endorsed"
>  fi
> 
>  # ----- Execute The Requested Command 
> -----------------------------------------
> @@ -284,7 +284,7 @@
>  fi
> 
>  # Setup the Java programming language agent
> -JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
> +JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
>  if [ -f "$JAVA_AGENT_JAR" ]; then
>      JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
>  else
> 
> -----SNIP-SNIP-----END-PATCH-----SNIP-SNIP-----
> 
> 
> Discussion???
> 
> -RG


Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by Russell E Glaue <rg...@cait.org>.
More testing, following my setup as described earlier (using symbolic linking):

This works:
such that { exists /usr/local/geronimo/default-server/var }
-
#!/bin/bash

export GERONIMO_INSTANCE_NAME=default-server

export JAVA_HOME=/usr/jdk1.5.0_07
export JAVA_OPTS='-Xmx64m'
export PATH=${JAVA_HOME}/bin:$PATH
export GERONIMO_HOME=/usr/local/geronimo
export GERONIMO_BASE=${GERONIMO_HOME}/${GERONIMO_INSTANCE_NAME}

# do not specify -Dorg.apache.geronimo.server.name

exec ${GERONIMO_HOME}/bin/startup.sh
-

This does not work (looks for 
/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/default-server ):
-
#!/bin/bash

export GERONIMO_INSTANCE_NAME=default-server

export JAVA_HOME=/usr/jdk1.5.0_07
export JAVA_OPTS='-Xmx64m'
export PATH=${JAVA_HOME}/bin:$PATH
export GERONIMO_HOME=/usr/local/geronimo
export GERONIMO_BASE=${GERONIMO_HOME}

export GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=${GERONIMO_INSTANCE_NAME}

exec ${GERONIMO_HOME}/bin/startup.sh
-

This also does not work  (looks for 
/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/usr/local/geronimo/default-server 
):
-
#!/bin/bash

export GERONIMO_INSTANCE_NAME=default-server

export JAVA_HOME=/usr/jdk1.5.0_07
export JAVA_OPTS='-Xmx64m'
export PATH=${JAVA_HOME}/bin:$PATH
export GERONIMO_HOME=/usr/local/geronimo
export GERONIMO_BASE=${GERONIMO_HOME}

export 
GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=${GERONIMO_HOME}/${GERONIMO_INSTANCE_NAME}

exec ${GERONIMO_HOME}/bin/startup.sh
-


CONCLUSIONS:

What works:
  - You can move the var/ directory into another location, and point 
GERONIMO_BASE at that location.

What does not work:
  - You cannot specify -Dorg.apache.geronimo.server.name=<server-name> , such 
that <server-name> is not relative to the REAL Geronimo home directory (this is 
not GERONIMO_HOME).
  - Use of -Dorg.apache.geronimo.server.name=<server-name> completely ignores 
GERONIMO_HOME, GERONIMO_BASE and -Dorg.apache.geronimo.base.dir=<dir>



Is it a bug ??
  - When -Dorg.apache.geronimo.server.name=<server-name> is provided, it should 
look for it at the location of one of these two places:
  1) if <server-name> is relative, i.e. 'servers/default-server', Geronimo 
should look for it at this location: <org.apache.geronimo.base.dir>/<server-name>
  2) if <server-name> is not relative, i.e '/var/g-serv/default-server', 
Geronimo should look for it at the given location /var/g-serv/default-server

  - Instead what geronimo does is decide how it was executed, and look for the 
<server-name> directory relative to the location where it is execute. This is 
completely user undefinable.


-RG


Russell E Glaue wrote:
> First, I am not trying to implement a multi-server installation as 
> documented in the wiki.
> I am only trying to figure out the difference of GERONIMO_BASE vs. 
> GERONIMO_HOME
> 
> 
> I tried this out, and something funny happened, which I think proves my 
> belief that GERONIMO_HOME and GERONIMO_BASE are assumed, in the code, to 
> point at the same directory.
> 
> Here is what I did to test the GERONIMO_BASE vs. GERONIMO_HOME issue I 
> am discussing in this thread:
> 
> I created the following directory and subdirectories:
> -
> $ mkdir /usr/local/geronimo/
> $ cd /usr/local/geronimo/
> $ tar zxvf geronimo-jetty6-javaee5-2.1.1.tgz
> $ ln -s geronimo-jetty6-javaee5-2.1.1/bin
> $ ln -s geronimo-jetty6-javaee5-2.1.1/etc
> $ ln -s geronimo-jetty6-javaee5-2.1.1/lib
> $ ln -s geronimo-jetty6-javaee5-2.1.1/cluster-repository
> $ ln -s geronimo-jetty6-javaee5-2.1.1/master-repository
> $ ln -s geronimo-jetty6-javaee5-2.1.1/repository
> $ mkdir default-server
> $ cp geronimo-jetty6-javaee5-2.1.1/var default-server/
> -
> I created the following shell script (following advice from the wiki).
> -
> $ cd /usr/local/geronimo/
> $ cd default-server
> $ cat start.sh
> #!/bin/bash
> 
> export GERONIMO_INSTANCE_NAME=default-server
> 
> export JAVA_HOME=/usr/jdk1.5.0_07
> export JAVA_OPTS='-Xmx64m'
> export PATH=${JAVA_HOME}/bin:$PATH
> export GERONIMO_HOME=/usr/local/geronimo
> export GERONIMO_BASE=${GERONIMO_HOME}/${GERONIMO_INSTANCE_NAME}
> export 
> GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=${GERONIMO_INSTANCE_NAME}
> 
> exec ${GERONIMO_HOME}/bin/startup.sh
> -
> 
> And I get this error in Geronimo:
> $ cd /usr/local/geronimo/
> $ default-server/start
> Using GERONIMO_BASE:   /usr/local/geronimo/default-server
> Using GERONIMO_HOME:   /usr/local/geronimo
> Using GERONIMO_TMPDIR: var/temp
> Using JRE_HOME:        /usr/jdk1.5.0_07/jre
> Using GERONIMO_OUT:    
> /usr/local/geronimo/default-server/var/log/geronimo.out
> 
> Geronimo started in background. PID: 9723
> $ cat /usr/local/geronimo/default-server/var/log/geronimo.out
> -
> 10:39:50,674 ERROR [GBeanInstanceState] Error while starting; GBean is 
> now in the FAILED state: 
> abstractName="org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo" 
> 
> java.lang.IllegalArgumentException: Server directory is not a directory: 
> /usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/default-server
>         at 
> org.apache.geronimo.system.serverinfo.BasicServerInfo.deriveBaseServer(BasicServerInfo.java:187) 
> 
>         at 
> org.apache.geronimo.system.serverinfo.BasicServerInfo.<init>(BasicServerInfo.java:77) 
> 
>         at 
> org.apache.geronimo.system.serverinfo.BasicServerInfo.<init>(BasicServerInfo.java:51) 
> 
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native 
> Method)
>         at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 
> 
>         at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 
> 
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124) 
> 
>         at 
> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555) 
> 
>         at 
> org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379) 
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456) 
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:208) 
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:167) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.loadBootConfiguration(MainConfigurationBootstrapper.java:84) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.getMain(MainConfigurationBootstrapper.java:57) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:38) 
> 
>         at 
> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
>         at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start 
> exception
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522) 
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:208) 
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:167) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.loadBootConfiguration(MainConfigurationBootstrapper.java:84) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.getMain(MainConfigurationBootstrapper.java:57) 
> 
>         at 
> org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:38) 
> 
>         at 
> org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
>         at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
> Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: 
> Configuration org.apache.geronimo.framework/j2ee-system/2.1.1/car failed 
> to start due to the following reasons:
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
> did not start because Server directory is not a directory: 
> /usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/default-server
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=Repository,name=Repository 
> did not start because 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
> did not start.
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ConfigurationStore,name=Local 
> did not start because 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=Repository,name=Repository 
> did not start.
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=AttributeStore,name=AttributeManager 
> did not start because 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
> did not start.
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ArtifactResolver,name=ArtifactResolver 
> did not start because 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
> did not start.
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ConfigurationManager,name=ConfigurationManager 
> did not start because the following dependent services did not start: 
> [org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=AttributeStore,name=AttributeManager, 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ArtifactResolver,name=ArtifactResolver] 
> 
>   The service 
> ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=SystemLog,name=Logger 
> did not start because 
> org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
> did not start.
> 
>         at 
> org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485) 
> 
>         ... 7 more
> 
> -
> 
> 
> Note that in the geronimo.sh script, it is configured:
> -Dorg.apache.geronimo.base.dir="$GERONIMO_BASE"
> 
> Thus resulting in this case:
> -Dorg.apache.geronimo.base.dir=/usr/local/geronimo/default-server
> 
> 
> Also note, I used symbolic links in this case to show something.
> Even though I set GERONIMO_HOME=/usr/local/geronimo , During run time 
> Geronimo resolves it real path 
> (/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1) ignoring the path I 
> set in GERONIMO_HOME.
> 
> This is not a problem, however, really.
> The problem is that I set 
> GERONIMO_BASE=/usr/local/geronimo/default-server , and Geronimo is 
> complaining that GERONIMO_HOME/default-server does not exist.
> 
> Discussion??
> 
> -RG
> 
> 
> 
> Russell E Glaue wrote:
>>
>> So you say that setting the following:
>>
>> GERONIMO_HOME=/usr/local/geronimo
>> GERONIMO_BASE=/usr/local/geronimo-servers
>>
>> and copying/moving var/ from GERONIMO_HOME to GERONIMO_BASE
>> such that { exists /usr/local/geronimo-servers/var }
>>
>> that geronimo should would run.
>>
>>
>> As I mentioned in the previous e-mail, the shell scripts are not 
>> configured correctly to allow this without issue.
>> So if this is true what you say, and what I thought was also true, 
>> then a minor patch is needed to a few shell scripts.
>> I have attached that patch.
>>
>> And if there are no disagreements, I will submit the patch.
>>
>> I will also add documentation in the geronimo wiki to clarify 
>> GERONIMO_BASE vs. GERONIMO_HOME , hopefully avoiding further 
>> conflicting usages in the future.
>>
>> -RG
>>
>>
>>
>>
>> David Jencks wrote:
>>>
>>> I'm pretty sure the multiple server feature is working as designed, 
>>> there's an extra-repo plugin for instance.  I don't really understand 
>>> what you are trying to do or why you think there's a problem.  All I 
>>> can see is that you could copy the existing var dir to 
>>> etc/geronimo-servers/default-server/var and run with BASE as 
>>> etc/geronimo-servers/default-server however IMO this is really weird 
>>> to put user modifiable content inside what is intended as a read-only 
>>> system level directory.
>>>
>>> Perhaps you could explain more what you are trying to do?
>>>
>>> thanks
>>> david jencks
>>>
>>>>
>>>>
>>>> -RG
>>>
>>
> 


Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by Russell E Glaue <rg...@cait.org>.
First, I am not trying to implement a multi-server installation as documented in 
the wiki.
I am only trying to figure out the difference of GERONIMO_BASE vs. GERONIMO_HOME


I tried this out, and something funny happened, which I think proves my belief 
that GERONIMO_HOME and GERONIMO_BASE are assumed, in the code, to point at the 
same directory.

Here is what I did to test the GERONIMO_BASE vs. GERONIMO_HOME issue I am 
discussing in this thread:

I created the following directory and subdirectories:
-
$ mkdir /usr/local/geronimo/
$ cd /usr/local/geronimo/
$ tar zxvf geronimo-jetty6-javaee5-2.1.1.tgz
$ ln -s geronimo-jetty6-javaee5-2.1.1/bin
$ ln -s geronimo-jetty6-javaee5-2.1.1/etc
$ ln -s geronimo-jetty6-javaee5-2.1.1/lib
$ ln -s geronimo-jetty6-javaee5-2.1.1/cluster-repository
$ ln -s geronimo-jetty6-javaee5-2.1.1/master-repository
$ ln -s geronimo-jetty6-javaee5-2.1.1/repository
$ mkdir default-server
$ cp geronimo-jetty6-javaee5-2.1.1/var default-server/
-
I created the following shell script (following advice from the wiki).
-
$ cd /usr/local/geronimo/
$ cd default-server
$ cat start.sh
#!/bin/bash

export GERONIMO_INSTANCE_NAME=default-server

export JAVA_HOME=/usr/jdk1.5.0_07
export JAVA_OPTS='-Xmx64m'
export PATH=${JAVA_HOME}/bin:$PATH
export GERONIMO_HOME=/usr/local/geronimo
export GERONIMO_BASE=${GERONIMO_HOME}/${GERONIMO_INSTANCE_NAME}
export GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=${GERONIMO_INSTANCE_NAME}

exec ${GERONIMO_HOME}/bin/startup.sh
-

And I get this error in Geronimo:
$ cd /usr/local/geronimo/
$ default-server/start
Using GERONIMO_BASE:   /usr/local/geronimo/default-server
Using GERONIMO_HOME:   /usr/local/geronimo
Using GERONIMO_TMPDIR: var/temp
Using JRE_HOME:        /usr/jdk1.5.0_07/jre
Using GERONIMO_OUT:    /usr/local/geronimo/default-server/var/log/geronimo.out

Geronimo started in background. PID: 9723
$ cat /usr/local/geronimo/default-server/var/log/geronimo.out
-
10:39:50,674 ERROR [GBeanInstanceState] Error while starting; GBean is now in 
the FAILED state: 
abstractName="org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo"
java.lang.IllegalArgumentException: Server directory is not a directory: 
/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/default-server
         at 
org.apache.geronimo.system.serverinfo.BasicServerInfo.deriveBaseServer(BasicServerInfo.java:187)
         at 
org.apache.geronimo.system.serverinfo.BasicServerInfo.<init>(BasicServerInfo.java:77)
         at 
org.apache.geronimo.system.serverinfo.BasicServerInfo.<init>(BasicServerInfo.java:51)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at 
org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:948)
         at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:268)
         at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:102)
         at 
org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:124)
         at 
org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:555)
         at 
org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:379)
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:208)
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:167)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.loadBootConfiguration(MainConfigurationBootstrapper.java:84)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.getMain(MainConfigurationBootstrapper.java:57)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:38)
         at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
         at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
org.apache.geronimo.kernel.config.InvalidConfigException: Unknown start exception
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:522)
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:208)
         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.loadBootstrapConfiguration(ConfigurationUtil.java:167)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.loadBootConfiguration(MainConfigurationBootstrapper.java:84)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.getMain(MainConfigurationBootstrapper.java:57)
         at 
org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:38)
         at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:67)
         at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
Caused by: org.apache.geronimo.gbean.InvalidConfigurationException: 
Configuration org.apache.geronimo.framework/j2ee-system/2.1.1/car failed to 
start due to the following reasons:
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
did not start because Server directory is not a directory: 
/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1/default-server
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=Repository,name=Repository 
did not start because 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
did not start.
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ConfigurationStore,name=Local 
did not start because 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=Repository,name=Repository 
did not start.
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=AttributeStore,name=AttributeManager 
did not start because 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
did not start.
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ArtifactResolver,name=ArtifactResolver 
did not start because 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
did not start.
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ConfigurationManager,name=ConfigurationManager 
did not start because the following dependent services did not start: 
[org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=AttributeStore,name=AttributeManager, 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=ArtifactResolver,name=ArtifactResolver]
   The service 
ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=SystemLog,name=Logger 
did not start because 
org.apache.geronimo.framework/j2ee-system/2.1.1/car?ServiceModule=org.apache.geronimo.framework/j2ee-system/2.1.1/car,j2eeType=GBean,name=ServerInfo 
did not start.

         at 
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:485)
         ... 7 more

-


Note that in the geronimo.sh script, it is configured:
-Dorg.apache.geronimo.base.dir="$GERONIMO_BASE"

Thus resulting in this case:
-Dorg.apache.geronimo.base.dir=/usr/local/geronimo/default-server


Also note, I used symbolic links in this case to show something.
Even though I set GERONIMO_HOME=/usr/local/geronimo , During run time Geronimo 
resolves it real path (/usr/local/geronimo/geronimo-jetty6-javaee5-2.1.1) 
ignoring the path I set in GERONIMO_HOME.

This is not a problem, however, really.
The problem is that I set GERONIMO_BASE=/usr/local/geronimo/default-server , and 
Geronimo is complaining that GERONIMO_HOME/default-server does not exist.

Discussion??

-RG



Russell E Glaue wrote:
> 
> So you say that setting the following:
> 
> GERONIMO_HOME=/usr/local/geronimo
> GERONIMO_BASE=/usr/local/geronimo-servers
> 
> and copying/moving var/ from GERONIMO_HOME to GERONIMO_BASE
> such that { exists /usr/local/geronimo-servers/var }
> 
> that geronimo should would run.
> 
> 
> As I mentioned in the previous e-mail, the shell scripts are not 
> configured correctly to allow this without issue.
> So if this is true what you say, and what I thought was also true, then 
> a minor patch is needed to a few shell scripts.
> I have attached that patch.
> 
> And if there are no disagreements, I will submit the patch.
> 
> I will also add documentation in the geronimo wiki to clarify 
> GERONIMO_BASE vs. GERONIMO_HOME , hopefully avoiding further conflicting 
> usages in the future.
> 
> -RG
> 
> 
> 
> 
> David Jencks wrote:
>>
>> I'm pretty sure the multiple server feature is working as designed, 
>> there's an extra-repo plugin for instance.  I don't really understand 
>> what you are trying to do or why you think there's a problem.  All I 
>> can see is that you could copy the existing var dir to 
>> etc/geronimo-servers/default-server/var and run with BASE as 
>> etc/geronimo-servers/default-server however IMO this is really weird 
>> to put user modifiable content inside what is intended as a read-only 
>> system level directory.
>>
>> Perhaps you could explain more what you are trying to do?
>>
>> thanks
>> david jencks
>>
>>>
>>>
>>> -RG
>>
> 


Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by Russell E Glaue <rg...@cait.org>.
So you say that setting the following:

GERONIMO_HOME=/usr/local/geronimo
GERONIMO_BASE=/usr/local/geronimo-servers

and copying/moving var/ from GERONIMO_HOME to GERONIMO_BASE
such that { exists /usr/local/geronimo-servers/var }

that geronimo should would run.


As I mentioned in the previous e-mail, the shell scripts are not configured 
correctly to allow this without issue.
So if this is true what you say, and what I thought was also true, then a minor 
patch is needed to a few shell scripts.
I have attached that patch.

And if there are no disagreements, I will submit the patch.

I will also add documentation in the geronimo wiki to clarify GERONIMO_BASE vs. 
GERONIMO_HOME , hopefully avoiding further conflicting usages in the future.

-RG




David Jencks wrote:
>
> I'm pretty sure the multiple server feature is working as designed, 
> there's an extra-repo plugin for instance.  I don't really understand 
> what you are trying to do or why you think there's a problem.  All I can 
> see is that you could copy the existing var dir to 
> etc/geronimo-servers/default-server/var and run with BASE as 
> etc/geronimo-servers/default-server however IMO this is really weird to 
> put user modifiable content inside what is intended as a read-only 
> system level directory.
> 
> Perhaps you could explain more what you are trying to do?
> 
> thanks
> david jencks
> 
>>
>>
>> -RG
> 


Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by Russell E Glaue <rg...@cait.org>.
Great,
So it seems you and I are thinking exactly the same.
And I agree with what you wrote.


However I am trying to understand GERONIMO_BASE vs. GERONIMO_HOME and what is 
appropriate for org.apache.geronimo.base.dir
This is what I was attempting to illustrate.


I searched for these on the wiki (and google and cuil), and found no information 
to help me.

The documentation for multiple-instances support of Geronimo still basis 
everything off of GERONIMO_HOME. But what about GERONIMO_BASE ?

If I want to move the var/ directory into another location, is that really a 
reference of GERONIMO_HOME ? or a reference of GERONIMO_BASE ?
Is it not truely <GERONIMO_BASE>/foo/var instead of <GERONIMO_HOME>/foo/var ?

.... the scripts point at GERONIMO_BASE, not GERONIMO_HOME...
-Dorg.apache.geronimo.base.dir="$GERONIMO_BASE"

<GERONIMO_HOME>/bin/client.sh
<GERONIMO_HOME>/bin/deploy.sh
<GERONIMO_HOME>/bin/geronimo.sh
<GERONIMO_HOME>/bin/jaxws-tools.sh



If I had to guess, the committer that configured JAVA ext and JAVA endorsed in 
the geronimo.sh and client.sh scripts mistakenly referred to GERONIMO_BASE 
instead of GERONIMO_HOME.

-
EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
-

Shouldn't that '/lib/ext' and '/lib/endorsed' be relative to GERONIMO_HOME ?


This snipit in the shell scripts is what brought on my confusion.

-RG



David Jencks wrote:
> 
> On Aug 4, 2008, at 1:13 PM, Russell E Glaue wrote:
> 
>>
>> My summarized question:
>>
>> What is "GERONIMO_BASE" is <GERONIMO_HOME>/bin/geronimo.sh startup 
>> script intended to reference?
>>
>>
>>
>> According to the documentation in that file, GERONIMO_BASE is supposed 
>> to point at the base directory in which dynamic content is found.
>>
>> I interpret dynamic content as content that is created or manipulated 
>> for the purpose and use of the run-time geronimo process.
>>
>> Dynamic content would include:
>> 1) run-time configuration files
>> 2) log files
>> 3) temporary directories
> yes to these
>>
>> 4) possibly web applications
> 
> ??? not sure how you got here.
> 
> However see 
> http://cwiki.apache.org/GMOxDOC21/running-multiple-instances-of-geronimo.html and 
> the instructions on multiple repositories 
> http://cwiki.apache.org/GMOxDOC21/multiple-repositories.html
>>
>>
>>
>>
>> GERONIMO_BASE vs. GERONIMO_HOME
>> If I were to break down Geronimo 2.1.1 file structure into 
>> GERONIMO_HOME and GERONIMO_BASE, would this break-down be correct?
>> - GERONIMO_HOME/bin
>> - GERONIMO_HOME/etc
>> - GERONIMO_HOME/lib
>> - GERONIMO_HOME/master-repository
>> - GERONIMO_HOME/cluster-repository
>> - GERONIMO_BASE/var
> ok
>>
>> - GERONIMO_BASE/schema
> schema is not used by geronimo, its only there for the convenience of 
> users.
> 
>>
>>
>>
>> After separating that out, what is the 
>> -Dorg.apache.geronimo.base.dir=<dir> supposed to be pointing at?  My 
>> assumption would be GERONIMO_BASE, as everything from GERONIMO_HOME 
>> should be referred to on the command line, or loaded into environment 
>> variables before or during execution of the geronimo server... 
>> $GERONIMO_HOME/bin/server.jar
>>
>>
>>
>> Point to knowing about this:
>>
>> Let's say I wanted a server specific configuration stored in /etc/, 
>> say as : /etc/geronimo-servers/default-server
>> I would want GERONIMO_BASE=/etc/geronimo-servers/default-server while 
>> GERONIMO_HOME points to everything as I have above.
> 
> You're going to have a really hard time making that work.  While its not 
> set in stone, the thinking behind the setup is that everything 
> user-modifiable such as app specific settings, logs, configuration, etc 
> etc goes in var; all the other stuff should not be modified "by hand", 
> only be e.g. deploying or undeploying more plugins (or apps).  So if you 
> want to set up an additional  server you make another var directory 
> somewhere, say <GERONIMO_HOME>/myserver1/var and set GERONIMO_BASE to that.
> 
> Geronimo has a SystemInfo component that is used to resolve paths 
> internally and it can resolve based on either HOME or BASE.  The stuff 
> that refers to user modifiable or variable content uses the 
> resolveServer method, the stuff that is shared across all instances uses 
> resolve.
>>
>>
>> And yes, I realize GERONIMO_BASE has the temp and logs directory. 
>> Sparing me the convenience of keeping this example brief, how do I 
>> achieve this simple split of the GERONIMO_HOME and GERONIMO_BASE files?
>>
>> The <GERONIMO_HOME>/bin/geronimo.sh script does not allow the 
>> separation of GERONIMO_HOME and GERONIMO_BASE as it is currently 
>> written. It looks like the liberty of both vairables pointing to the 
>> same directory has been widely accepted, thus seemingly invalidating 
>> the reason for having both variables to begin with.
>>
>>
>> A possible patch:
>> So assuming all my above asumptions are correct, this would be the 
>> patch to geronimo to fix this issue:
>>
>> -----SNIP-SNIP-----PATCH-----SNIP-SNIP-----
>>
>> Index: assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh
>> ===================================================================
>> --- assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh 
>> (revision 682467)
>> +++ 
>> assemblies/geronimo-boilerplate/src/main/underlay/bin/geronimo.sh   
>> (working copy)
>> @@ -235,11 +235,11 @@
>>   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
>>   GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"`
>>   GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
>> -  EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
>> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
>> +  EXT_DIRS="$GERONIMO_HOME/lib/ext;$JRE_HOME/lib/ext"
>> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed;$JRE_HOME/lib/endorsed"
>> else
>> -  EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
>> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
>> +  EXT_DIRS="$GERONIMO_HOME/lib/ext:$JRE_HOME/lib/ext"
>> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed:$JRE_HOME/lib/endorsed"
>> fi
>>
>> # ----- Execute The Requested Command 
>> -----------------------------------------
>> @@ -284,7 +284,7 @@
>> fi
>>
>> # Setup the Java programming language agent
>> -JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
>> +JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
>> if [ -f "$JAVA_AGENT_JAR" ]; then
>>     JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
>> else
>>
>> -----SNIP-SNIP-----END-PATCH-----SNIP-SNIP-----
>>
>>
>> Discussion???
> 
> I'm pretty sure the multiple server feature is working as designed, 
> there's an extra-repo plugin for instance.  I don't really understand 
> what you are trying to do or why you think there's a problem.  All I can 
> see is that you could copy the existing var dir to 
> etc/geronimo-servers/default-server/var and run with BASE as 
> etc/geronimo-servers/default-server however IMO this is really weird to 
> put user modifiable content inside what is intended as a read-only 
> system level directory.
> 
> Perhaps you could explain more what you are trying to do?
> 
> thanks
> david jencks
> 
>>
>>
>> -RG
> 


Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir

Posted by David Jencks <da...@yahoo.com>.
On Aug 4, 2008, at 1:13 PM, Russell E Glaue wrote:

>
> My summarized question:
>
> What is "GERONIMO_BASE" is <GERONIMO_HOME>/bin/geronimo.sh startup  
> script intended to reference?
>
>
>
> According to the documentation in that file, GERONIMO_BASE is  
> supposed to point at the base directory in which dynamic content is  
> found.
>
> I interpret dynamic content as content that is created or  
> manipulated for the purpose and use of the run-time geronimo process.
>
> Dynamic content would include:
> 1) run-time configuration files
> 2) log files
> 3) temporary directories
yes to these
>
> 4) possibly web applications

??? not sure how you got here.

However see http://cwiki.apache.org/GMOxDOC21/running-multiple-instances-of-geronimo.html 
  and the instructions on multiple repositories http://cwiki.apache.org/GMOxDOC21/multiple-repositories.html
>
>
>
>
> GERONIMO_BASE vs. GERONIMO_HOME
> If I were to break down Geronimo 2.1.1 file structure into  
> GERONIMO_HOME and GERONIMO_BASE, would this break-down be correct?
> - GERONIMO_HOME/bin
> - GERONIMO_HOME/etc
> - GERONIMO_HOME/lib
> - GERONIMO_HOME/master-repository
> - GERONIMO_HOME/cluster-repository
> - GERONIMO_BASE/var
ok
>
> - GERONIMO_BASE/schema
schema is not used by geronimo, its only there for the convenience of  
users.

>
>
>
> After separating that out, what is the - 
> Dorg.apache.geronimo.base.dir=<dir> supposed to be pointing at?  My  
> assumption would be GERONIMO_BASE, as everything from GERONIMO_HOME  
> should be referred to on the command line, or loaded into  
> environment variables before or during execution of the geronimo  
> server... $GERONIMO_HOME/bin/server.jar
>
>
>
> Point to knowing about this:
>
> Let's say I wanted a server specific configuration stored in /etc/,  
> say as : /etc/geronimo-servers/default-server
> I would want GERONIMO_BASE=/etc/geronimo-servers/default-server  
> while GERONIMO_HOME points to everything as I have above.

You're going to have a really hard time making that work.  While its  
not set in stone, the thinking behind the setup is that everything  
user-modifiable such as app specific settings, logs, configuration,  
etc etc goes in var; all the other stuff should not be modified "by  
hand", only be e.g. deploying or undeploying more plugins (or apps).   
So if you want to set up an additional  server you make another var  
directory somewhere, say <GERONIMO_HOME>/myserver1/var and set  
GERONIMO_BASE to that.

Geronimo has a SystemInfo component that is used to resolve paths  
internally and it can resolve based on either HOME or BASE.  The stuff  
that refers to user modifiable or variable content uses the  
resolveServer method, the stuff that is shared across all instances  
uses resolve.
>
>
> And yes, I realize GERONIMO_BASE has the temp and logs directory.  
> Sparing me the convenience of keeping this example brief, how do I  
> achieve this simple split of the GERONIMO_HOME and GERONIMO_BASE  
> files?
>
> The <GERONIMO_HOME>/bin/geronimo.sh script does not allow the  
> separation of GERONIMO_HOME and GERONIMO_BASE as it is currently  
> written. It looks like the liberty of both vairables pointing to the  
> same directory has been widely accepted, thus seemingly invalidating  
> the reason for having both variables to begin with.
>
>
> A possible patch:
> So assuming all my above asumptions are correct, this would be the  
> patch to geronimo to fix this issue:
>
> -----SNIP-SNIP-----PATCH-----SNIP-SNIP-----
>
> Index: assemblies/geronimo-boilerplate/src/main/underlay/bin/ 
> geronimo.sh
> ===================================================================
> --- assemblies/geronimo-boilerplate/src/main/underlay/bin/ 
> geronimo.sh (revision 682467)
> +++ assemblies/geronimo-boilerplate/src/main/underlay/bin/ 
> geronimo.sh   (working copy)
> @@ -235,11 +235,11 @@
>   GERONIMO_HOME=`cygpath --absolute --windows "$GERONIMO_HOME"`
>   GERONIMO_BASE=`cygpath --absolute --windows "$GERONIMO_BASE"`
>   GERONIMO_TMPDIR=`cygpath --windows "$GERONIMO_TMPDIR"`
> -  EXT_DIRS="$GERONIMO_BASE/lib/ext;$JRE_HOME/lib/ext"
> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed;$JRE_HOME/lib/endorsed"
> +  EXT_DIRS="$GERONIMO_HOME/lib/ext;$JRE_HOME/lib/ext"
> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed;$JRE_HOME/lib/endorsed"
> else
> -  EXT_DIRS="$GERONIMO_BASE/lib/ext:$JRE_HOME/lib/ext"
> -  ENDORSED_DIRS="$GERONIMO_BASE/lib/endorsed:$JRE_HOME/lib/endorsed"
> +  EXT_DIRS="$GERONIMO_HOME/lib/ext:$JRE_HOME/lib/ext"
> +  ENDORSED_DIRS="$GERONIMO_HOME/lib/endorsed:$JRE_HOME/lib/endorsed"
> fi
>
> # ----- Execute The Requested Command  
> -----------------------------------------
> @@ -284,7 +284,7 @@
> fi
>
> # Setup the Java programming language agent
> -JAVA_AGENT_JAR="$GERONIMO_BASE/bin/jpa.jar"
> +JAVA_AGENT_JAR="$GERONIMO_HOME/bin/jpa.jar"
> if [ -f "$JAVA_AGENT_JAR" ]; then
>     JAVA_AGENT_OPTS="-javaagent:$JAVA_AGENT_JAR"
> else
>
> -----SNIP-SNIP-----END-PATCH-----SNIP-SNIP-----
>
>
> Discussion???

I'm pretty sure the multiple server feature is working as designed,  
there's an extra-repo plugin for instance.  I don't really understand  
what you are trying to do or why you think there's a problem.  All I  
can see is that you could copy the existing var dir to etc/geronimo- 
servers/default-server/var and run with BASE as etc/geronimo-servers/ 
default-server however IMO this is really weird to put user modifiable  
content inside what is intended as a read-only system level directory.

Perhaps you could explain more what you are trying to do?

thanks
david jencks

>
>
> -RG