[opencms-dev] Solved: Unable to read the OpenCms XML configuration, tomcat5.pid Permission denied, scratchDir ... unusable

contact contact at living-structures.de
Wed Jul 22 10:45:02 CEST 2009


the error was trying to start tomcat with
rctomcat5 start

i used another startup script wich was located under
/usr/share/tomcat5/bin/startup.sh
_______________________________________startup.sh
#!/bin/sh
# 
-----------------------------------------------------------------------------
# Start Script for the CATALINA Server
#
# $Id: startup.sh,v 1.3.2.1 2004/11/17 20:06:34 yoavs Exp $
# 
-----------------------------------------------------------------------------

export JAVA_HOME="/usr/lib64/jvm/java-sun/"
export CATALINA_OPTS="-server -Xms128m -Xmx512m"
export CATALINA_HOME=/usr/share/tomcat5
export CATALINA_BASE=/home/gid/gid-online.com/tomcat/gid-online.com

# Detect OS400: see Bugzilla 31132
os400=false
case "`uname`" in
CYGWIN*) cygwin=true;;
OS400*) os400=true;;
esac
 
# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done
 
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh

# Check that target executable exists
if $os400; then
  # -x will Only work on the os400 if the files are:
  # 1. owned by the user
  # 2. owned by the PRIMARY group of the user
  # this will not work if the user belongs in secondary groups
  eval
else
  if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
    echo "Cannot find $PRGDIR/$EXECUTABLE"
    echo "This file is needed to run this program"
    exit 1
  fi
fi

exec "$PRGDIR"/"$EXECUTABLE" start "$@"
_______________________________________EOF

... and to stop the Tomcat
/usr/share/tomcat5/bin/shutdown.sh
_______________________________________shutdown.sh
#!/bin/sh
# 
-----------------------------------------------------------------------------
# Stop script for the CATALINA Server
#
# $Id: shutdown.sh,v 1.3 2002/08/04 18:19:43 patrickl Exp $
# 
-----------------------------------------------------------------------------

export JAVA_HOME="/usr/lib64/jvm/java-sun/"

# resolve links - $0 may be a softlink
PRG="$0"

while [ -h "$PRG" ] ; do
  ls=`ls -ld "$PRG"`
  link=`expr "$ls" : '.*-> \(.*\)$'`
  if expr "$link" : '.*/.*' > /dev/null; then
    PRG="$link"
  else
    PRG=`dirname "$PRG"`/"$link"
  fi
done
 
PRGDIR=`dirname "$PRG"`
EXECUTABLE=catalina.sh

# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  echo "Cannot find $PRGDIR/$EXECUTABLE"
  echo "This file is needed to run this program"
  exit 1
fi

exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
_______________________________________EOF


help yourself!






ls schrieb:
> Hi Group,
>
> after three years of running opencms stable (with tomcat on linux 2.6)
> i got an old error back ...
>
> org.opencms.main.CmsInitException: Critical error during OpenCms initialization: Unable to read the OpenCms XML configuration.
> 	org.opencms.main.OpenCmsCore.getInstance(OpenCmsCore.java:269)
> 	org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:127)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>
> ... together with some (classic) log-file error-messages:
>
> (from catalina.out)
> SEVERE: The scratchDir you specified: 
> /home/gid/gid-online.com/tomcat/gid-online.com/work/Catalina/localhost/opencms 
> is unusable.
>
> ... and (from tomcat start.log)
> /usr/share/tomcat5/bin/catalina.sh: line 284: /var/run/tomcat5.pid: 
> Permission denied
>
>
> As far as i understand these errors has something to do withe the 
> user-rights where tomcat
> runs on, but i don't know enough, (to solve this by edding the related 
> config-files), to fix it.
>
> Is there someone out there who can guide/help me ?
>
> regards,
> Andrew
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>   



More information about the opencms-dev mailing list