You are not logged in.

#1 2016-01-31 07:13:20

xpy
Member
Registered: 2016-01-28
Posts: 3

Warning "systemctl start tomcat8" does not work well

konsole : pacman -S tomcat8

create /Catalina/localhost/bug.xml and write
<Context path="/bug"  docBase="/home/myuser/bug" reloadable="true"/>

konsole : systemctl start tomcat8

open http:.//localhost:8080 , it work well.
open http://localhost:8080/bug,  show 404.

konsole:systemctl stop tomcat8
....
konsole : sh startup.sh

open http://localhost:8080 , it work well.
open http://localhost:8080/bug , it work well !


or after pacman -S tomcat8

using sh  startup.sh rather systemctl . it will work.

it is a bug ?  or my mistake ?

Thanks for help and report bug to developer(i dont hava maillist account)

Arch Linux : up to date, jdk 8u72-1 , tomcat8 8.0.30-1

Offline

#2 2016-01-31 13:54:39

ayekat
Member
Registered: 2011-01-17
Posts: 1,632

Re: Warning "systemctl start tomcat8" does not work well

Hi, welcome.
What is the content of startup.sh? What is the content of the systemd service file?

P.S.
For console output/input, you can user [ code ] tags

like this

.


pkgshackscfgblag

Online

#3 2016-01-31 14:39:44

xpy
Member
Registered: 2016-01-28
Posts: 3

Re: Warning "systemctl start tomcat8" does not work well

startup.sh

#!/bin/sh
#.....
#.....
os400=false
case "`uname`" in
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 "The file is absent or does not have execute permission"
    echo "This file is needed to run this program"
    exit 1
  fi
fi

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

tomcat8.service

[Unit]
Description=Tomcat 8 servlet container
After=network.target

[Service]
Type=forking
PIDFile=/var/run/tomcat8.pid
Environment=CATALINA_PID=/var/run/tomcat8.pid
Environment=TOMCAT_JAVA_HOME=/usr/lib/jvm/default-runtime
Environment=CATALINA_HOME=/usr/share/tomcat8
Environment=CATALINA_BASE=/usr/share/tomcat8
Environment=CATALINA_OPTS=

ExecStart=/usr/bin/jsvc \
            -Dcatalina.home=${CATALINA_HOME} \
            -Dcatalina.base=${CATALINA_BASE} \
            -Djava.io.tmpdir=/var/tmp/tomcat8/temp \
            -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \
            -user tomcat8 \
            -java-home ${TOMCAT_JAVA_HOME} \
            -pidfile /var/run/tomcat8.pid \
            -errfile SYSLOG \
            -outfile SYSLOG \
            $CATALINA_OPTS \
            org.apache.catalina.startup.Bootstrap

ExecStop=/usr/bin/jsvc \
            -pidfile /var/run/tomcat8.pid \
            -stop \
            org.apache.catalina.startup.Bootstrap

[Install]
WantedBy=multi-user.target

Offline

#4 2016-02-04 18:11:23

ayekat
Member
Registered: 2011-01-17
Posts: 1,632

Re: Warning "systemctl start tomcat8" does not work well

My, my, it seems to run yet another script named `catalina.sh`...

What is the output of this?

ls -l $(which startup.sh)

If it's a symbolic link (according to its content, it seems to be), where does it point to? In the same directory, there should be an executable script named `catalina.sh`. Could you post that script's content, too?

I'm just asking because the service file does not seem to pass through the `startup.sh` or `catalina.sh` scripts, so perhaps it's missing some of the setup work that would be necessary.

Also note that I'm just poking around in the mud - you might have a better chance contacting the package maintainer (or even upstream). To submit a bug report, you don't need a mailing list account (anyway, there is no such thing - you just subscribe to a mailing list with your regular mail address); you can create a Flyspray account on the bug tracker.


pkgshackscfgblag

Online

Board footer

Powered by FluxBB