[ 
https://issues.apache.org/jira/browse/GERONIMO-6270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13207877#comment-13207877
 ] 

Russell E Glaue edited comment on GERONIMO-6270 at 2/14/12 8:52 PM:
--------------------------------------------------------------------

Here is a summary of the problems I am aware of in enabling multiple instances:

# SnapshotConfigXMLBuilder: (not reported) - Wants GERONIMO_HOME/var/monitoring 
to exist, and will complain if it does not, however, the geronimo instance will 
continue to start regardless. If it cannot create the directory, Geronimo will 
show the following error when "Loading agent-car-jmx": ERROR 
[SnapshotConfigXMLBuilder] Could not make the directory 
/opt/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/
# ActiveMQ: GERONIMO-5987 (reported in comment) - ActiveMQ lock directory is 
specified relative to the working directory the user starts up the geronimo 
instance. Also, if ActiveMQ cannot create var/activemq Geronimo will fail to 
start with the following error when "Loading activemq-broker-blueprint": ERROR 
[BrokerService] Failed to start ActiveMQ JMS Message Broker. Reason: 
java.io.IOException: Failed to create directory 'var/activemq'
# GERONIMO_TMPDIR: GERONIMO-6174 - The start script sets the temp directory 
relative to GERONIMO_HOME, but instead should be set relative to the Geronimo 
Instance directory
# Karaf: GERONIMO-6174 - Karaf expects to use 
{karaf.home}/etc/shell.init.script each time a shell session is started, but I 
think ideally that should be {karaf.base}/etc/shell.init.script
# Repository: GERONIMO-6175 - The repository will use one in 
{org.geronimo.server.dir}/repository if configured, but some Geronimo code 
still expects a writable repository to exist at GERONIMO_HOME/repository. If it 
does not exist, Geronimo will fail to start with the following errors when 
"Loading rmi-naming": (1) WARN  [RMIRegistryService] RMI Registry failed, (2) 
ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED 
state: 
abstractName="org.apache.geronimo.framework/rmi-naming/3.0-beta-1/car?ServiceModule=org.apache.geronimo.framework/rmi-naming/3.0-beta-1/car,j2eeType=GBean,name=RMIRegistry"


To see some of the complaints, the var directory must be removed from 
GERONIMO_HOME, and in its place you must create a file named var. This will 
prevent Geronimo from creating GERONIMO_HOME/var when it discovers it does not 
exist.

Here is the procedure to create two geronimo instances:
# Follow steps in 
https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
# Use the below start script
# create an empty file GERONIMO_HOME/var
# To expose some issues, comment out the work-arounds and restart.


Here is a start script I use to workaround some, but not all, of the issues as 
we are able.

{noformat:borderStyle=solid}
#!/bin/bash
# Geronimo Named Instance start script
# instance: gserv1

# Uncomment this to explicitly set Geronimo's runtime Java
#JAVA_HOME=/usr/jdk1.6.0_25
#PATH=${JAVA_HOME}/bin:${PATH}

# Set the location of the Geronimo Installation, and Geronimo Instance
GHOME=/opt/geronimo3
GVIRT=gserv1
GSERV=${GHOME}/${GVIRT}

#
# The Next section works around some known issues
#

# GERONIMO-5987
# Must change to the server directory in order to work around ActiveMQ lock
# file conflict issue reported in GERONIMO-5987.
cd ${GSERV}

# GERONIMO-6174
# Uncomment for the Workaround of issues in GERONIMO-6174
GERONIMO_TMPDIR=${GSERV}/var/temp
GERONIMO_OPTS="${GERONIMO_OPTS} -Dkaraf.home=${GSERV}"

#
# This Section starts the Geronimo Instance
#
export GERONIMO_OPTS="${GERONIMO_OPTS} 
-Dorg.apache.geronimo.server.dir=${GSERV}"
export GERONIMO_TMPDIR
export GERONIMO_HOME=${GHOME}
export GERONIMO_SERVER=${GSERV}
#
# Uncomment for Normal startup, and comment out the "Interactive startup"
#${GHOME}/bin/startup
#
# Interactive startup
${GHOME}/bin/geronimo run
{noformat}


                
      was (Author: rglaue):
    Here is a summary of the problems I am aware of in enabling multiple 
instances:

