From user-return-11124-apmail-geronimo-user-archive=geronimo.apache.org@geronimo.apache.org Tue Aug 05 17:52:33 2008 Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 95407 invoked from network); 5 Aug 2008 17:52:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Aug 2008 17:52:33 -0000 Received: (qmail 32559 invoked by uid 500); 5 Aug 2008 17:52:31 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 32535 invoked by uid 500); 5 Aug 2008 17:52:31 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 32524 invoked by uid 99); 5 Aug 2008 17:52:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 10:52:31 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [209.174.123.51] (HELO dubrium.sys.ma.cait.org) (209.174.123.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Aug 2008 17:51:32 +0000 Received: from st06410722729.caituser.cait.org ([64.107.227.29] helo=russ-linux.cait.org) by dubrium.sys.ma.cait.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1KQQhR-0005uA-1g for user@geronimo.apache.org; Tue, 05 Aug 2008 12:51:58 -0500 Message-ID: <4898933C.5070502@cait.org> Date: Tue, 05 Aug 2008 12:51:56 -0500 From: Russell E Glaue User-Agent: Thunderbird 2.0.0.14 (X11/20080501) MIME-Version: 1.0 To: user@geronimo.apache.org Subject: Re: GERONIMO_BASE vs. GERONIMO_HOME and org.apache.geronimo.base.dir References: <489762ED.8090507@cait.org> <4898595D.9060400@cait.org> <4898812E.3030702@cait.org> In-Reply-To: <4898812E.3030702@cait.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.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= , such that is not relative to the REAL Geronimo home directory (this is not GERONIMO_HOME). - Use of -Dorg.apache.geronimo.server.name= completely ignores GERONIMO_HOME, GERONIMO_BASE and -Dorg.apache.geronimo.base.dir= Is it a bug ?? - When -Dorg.apache.geronimo.server.name= is provided, it should look for it at the location of one of these two places: 1) if is relative, i.e. 'servers/default-server', Geronimo should look for it at this location: / 2) if 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 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.(BasicServerInfo.java:77) > > at > org.apache.geronimo.system.serverinfo.BasicServerInfo.(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 >>> >> >