Tomcat7이 앱 배포시 중단


10

Ubuntu 14.04의 Tomcat 7에서 매우 이상한 동작이 있습니다.

새 VPS를 만들고 default-jdk 및 기타 간단한 항목을 설치했습니다. 다운로드 및 압축 해제 톰캣 7.이 실행되는 것을 검사 [myIP]:8080하고, 톱 Tomcat의 인덱스 페이지.

VPS를 재부팅 한 후 Tomcat을 다시 시작했는데에 응답이 없습니다 [myIP]:8080. 오류조차 없습니다. 로그를 확인했을 때 Tomcat이 첫 번째 webapp에서 배포 상태로 중단되는 것을 보았습니다.

내 로그 :

Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/7.0.57
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 3 2014 08:39:16 UTC
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         7.0.57.0
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Linux
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            3.13.0-37-generic
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME:             /usr/lib/jvm/java-7-openjdk-amd64/jre
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.7.0_65-b32
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         /opt/tomcat
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         /opt/tomcat
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/opt/tomcat
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/opt/tomcat
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
Dec 31, 2014 9:06:04 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Dec 31, 2014 9:06:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:06:04 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2327 ms
Dec 31, 2014 9:06:04 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 31, 2014 9:06:04 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Dec 31, 2014 9:06:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/host-manager
Dec 31, 2014 9:11:09 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [303,104] milliseconds.
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomcat/webapps/host-manager has finished in 304,682 ms
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/manager
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomcat/webapps/manager has finished in 271 ms
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/docs
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomcat/webapps/docs has finished in 205 ms
Dec 31, 2014 9:11:09 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/examples
Dec 31, 2014 9:11:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomcat/webapps/examples has finished in 1,422 ms
Dec 31, 2014 9:11:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/ROOT
Dec 31, 2014 9:11:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory /opt/tomcat/webapps/ROOT has finished in 177 ms
Dec 31, 2014 9:11:11 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:11:11 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:11:11 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 306957 ms
Dec 31, 2014 9:17:35 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:17:35 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:17:35 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Dec 31, 2014 9:17:36 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:17:36 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:17:36 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:17:36 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/7.0.57
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 3 2014 08:39:16 UTC
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         7.0.57.0
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Linux
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            3.13.0-37-generic
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME:             /usr/lib/jvm/java-7-openjdk-amd64/jre
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.7.0_65-b32
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         /opt/tomcat
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         /opt/tomcat
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/opt/tomcat
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/opt/tomcat
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
Dec 31, 2014 9:20:01 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Dec 31, 2014 9:20:01 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:20:01 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:20:01 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1536 ms
Dec 31, 2014 9:20:02 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 31, 2014 9:20:02 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Dec 31, 2014 9:20:02 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/host-manager
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/7.0.57
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 3 2014 08:39:16 UTC
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         7.0.57.0
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Linux
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            3.13.0-37-generic
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JAVA_HOME:             /usr/lib/jvm/java-7-openjdk-amd64/jre
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.7.0_65-b32
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         /opt/tomcat
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         /opt/tomcat
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=/opt/tomcat/endorsed
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=/opt/tomcat
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=/opt/tomcat
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
Dec 31, 2014 9:33:38 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
Dec 31, 2014 9:33:38 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Dec 31, 2014 9:33:38 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Dec 31, 2014 9:33:38 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2495 ms
Dec 31, 2014 9:33:39 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Dec 31, 2014 9:33:39 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.57
Dec 31, 2014 9:33:39 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat/webapps/host-manager

74 행까지는 정상적인 서버 시작입니다. 모든 표준 웹앱은 48-68 줄로 배포되었지만 그 후 중단되었습니다. 그래서 서버를 멈추고 시스템을 재부팅했습니다. 바람둥이가 다시 시작되고 기적이 시작됩니다. 다음 세션은 89-136 행에 있으며에 대한 항목이 없음을 알 수 있습니다 Server startup in xxxx ms.

배포가 중단되고이 상황은 항상 반복됩니다. 이 문제의 원인은 무엇입니까? 나는이 문제로 어려움을 겪고 몇 시간을 보냈고 미친 짓을하고 아무데도 가지 못했습니다.


나는 여기에서 좋은 결정을 찾았습니다. 우리는 엔트로피로 opur 시스템을 지원하는 데몬 랜덤 생성기를 업데이트해야합니다. stackoverflow.com/questions/27612209/…
Asprelis

답변:


22

가능한 문제는 Tomcat이 엔트로피가 쌓이기를 기다리는 것입니다. jstack누가 무엇을 기다리고 있는지 확인하기 위해 몇 개의 스레드 덤프를 가져 가십시오 .

Tomcat 7+는 SecureRandom클래스에 의존 하여 세션 ID 및 기타 것들에 임의의 값을 제공합니다. JRE에 따라 초기화에 사용되는 엔트로피 소스가 엔트로피 SecureRandom가 부족 하면 시작 중에 지연이 발생할 수 있습니다 .

문제가 엔트로피 인 경우 다음 시스템 특성을 설정하여 비 차단 엔트로피 소스를 사용하도록 JRE를 구성하는 방법이 있습니다.

-Djava.security.egd=file:/dev/./urandom

자세한 내용은이 관련 토론을 참조하십시오 .


정보 : [SHA1PRNG]를 사용하여 세션 ID 생성을위한 SecureRandom 인스턴스를 만드는 데 [4,118,269] 밀리 초가 걸렸습니다. 당신이 옳은 것 같습니다. 엔트로피 소스를 변경해 보도록하겠습니다
Asprelis

오 신 이시여 감사합니다 !!! 나는이 문제로 약 2 일 동안 고민하고 있습니다!
Rugal

대안 솔루션은 haveged엔트로피를 제공하는 / dev / random에 피드 를 설치 하는 것입니다. digitalocean.com/community/tutorials/…
James

1
물론 @James,하지만 당신은 세부 사항에주의해야합니다 security.stackexchange.com/questions/34523/…
Federico Sierra

0

누군가에게 도움이 될 수 있습니다.

pom.xml에 이러한 종속성이 없는지 확인하십시오.

    <dependency>
        <groupId>org.apache.tomcat.maven</groupId>
        <artifactId>tomcat7-maven-plugin</artifactId>
        <version>2.2</version>
    </dependency>

    <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-catalina</artifactId>
        <version>8.0.23</version>
    </dependency>

이유를 설명해 주시겠습니까? 내 프로젝트 중 하나에 이러한 종속성이 있습니다. 그리고 모두 괜찮아 보인다.
Asprelis

0

문제의 가능한 원인 : 키 저장소 파일 경로의 입력 오류 :

keystoreFile="conf/cert/certificate.ks"

실제로 이런 일이 발생할 수 있으며 서버로드 프로세스 중 발생한 오류를 간과 할 수 있습니다.
hello_earth
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.