[Beginner's Corner] - Re: Stop JBOSS time out
by nefertiti
sorry i wanted to put the stop script here it is
#!/bin/ksh
SITE_ID=XY_DD
TIMEOUT=300
LANG=en
LC_ALL=en_EN.ISO8859-15
TZ=MET
export LANG TZ LC_ALL
#-----------------------------------------------------------------
# Server properties
JBOSS_BIND_ADDRESS=11.11.11.11
JBOSS_SERVER_NAME=default
JBOSS_JNDI_PORT=1899
PRODUCTION_MODE=y
#-----------------------------------------------------------------
# Home directories
export JAVA_HOME="/sites/XY_DD/jboss/sdk"
export JBOSS_HOME="/sites/XY_DD/jboss"
export JBOSS_SERVER_HOME="/sites/XY_DD/JBOSS_home/server"
#-----------------------------------------------------------------
# Grab some file descriptors.
ulimit -n 1024
#-----------------------------------------------------------------
# JBoss Classpath
export JBOSS_CLASSPATH="${JBOSS_HOME}/bin/shutdown.jar:${JBOSS_HOME}/client/jnet.jar"
#-----------------------------------------------------------------
# Stop JBoss
echo "<`date`> Stopping JBoss Server for site : ${SITE_ID}..."
# Execute the JVM in the background
if [ "/sites/XY_DD" == "" ]; then
chroot /sites/${SITE_ID} su - uDD -c \
"\"${JAVA_HOME}/bin/java\" \
-classpath \"${JBOSS_CLASSPATH}\" \
org.jboss.Shutdown -s \"jnp://${JBOSS_BIND_ADDRESS}:${JBOSS_JNDI_PORT}\"" \
>> /sites/${SITE_ID}/JBOSS_home/logs/jboss_console_shutdown_`date +%Y%m%d`.log 2<&1 &
else
su - uDD -c \
"\"${JAVA_HOME}/bin/java\" \
-classpath \"${JBOSS_CLASSPATH}\" \
org.jboss.Shutdown -s \"jnp://${JBOSS_BIND_ADDRESS}:${JBOSS_JNDI_PORT}\"" \
>> /sites/${SITE_ID}/JBOSS_home/logs/jboss_console_shutdown_`date +%Y%m%d`.log 2<&1 &
fi
JBOSS_PID=$!
# Trap common signals and relay them to the jboss process
trap "kill -HUP ${JBOSS_PID}" HUP
trap "kill -TERM ${JBOSS_PID}" INT
trap "kill -QUIT ${JBOSS_PID}" QUIT
trap "kill -PIPE ${JBOSS_PID}" PIPE
trap "kill -TERM ${JBOSS_PID}" TERM
elapsed=0
while [ ! -z "`/bin/netstat -an | grep -v 127.0.0.1 | grep 11.11.11.11.*LISTEN`" ]
do
if [ $elapsed -ge ${TIMEOUT} ]; then
echo "<`date`> Timeout expired, please check the logs"
exit 1
fi
sleep 10
elapsed=$((${elapsed}+10))
done
echo "<`date`> JBoss server stopped"
exit 0
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269958#4269958
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269958
15 years, 1 month
[Beginner's Corner] - Stop JBOSS time out
by nefertiti
when launching the script of JBOSS stop the script timeout and do not stop the jboss
the shutdown process and the jboss process keep runing so i have to do a kill -9 both of them
here is the shutdown process :
java -classpath /sites/yyy/jboss/bin/shutdown.jar:/sites/yyy/jboss/client/jnet.jar org.jboss.Shut
here is the script i am using :
#!/bin/ksh
SITE_ID=yyy
TIMEOUT=300
LANG=EN
LC_ALL=fr_EN.ISO8859-15
TZ=MET
export LANG TZ LC_ALL
#-----------------------------------------------------------------
# Server properties
JBOSS_BIND_ADDRESS=111.111.11.11
JBOSS_SERVER_NAME=default
JBOSS_PARTITION_NAME=
JBOSS_CLUSTER_MULTICAST_IP=
JBOSS_CLUSTER_MULTICAST_PORT=
JBOSS_CLUSTER_EJB3ENTITY_MULTICAST_PORT=
JBOSS_CLUSTER_EJB3SFSB_MULTICAST_PORT=
JBOSS_CLUSTER_WEB_MULTICAST_PORT=
JBOSS_CLUSTER_JMXCONSOLE_MULTICAST_PORT=
PRODUCTION_MODE=n
#-----------------------------------------------------------------
# Home directories
export JAVA_HOME="/sites/yyy/jboss/sdk"
export JBOSS_HOME="/sites/yyy/jboss"
export JBOSS_SERVER_HOME="/sites/yyy/JBOSS_home/server"
#-----------------------------------------------------------------
# Virtual Machine and Memory arguments
JAVA_VM="-server"
MEM_ARGS="-Xms256m -Xmx512m -XX:MaxPermSize=128m"
#-----------------------------------------------------------------
# Grab some file descriptors.
ulimit -n 1024
#-----------------------------------------------------------------
# JBoss Classpath
#export JBOSS_CLASSPATH="/sites/yyy/data/apps/properties:${JBOSS_HOME}/bin/run.jar:${JAVA_HOME}/lib/tools.jar"
#export JBOSS_CLASSPATH="/sites/yyy/data/apps/properties/yyy:"/sites/yyy/data/apps/properties":${JBOSS_HOME}/bin/run.jar:${JAVA_HOME}/lib/tools.jar"
export JBOSS_CLASSPATH="/sites/yyy/data/apps/properties/yyy:/sites/yyy/data/apps/properties:${JBOSS_HOME}/bin/run.jar:${JAVA_HOME}/lib/tools.jar:${JBOSS_SERVER_HOME}/${JBOSS_
SERVER_NAME}/lib/ldap.jar"
#-----------------------------------------------------------------
# Java Options
export JBOSS_NATIVE_DIR="${JBOSS_HOME}/bin/native"
if [ -d "${JBOSS_NATIVE_DIR}" ]; then
if [ "x${LD_LIBRARY_PATH}" = "x" ]; then
LD_LIBRARY_PATH="${JBOSS_NATIVE_DIR}"
else
LD_LIBRARY_PATH="${JBOSS_NATIVE_DIR}:${LD_LIBRARY_PATH}"
fi
export LD_LIBRARY_PATH
if [ "x${JAVA_OPTS}" = "x" ]; then
JAVA_OPTS="-Djava.library.path=${JBOSS_NATIVE_DIR}"
else
JAVA_OPTS="${JAVA_OPTS} -Djava.library.path=${JBOSS_NATIVE_DIR}"
fi
fi
#-----------------------------------------------------------------
# Setup JBoss specific properties
JAVA_OPTS="-Dprogram.name=run.sh ${JAVA_OPTS} ${JAVA_VM} ${MEM_ARGS}"
JBOSS_ENDORSED_DIRS="${JBOSS_HOME}/lib/endorsed"
#-----------------------------------------------------------------
# Start JBoss
echo "<`date`> Starting JBoss Server for site : ${SITE_ID}..."
# Execute the JVM in the background
if [ "/sites/yyy" == "" ]; then
chroot /sites/${SITE_ID} su - yyy -c \
"\"${JAVA_HOME}/bin/java\" ${JAVA_OPTS} \
-Djava.endorsed.dirs=${JBOSS_ENDORSED_DIRS} \
-Djboss.server.base.dir=${JBOSS_SERVER_HOME} \
-Djboss.server.base.url=file:${JBOSS_SERVER_HOME} \
-Djboss.server.name=${JBOSS_SERVER_NAME} \
-Djboss.partition.name=${JBOSS_PARTITION_NAME} \
-Djboss.partition.udpGroup=${JBOSS_CLUSTER_MULTICAST_IP} \
-Djboss.hapartition.mcast_port=${JBOSS_CLUSTER_MULTICAST_PORT} \
-Djboss.ejb3entitypartition.mcast_port=${JBOSS_CLUSTER_EJB3ENTITY_MULTICAST_PORT} \
-Djboss.ejb3sfsbpartition.mcast_port=${JBOSS_CLUSTER_EJB3SFSB_MULTICAST_PORT} \
-Djboss.webpartition.mcast_port=${JBOSS_CLUSTER_WEB_MULTICAST_PORT} \
-Dlog4jPropertiesFile=/data/apps/properties/xyz-log4j.properties \
-DeqtoolsPropertiesFile=/data/apps/properties/xyz.properties \
-classpath \"${JBOSS_CLASSPATH}\" \
org.jboss.Main -b ${JBOSS_BIND_ADDRESS} $@" \
>> /sites/${SITE_ID}/JBOSS_home/logs/jboss_console_`date +%Y%m%d`.log 2<&1 &
else
su - uj2m -c \
"\"${JAVA_HOME}/bin/java\" ${JAVA_OPTS} \
-Djava.endorsed.dirs=${JBOSS_ENDORSED_DIRS} \
-Djboss.server.base.dir=${JBOSS_SERVER_HOME} \
-Djboss.server.base.url=file:${JBOSS_SERVER_HOME} \
-Djboss.server.name=${JBOSS_SERVER_NAME} \
-Djboss.partition.name=${JBOSS_PARTITION_NAME} \
-Djboss.partition.udpGroup=${JBOSS_CLUSTER_MULTICAST_IP} \
-Djboss.hapartition.mcast_port=${JBOSS_CLUSTER_MULTICAST_PORT} \
-Djboss.ejb3entitypartition.mcast_port=${JBOSS_CLUSTER_EJB3ENTITY_MULTICAST_PORT} \
-Djboss.ejb3sfsbpartition.mcast_port=${JBOSS_CLUSTER_EJB3SFSB_MULTICAST_PORT} \
-Djboss.webpartition.mcast_port=${JBOSS_CLUSTER_WEB_MULTICAST_PORT} \
-Dlog4jPropertiesFile=/sites/${SITE_ID}/data/apps/properties/xyz-log4j.properties \
-DeqtoolsPropertiesFile=/sites/${SITE_ID}/data/apps/properties/xyz.properties \
-classpath ${JBOSS_CLASSPATH} \
org.jboss.Main -b ${JBOSS_BIND_ADDRESS} $@ \
>> /sites/${SITE_ID}/JBOSS_home/logs/jboss_console_`date +%Y%m%d`.log 2<&1 &"
fi
JBOSS_PID=$!
# Trap common signals and relay them to the jboss process
trap "kill -HUP ${JBOSS_PID}" HUP
trap "kill -TERM ${JBOSS_PID}" INT
trap "kill -QUIT ${JBOSS_PID}" QUIT
trap "kill -PIPE ${JBOSS_PID}" PIPE
trap "kill -TERM ${JBOSS_PID}" TERM
elapsed=0
while [ -z "`/bin/netstat -an | grep -v 127.0.0.1 | grep 111.111.11.11:8180.*LISTEN`" ]
do
if [ $elapsed -ge ${TIMEOUT} ]; then
echo "<`date`> Timeout expired, please check the logs"
exit 1
fi
sleep 10
elapsed=$((${elapsed}+10))
done
echo "<`date`> JBoss server started"
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269956#4269956
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269956
15 years, 1 month
[Installation, Configuration & Deployment] - Re: ClassCastException due to Xerces conflict during app dep
by rheydenr02
Hi,
I've run into the same problem and tried to fix it with a jboss-classloading.xml. But, unfortunately, it didn't work for me. The curiosity is that another WAR file is working. And, additionally, a third WAR file without jboss-classloading.xml works perfectly. Here is my scenario:
- First.war (this works fine)
+--- jboss-classloading.xml
| <classloading xmlns="urn:jboss:classloading:1.0"
| name="first.war"
| domain="IsolatedWithParentDomain"
| parent-domain="DefaultDomain"
| export-all="NON_EMPTY"
| import-all="true"
| parent-first="false"/>
|
- Second.war (doesn't work)
+--- jboss-classloading.xml
| <classloading xmlns="urn:jboss:classloading:1.0"
| name="second.war"
| domain="secondDomain"
| export-all="NON_EMPTY"
| import-all="true"
| parent-first="false"/>
|
- Third.war (works)
(no jboss-classloading.xml included)
The exception I get is as follows:
| 11:23:55,424 INFO [[/second]] Initializing log4j from [classpath:log4j.properties]
| 11:23:55,450 ERROR [[/second]] Exception sending context initialized event to listener instance of class org.springframework.web.util.Log4jConfigListener
| java.lang.ExceptionInInitializerError
| at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:336)
| at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.java:73)
| at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:152)
| at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:47)
| at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)
| at org.apache.catalina.core.StandardContext.start(StandardContext.java:4393)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
| at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
| at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
| at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
| at org.jboss.web.deployers.WebModule.start(WebModule.java:97)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:597)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
| at $Proxy36.start(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
| at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
| at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
| at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.system.ServiceController.doChange(ServiceController.java:688)
| at org.jboss.system.ServiceController.start(ServiceController.java:460)
| at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)
| at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
| at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
| at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
| at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
| at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
| at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:698)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:290)
| at org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:221)
| at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
| at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
| at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
| at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
| at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
| at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
| at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)
| at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:694)
| at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
| at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
| at org.apache.log4j.LogManager.<clinit>(LogManager.java:122)
|
Is there another way to solve this issue? I've read through a bunch of articles which stated that jboss-classloading.xml is the solution for all the problems, but it didn't help. Or is there another point which I've overseen?
TIA,
Ralf.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4269953#4269953
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4269953
15 years, 1 month