You are not logged in.
Pages: 1
Hello, for work I need to set up a local development environment with tomcat. Since we're going to deploy tomcat6, I want to install and run tomcat6.
I installed tomcat6 through pacman. I'm using jdk from the AUR, which lives in /opt/java (containing a jre folder).
I have set the environment variable JAVA_HOME in my bashrc, source'd it. The file /etc/profiles.d/jdk.sh contains
export J2SDKDIR=/opt/java
export J2REDIR=/opt/java/jre
export PATH=$PATH:/opt/java/bin:/opt/java/db/bin:/opt/java/jre/bin
export JAVA_HOME=/opt/java
export DERBY_HOME=/opt/java/db
which seems correct.
I try to start tomcat by issuing
sudo systemctl start tomcat6
Obviously, it doesn't work.
Status:
[bbt@bbt-laptop share]$ sudo systemctl status tomcat6
tomcat6.service - Tomcat 6 servlet container
Loaded: loaded (/usr/lib/systemd/system/tomcat6.service; disabled)
Active: failed (Result: exit-code) since Thu 2013-02-07 17:03:27 CET; 8s ago
Process: 21365 ExecStart=/usr/bin/jsvc -Dcatalina.home=${CATALINA_HOME} -Dcatalina.base=${CATALINA_BASE} -Djava.io.tmpdir=/var/tmp/tomcat6/temp -cp /usr/share/java/commons-daemon.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar -user tomcat -java-home ${TOMCAT_JAVA_HOME} -wait 10 -pidfile /var/run/tomcat6.pid -errfile /var/log/tomcat6/catalina.err -outfile /var/log/tomcat6/catalina.out $CATALINA_OPTS org.apache.catalina.startup.Bootstrap (code=exited, status=1/FAILURE)
Feb 07 17:03:27 bbt-laptop systemd[1]: Starting Tomcat 6 servlet container...
Feb 07 17:03:27 bbt-laptop jsvc[21365]: Cannot locate Java Home
Feb 07 17:03:27 bbt-laptop systemd[1]: tomcat6.service: control process exited, code=exited status=1
Feb 07 17:03:27 bbt-laptop systemd[1]: Failed to start Tomcat 6 servlet container.
Feb 07 17:03:27 bbt-laptop systemd[1]: Unit tomcat6.service entered failed state
[bbt@bbt-laptop share]$
I keep getting 'Cannot locate Java Home'. Any ideas?
Edit: update, by invoking the startup.sh script the server is running. I don't get it.
Last edited by BBT (2013-02-07 16:26:09)
Offline
Edit the /usr/lib/systemd/system/tomcat6.service change the Environment=TOMCAT_JAVA_HOME=/opt/java to whatever is your JDK located at.
then issue this:
sudo systemctl --system daemon-reload
Now just start the service as usual:
sudo systemctl start tomcat6
Maybe someone will find this helpful.
Last edited by gnu_D (2013-08-27 12:46:08)
:: Python powered FOREVER ::
Offline
Pages: 1