# SnapshotConfigXMLBuilder: (not reported) - Wants GERONIMO_HOME/var/monitoring 
to exist, and will complain if it does not, however, the geronimo instance will 
continue to start regardless. If it cannot create the directory, Geronimo will 
show the following error when "Loading agent-car-jmx": ERROR 
[SnapshotConfigXMLBuilder] Could not make the directory 
/opt/geronimo-tomcat7-javaee6-3.0-SNAPSHOT-20111220/var/monitoring/
# ActiveMQ: GERONIMO-5987 (reported in comment) - ActiveMQ lock directory is 
specified relative to the working directory the user starts up the geronimo 
instance. Also, if ActiveMQ cannot create var/activemq Geronimo will fail to 
start with the following error when "Loading activemq-broker-blueprint": ERROR 
[BrokerService] Failed to start ActiveMQ JMS Message Broker. Reason: 
java.io.IOException: Failed to create directory 'var/activemq'
# GERONIMO_TMPDIR: GERONIMO-5987 (reported in comment) - The start script sets 
the temp directory relative to GERONIMO_HOME, but instead should be set 
relative to the Geronimo Instance directory
# Karaf: GERONIMO-6174 - Karaf expects to use 
{karaf.home}/etc/shell.init.script each time a shell session is started, but I 
think ideally that should be {karaf.base}/etc/shell.init.script
# Repository: GERONIMO-6175 - The repository will use one in 
{org.geronimo.server.dir}/repository if configured, but some Geronimo code 
still expects a writable repository to exist at GERONIMO_HOME/repository. If it 
does not exist, Geronimo will fail to start with the following errors when 
"Loading rmi-naming": (1) WARN  [RMIRegistryService] RMI Registry failed, (2) 
ERROR [GBeanInstanceState] Error while starting; GBean is now in the FAILED 
state: 
abstractName="org.apache.geronimo.framework/rmi-naming/3.0-beta-1/car?ServiceModule=org.apache.geronimo.framework/rmi-naming/3.0-beta-1/car,j2eeType=GBean,name=RMIRegistry"


To see some of the complaints, the var directory must be removed from 
GERONIMO_HOME, and in its place you must create a file named var. This will 
prevent Geronimo from creating GERONIMO_HOME/var when it discovers it does not 
exist.

Here is the procedure to create two geronimo instances:
# Follow steps in 
https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
# Use the below start script
# create an empty file GERONIMO_HOME/var
# To expose some issues, comment out the work-arounds and restart.


Here is a start script I use to workaround some, but not all, of the issues as 
we are able.

{noformat:borderStyle=solid}
#!/bin/bash
# Geronimo Named Instance start script
# instance: gserv1

# Uncomment this to explicitly set Geronimo's runtime Java
#JAVA_HOME=/usr/jdk1.6.0_25
#PATH=${JAVA_HOME}/bin:${PATH}

# Set the location of the Geronimo Installation, and Geronimo Instance
GHOME=/opt/geronimo3
GVIRT=gserv1
GSERV=${GHOME}/${GVIRT}

#
# The Next section works around some known issues
#

# GERONIMO-5987
# Must change to the server directory in order to work around ActiveMQ lock
# file conflict issue reported in GERONIMO-5987.
cd ${GSERV}

# GERONIMO-6174
# Uncomment for the Workaround of issues in GERONIMO-6174
GERONIMO_TMPDIR=${GSERV}/var/temp
GERONIMO_OPTS="${GERONIMO_OPTS} -Dkaraf.home=${GSERV}"

#
# This Section starts the Geronimo Instance
#
export GERONIMO_OPTS="${GERONIMO_OPTS} 
-Dorg.apache.geronimo.server.dir=${GSERV}"
export GERONIMO_TMPDIR
export GERONIMO_HOME=${GHOME}
export GERONIMO_SERVER=${GSERV}
#
# Uncomment for Normal startup, and comment out the "Interactive startup"
#${GHOME}/bin/startup
#
# Interactive startup
${GHOME}/bin/geronimo run
{noformat}


                  
> Re-enable multiple instances support in one installation
> --------------------------------------------------------
>
>                 Key: GERONIMO-6270
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-6270
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>    Affects Versions: 3.0-beta-1
>            Reporter: Forrest Xia
>            Assignee: Yi Xiao
>
> We need to investigate how to re-enable the multiple instances support in one 
> installation.
> Refer to 
> https://issues.apache.org/jira/browse/GERONIMO-6175
> https://issues.apache.org/jira/browse/GERONIMO-6174
> https://issues.apache.org/jira/browse/GERONIMO-5987

--
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

        

Reply via email to