Hi,
I have installed tomcat9 in /opt/tomcat9 folder .
after execute /opt/tomcat9/bin/startup.sh , I able to access the tomcat mainpage, manager /host-manager page . but when i try to enable it as systemd service I get error when i try to access the mainpage
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
HTTP Status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
type Exception report
message java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
description The server encountered an internal error that prevented it from fulfilling this request.
exception
////////////////////////////////////////////////////////////////////////////////////////////////////////////
Here a simple script for tomcat9.service
[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target
[Service]
Type=forking
ExecStart=/opt/tomcat9/bin/startup.sh
ExecStop=/opt/tomcat9/bin/shutdown.sh
User=tomcat
Group=tomcat
[Install]
WantedBy=multi-user.targer
////////////////////////////////////////////////////////////////////////////////////////////////////////
return by systemctl status after I execute systemctl start tomcat9.service
Warning: tomcat9.service changed on disk. Run ‘systemctl daemon-reload’ to reload units.
bt01:/usr/lib/systemd/system # systemctl status tomcat9.service -l
● tomcat9.service - Apache Tomcat Web Application Container
Loaded: loaded (/usr/lib/systemd/system/tomcat9.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2016-05-06 17:44:19 SGT; 3s ago
Process: 2625 ExecStop=/opt/tomcat9/bin/shutdown.sh (code=exited, status=0/SUCCESS)
Process: 2786 ExecStart=/opt/tomcat9/bin/startup.sh (code=exited, status=0/SUCCESS)
Main PID: 2802 (java)
Tasks: 23 (limit: 512)
CGroup: /system.slice/tomcat9.service
└─2802 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat9/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -classpath /opt/tomcat9/bin/bootstrap.jar:/opt/tomcat9/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat9 -Dcatalina.home=/opt/tomcat9 -Djava.io.tmpdir=/opt/tomcat9/temp org.apache.catalina.startup.Bootstrap start
May 06 17:44:19 bt01 systemd[1]: Starting Apache Tomcat Web Application Container…
May 06 17:44:19 bt01 startup.sh[2786]: Tomcat started.
May 06 17:44:19 bt01 systemd[1]: Started Apache Tomcat Web Application Container.
Warning: tomcat9.service changed on disk. Run ‘systemctl daemon-reload’ to reload units.
am I missing something ?