Eu instalei o pacote tomcat8
de wheezy-backports
. Eu uso a instalação padrão / não modificada com as seguintes expectativas:
- eu uso o Oracle Java 8 JDK
- em
/etc/default/tomcat8
é adicionado: JAVA_HOME=/usr/lib/jvm/java-8-oracle
Eu posso iniciar / parar o tomcat. No entanto, muitos avisos são exibidos. Verificado com /usr/share/tomcat8/bin/configtest.sh
, a saída é:
Using CATALINA_BASE: /usr/share/tomcat8
Using CATALINA_HOME: /usr/share/tomcat8
Using CATALINA_TMPDIR: /usr/share/tomcat8/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
WARNING: Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.Catalina initDirs
SEVERE: Cannot find specified temporary folder at /usr/share/tomcat8/temp
Jan 10, 2015 4:55:40 PM org.apache.catalina.startup.Catalina load
Claramente, alguns problemas:)
- O JRE_HOME deve ser definido como JAVA_HOME, mas não é
- diretórios ausentes
- (não está claro neste exemplo) o log não está funcionando corretamente (as alterações em
/etc/tomcat8/logging.properties
não têm efeito. Mas as configurações estão corretas (consulte ps
output) e /var/lib/tomcat8/conf -> /etc/tomcat8
O que está errado aqui?
UPDATE
Saída de ps
(editada para legibilidade), que parece boa:
$ ps aux | grep java
tomcat8 15654 0.1 3.6 2643416 147024 ? Sl Jan10 1:42 /usr/lib/jvm/java-8-oracle/bin/java \
-Xmx1024m -XX:+UseConcMarkSweepGC \
-Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.awt.headless=true \
-Djava.endorsed.dirs=/usr/share/tomcat8/endorsed \
-classpath /usr/share/tomcat8/bin/bootstrap.jar:/usr/share/tomcat8/bin/tomcat-juli.jar \
-Dcatalina.base=/var/lib/tomcat8 \
-Dcatalina.home=/usr/share/tomcat8 \
-Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
org.apache.catalina.startup.Bootstrap start
UPDATE 2
O Tomcat 8 no Ubuntu tem problemas semelhantes, consulte link