Tomcat 8 levando sempre para começar

1

Acabei de criar um novo servidor de aplicativos Tomcat 8 (digitalocean droplet). É o Ubuntu Server 16.04, openjdk 1.8.0_111, Tomcat 8.0.32, etc. Instalado a partir de repositórios oficiais do apt. Nada excitante.

Quando eu inicio o servidor, ele fica preso ao implantar o aplicativo ROOT e fala 10 minutos para começar!

INFO: Server startup in 604371 ms

Eu tentei transformar autoDeploy e unpackWARs em off, mas isso não faz diferença. Mesmo assim, não deve demorar 10 minutos ...

Alguém pode sugerir o que está acontecendo lá?

Obrigado Peter

    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/common/classes], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/common], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/server/classes], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/server], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:22 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
    WARNING: Problem with directory [/usr/share/tomcat8/shared], exists: [false], isDirectory: [false], canRead: [false]
    Nov 22, 2016 4:55:24 PM org.apache.catalina.core.StandardContext setPath
    WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
    Nov 22, 2016 4:55:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Valve} Setting property 'resolveHosts' to 'false' did not find a matching property.
    Nov 22, 2016 4:55:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host} Setting property 'debug' to '0' did not find a matching property.
    Nov 22, 2016 4:55:24 PM org.apache.catalina.core.StandardContext setPath
    WARNING: A context path must either be an empty string or start with a '/' and do not end with a '/'. The path [/] does not meet these criteria and has been changed to []
    Nov 22, 2016 4:55:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
    WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Valve} Setting property 'resolveHosts' to 'false' did not find a matching property.
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server version:        Apache Tomcat/8.0.32 (Ubuntu)
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server built:          Sep 16 2016 13:11:41 UTC
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Server number:         8.0.32.0
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Name:               Linux
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: OS Version:            4.4.0-47-generic
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Architecture:          amd64
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Version:           1.8.0_111-8u111-b14-2ubuntu0.16.04.2-b14
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: JVM Vendor:            Oracle Corporation
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_BASE:         /var/lib/tomcat8
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: CATALINA_HOME:         /usr/share/tomcat8
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat8/conf/logging.properties
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.awt.headless=true
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Xmx128m
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -XX:+UseConcMarkSweepGC
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.endorsed.dirs=/usr/share/tomcat8/endorsed
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.base=/var/lib/tomcat8
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Dcatalina.home=/usr/share/tomcat8
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.VersionLoggerListener log
    INFO: Command line argument: -Djava.io.tmpdir=/tmp/tomcat8-tomcat8-tmp
    Nov 22, 2016 4:55:24 PM org.apache.coyote.AbstractProtocol init
    INFO: Initializing ProtocolHandler ["http-nio-8080"]
    Nov 22, 2016 4:55:24 PM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
    INFO: Using a shared selector for servlet write/read
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 2462 ms
    Nov 22, 2016 4:55:24 PM org.apache.catalina.core.StandardService startInternal
    INFO: Starting service Catalina
    Nov 22, 2016 4:55:24 PM org.apache.catalina.core.StandardEngine startInternal
    INFO: Starting Servlet Engine: Apache Tomcat/8.0.32 (Ubuntu)
    Nov 22, 2016 4:55:24 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deploying web application directory /var/lib/tomcat8/webapps/ROOT
    Nov 22, 2016 5:05:22 PM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
    INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [596,561] milliseconds.
    Nov 22, 2016 5:05:22 PM org.apache.catalina.startup.HostConfig deployDirectory
    INFO: Deployment of web application directory /var/lib/tomcat8/webapps/ROOT has finished in 597,690 ms
    Nov 22, 2016 5:05:27 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = pcaucrdb Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "50" for "maxActive" property, which is being ignored.
    Nov 22, 2016 5:05:27 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = pcaucrdb Property removeAbandoned is not used in DBCP2, use one or both of removeAbandonedOnBorrow or removeAbandonedOnMaintenance instead. Both have default value set to false. You have set value of "true" for "removeAbandoned" property, which is being ignored.
    Nov 22, 2016 5:05:27 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = pcaucrdb Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
    Nov 22, 2016 5:05:28 PM org.apache.jasper.servlet.TldScanner scanJars
    INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
    PCAUCR: Starting context: class util.ContextListener
    Nov 22, 2016 5:05:28 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = applicensedb Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "25" for "maxActive" property, which is being ignored.
    Nov 22, 2016 5:05:28 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = applicensedb Property removeAbandoned is not used in DBCP2, use one or both of removeAbandonedOnBorrow or removeAbandonedOnMaintenance instead. Both have default value set to false. You have set value of "true" for "removeAbandoned" property, which is being ignored.
    Nov 22, 2016 5:05:28 PM org.apache.tomcat.dbcp.dbcp2.BasicDataSourceFactory getObjectInstance
    WARNING: Name = applicensedb Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
    Nov 22, 2016 5:05:29 PM org.apache.coyote.AbstractProtocol start
    INFO: Starting ProtocolHandler ["http-nio-8080"]
    Nov 22, 2016 5:05:29 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 604371 ms
    
por PrecisionPete 22.11.2016 / 23:15

2 respostas

4

Encontrou a resposta e funcionou ...

link

Basicamente ...

Vá para a pasta JDK / security e edite o java.security

no meu caso: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security

Alterar

securerandom.source=file:/dev/random

para

securerandom.source=file:/dev/./urandom

    
por 22.11.2016 / 23:44
0

Verifique a memória disponível com o comando free, existe o suficiente, especialmente o espaço de troca? Verifique o arquivo de log, catalina.out, o que isso mostra?

    
por 22.11.2016 / 23:34