geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Russell E Glaue <rgl...@cait.org>
Subject Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir
Date Tue, 05 Aug 2008 16:34:54 GMT
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
>>
> 


Mime
View raw message