-
1. Re: Copy JBOSS
peterj Jan 15, 2009 11:54 AM (in response to ran_sushmi)No, you do not need to copy the log folder, it will be rebuilt.
Within jboss_home/server/xxx, the only directories that need to be copied are:
* conf
* deploy
* lib
* deployers (5.0-specific)
* data (optional, need it only if the hsqldb contains information you need)
The other directories (work, tmp, log, even data) are all rebuilt. -
2. Re: Copy JBOSS
ran_sushmi Jan 16, 2009 3:44 AM (in response to ran_sushmi)hi,
thanks, for your answer. I had this query that is there a tar command to exclude the log folder? Normally, I give the tar command as:-
tar cvf <filename_tar> <folder_name> --exlude <folder_name>
But, in this case, the log folder is not down on the first level but further down the levels in server/default/logs.
I hope, my question is clear.
Please, help in solving the doubt.
regards -
3. Re: Copy JBOSS
ran_sushmi Jan 22, 2009 9:57 AM (in response to ran_sushmi)hi,
today, I tried to start the JBOSS server after copying. When I did startup.sh, it gave the error like 'jboss.log not found'. The contents of the startup.sh file are like:-
--------------------------------------------------------------------------------
cd $JBOSS_HOME/bin
LOG_PATH=$JBOSS_HOME/server/default/log/jboss.log
rm -rf $LOG_PATH
nohup $JBOSS_HOME/bin/run.sh >> $LOG_PATH 2>&1 &
unset JBOSS_HOME
~
--------------------------------------------------------------------------------
When I manually created the log folder and created the jboss.log file, then, this error did not come.
Does, it mean that the log folder has also to be copied and the perception that log folder is not required is not correct.
I hope, my question is clear.
Please, help in solving the doubt.
regards -
4. Re: Copy JBOSS
peterj Jan 22, 2009 12:19 PM (in response to ran_sushmi)You should not have to create anf files or folders to sta JBoss AS. Wait a second, startup.sh? There is no such file for JBoss AS, but there is for JBoss Web. What, exactly, are you running?
-
5. Re: Copy JBOSS
ran_sushmi Jan 23, 2009 4:40 AM (in response to ran_sushmi)thanks, for your answer. But, this file startup.sh is there in $JBOSS_HOME/bin. Also, the file, run.sh, is there. Is, there any way to know whether it is JBOSS AS or JBOSS Web?
regards -
6. Re: Copy JBOSS
sachin.parnami Jan 23, 2009 6:58 AM (in response to ran_sushmi)Can you please paste the command you are following to run the server?
There is no startup.sh in JBossAS/bin
what version are you using? -
7. Re: Copy JBOSS
ran_sushmi Jan 23, 2009 8:15 AM (in response to ran_sushmi)thanks, for your answer. The contents of run.sh are as follows:-
----------------------------------------------------------------------------------
### ====================================================================== ###
## ##
## JBoss Bootstrap Script ##
## ##
### ====================================================================== ###
### $Id: run.sh,v 1.9.2.5 2004/01/01 01:20:38 starksm Exp $ ###
export LD_LIBRARY_PATH=$BILLING_HOME/billmodules/licensing/
JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
#JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx720m"
#JAVA_OPTS: -server -Dprogram.name=run.sh -Xms200m -Xmx900m -XX:NewSize=128m -XX:MaxNewSize=128m
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
#
# Helper to complain.
#
warn() {
echo "${PROGNAME}: $*"
}
#
# Helper to puke.
#
die() {
warn $*
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
;;
esac
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r $RUN_CONF ]; then
. $RUN_CONF
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JBOSS_HOME" ] &&
JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$JAVAC_JAR" ] &&
JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
fi
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=`cd $DIRNAME/..; pwd`
fi
export JBOSS_HOME
# Increase the maximum file descriptors if we can
if [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ]; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
# Setup the classpath
runjar="$JBOSS_HOME/bin/run.jar"
if [ ! -f $runjar ]; then
die "Missing required file: $runjar"
fi
JBOSS_BOOT_CLASSPATH="$runjar"
# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
# compatible distribution which JAVA_HOME points to
if [ "x$JAVAC_JAR" = "x" ]; then
JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
fi
if [ ! -f "$JAVAC_JAR" ]; then
# MacOSX does not have a seperate tools.jar
if [ "$darwin" != "true" ]; then
warn "Missing file: $JAVAC_JAR"
warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
fi
fi
if [ "x$JBOSS_CLASSPATH" = "x" ]; then
JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
else
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
fi
# If JAVA_OPTS is not set try check for Hotspot
if [ "x$JAVA_OPTS" = "x" ]; then
# Check for SUN(tm) JVM w/ HotSpot support
if [ "x$HAS_HOTSPOT" = "x" ]; then
HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP -i HotSpot`
fi
# Enable -server if we have Hotspot, unless we can't
if [ "x$HAS_HOTSPOT" != "x" ]; then
#!/bin/sh
### ====================================================================== ###
## ##
## JBoss Bootstrap Script ##
## ##
### ====================================================================== ###
### $Id: run.sh,v 1.9.2.5 2004/01/01 01:20:38 starksm Exp $ ###
export LD_LIBRARY_PATH=$BILLING_HOME/billmodules/licensing/
JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m"
#JAVA_OPTS="$JAVA_OPTS -Xms328m -Xmx720m"
#JAVA_OPTS: -server -Dprogram.name=run.sh -Xms200m -Xmx900m -XX:NewSize=128m -XX:MaxNewSize=128m
DIRNAME=`dirname $0`
PROGNAME=`basename $0`
GREP="grep"
# Use the maximum available, or set MAX_FD != -1 to use that
MAX_FD="maximum"
#
# Helper to complain.
#
warn() {
echo "${PROGNAME}: $*"
}
#
# Helper to puke.
#
die() {
warn $*
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false;
darwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
Darwin*)
darwin=true
;;
esac
# Read an optional running configuration file
if [ "x$RUN_CONF" = "x" ]; then
RUN_CONF="$DIRNAME/run.conf"
fi
if [ -r $RUN_CONF ]; then
. $RUN_CONF
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$JBOSS_HOME" ] &&
JBOSS_HOME=`cygpath --unix "$JBOSS_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$JAVAC_JAR" ] &&
JAVAC_JAR=`cygpath --unix "$JAVAC_JAR"`
fi
# Setup JBOSS_HOME
if [ "x$JBOSS_HOME" = "x" ]; then
# get the full path (without any relative bits)
JBOSS_HOME=`cd $DIRNAME/..; pwd`
fi
export JBOSS_HOME
# Increase the maximum file descriptors if we can
if [ "$cygwin" = "false" ]; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ]; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then
# use the system max
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ]; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query system maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# Setup the JVM
if [ "x$JAVA" = "x" ]; then
if [ "x$JAVA_HOME" != "x" ]; then
JAVA="$JAVA_HOME/bin/java"
else
JAVA="java"
fi
fi
# Setup the classpath
runjar="$JBOSS_HOME/bin/run.jar"
if [ ! -f $runjar ]; then
die "Missing required file: $runjar"
fi
JBOSS_BOOT_CLASSPATH="$runjar"
# Include the JDK javac compiler for JSP pages. The default is for a Sun JDK
# compatible distribution which JAVA_HOME points to
if [ "x$JAVAC_JAR" = "x" ]; then
JAVAC_JAR="$JAVA_HOME/lib/tools.jar"
fi
if [ ! -f "$JAVAC_JAR" ]; then
# MacOSX does not have a seperate tools.jar
if [ "$darwin" != "true" ]; then
warn "Missing file: $JAVAC_JAR"
warn "Unexpected results may occur. Make sure JAVA_HOME points to a JDK and not a JRE."
fi
fi
if [ "x$JBOSS_CLASSPATH" = "x" ]; then
JBOSS_CLASSPATH="$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
else
JBOSS_CLASSPATH="$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH:$JAVAC_JAR"
fi
# If JAVA_OPTS is not set try check for Hotspot
if [ "x$JAVA_OPTS" = "x" ]; then
# Check for SUN(tm) JVM w/ HotSpot support
if [ "x$HAS_HOTSPOT" = "x" ]; then
HAS_HOTSPOT=`$JAVA -version 2>&1 | $GREP -i HotSpot`
fi
# Enable -server if we have Hotspot, unless we can't
if [ "x$HAS_HOTSPOT" != "x" ]; then
# MacOS does not support -server flag
if [ "$darwin" != "true" ]; then
JAVA_OPTS="-server"
fi
fi
fi
# Setup JBoss sepecific properties
JAVA_OPTS="$JAVA_OPTS -Dprogram.name=$PROGNAME"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
JBOSS_HOME=`cygpath --path --windows "$JBOSS_HOME"`
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
JBOSS_CLASSPATH=`cygpath --path --windows "$JBOSS_CLASSPATH"`
fi
#JAVA_OPTS="$JAVA_OPTS -Xms400m -Xmx600m -XX:NewSize=256m -XX:MaxNewSize=512m"
# Display our environment
echo "========================================================================="
echo ""
echo " JBoss Bootstrap Environment"
echo ""
echo " JBOSS_HOME: $JBOSS_HOME"
echo ""
echo " JAVA: $JAVA"
echo ""
echo " JAVA_OPTS: $JAVA_OPTS"
echo ""
echo " CLASSPATH: $JBOSS_CLASSPATH"
echo ""
echo "========================================================================="
echo ""
STATUS=10
while [ $STATUS -eq 10 ]
do
# Execute the JVM
"$JAVA" $JAVA_OPTS \
-classpath "$JBOSS_CLASSPATH" \
org.jboss.Main "$@"
STATUS=$?
# if it doesn't work, you may want to take a look at this:
# http://developer.java.sun.com/developer/bugParade/bugs/4465334.html
done
--------------------------------------------------------------------------------------
regards -
8. Re: Copy JBOSS
peterj Jan 23, 2009 10:56 AM (in response to ran_sushmi)If you have both startup.sh and run.sh, then I do not know what you have. I looked at the run.sh for JBoss AS 3.2.6 and it has this id line:
### $Id: run.sh,v 1.9.2.7 2004/12/15 16:47:36 starksm Exp $ ###
Yours is even older, so I suspect that your run.sh from JBoss AS 3.2.6.
To further determine what you have, what directories are at the same level as the bin directory? In other words, if you are in the bin directory, what is the response from 'ls -al ..'?
I looked back on your earlier posts - you stated that you are move you apps to a new JBoss AS setup. So my question to you is, what did you install? What was the name of the zip tor tag.gz file that you unpacked, and where di you get it from? That should solve the question of what you are using.