Назад | Перейти на главную страницу

Tomcat 8 требует бесконечного запуска

Только что построил новый сервер приложений Tomcat 8 (капля digitalocean). Это Ubuntu Server 16.04, openjdk 1.8.0_111, Tomcat 8.0.32 и т. Д. Устанавливается из официальных репозиториев apt. Ничего захватывающего.

Когда я запускаю сервер, он застревает при развертывании приложения ROOT и говорит около 10 минут для запуска!

INFO: Server startup in 604371 ms

Я пробовал повернуть autoDeploy и unpackWARs выключен, но это не имеет значения. Даже в этом случае не должно занять 10 минут ...

Кто-нибудь может подсказать, что там происходит?

Спасибо Питер

    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

Нашел ответ, и это сработало ...

https://stackoverflow.com/a/26432537/450586

В принципе...

Перейдите в папку JDK / security и отредактируйте java.security

в моем случае: /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/security/java.security

+ Изменить

securerandom.source=file:/dev/random

к

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

Проверьте доступную память с помощью команды free, достаточно ли ее, особенно места подкачки? Проверьте файл журнала, catalina.out, что он показывает?