Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
138 views
in Technique[技术] by (71.8m points)

java - Tomcat 9 status running but page not load

i just install my new instance of Tomcat 9 using this tutorial: https://www.digitalocean.com/community/tutorials/install-tomcat-9-ubuntu-1804 But Tomcat is not display the default page on port 8080 (i got connection time out)

Here is logs of catalina startup:

  NOTE: Picked up JDK_JAVA_OPTIONS:  --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
30-Dec-2020 10:41:58.941 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.41
30-Dec-2020 10:41:58.960 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Dec 3 2020 11:43:00 UTC
30-Dec-2020 10:41:58.960 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.41.0
30-Dec-2020 10:41:58.960 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
30-Dec-2020 10:41:58.961 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            4.15.0
30-Dec-2020 10:41:58.961 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
30-Dec-2020 10:41:58.961 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-11-openjdk-amd64
30-Dec-2020 10:41:58.961 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11.0.9.1+1-Ubuntu-0ubuntu1.18.04
30-Dec-2020 10:41:58.962 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Ubuntu
30-Dec-2020 10:41:58.962 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /opt/tomcat
30-Dec-2020 10:41:58.962 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /opt/tomcat
30-Dec-2020 10:41:58.963 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
30-Dec-2020 10:41:58.963 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
30-Dec-2020 10:41:58.968 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
30-Dec-2020 10:41:58.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties
30-Dec-2020 10:41:58.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
30-Dec-2020 10:41:58.969 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
30-Dec-2020 10:41:58.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom
30-Dec-2020 10:41:58.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
30-Dec-2020 10:41:58.970 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
30-Dec-2020 10:41:58.971 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
30-Dec-2020 10:41:58.971 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms512M
30-Dec-2020 10:41:58.972 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512M
30-Dec-2020 10:41:58.972 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+UseParallelGC
30-Dec-2020 10:41:58.972 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
30-Dec-2020 10:41:58.972 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/tomcat
30-Dec-2020 10:41:58.973 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/tomcat
30-Dec-2020 10:41:58.973 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/tomcat/temp
30-Dec-2020 10:41:58.974 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The Apache Tomcat Native library which allows using OpenSSL was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
30-Dec-2020 10:41:59.844 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
30-Dec-2020 10:41:59.910 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [1456] milliseconds
30-Dec-2020 10:42:00.040 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
30-Dec-2020 10:42:00.040 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.41]
30-Dec-2020 10:42:00.046 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/examples]
30-Dec-2020 10:42:01.061 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/examples] has finished in [1,016] ms
30-Dec-2020 10:42:01.062 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/ROOT]
30-Dec-2020 10:42:01.114 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/ROOT] has finished in [52] ms
30-Dec-2020 10:42:01.114 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/host-manager]
30-Dec-2020 10:42:01.185 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/host-manager] has finished in [71] ms
30-Dec-2020 10:42:01.185 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/docs]
30-Dec-2020 10:42:01.214 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/docs] has finished in [28] ms
30-Dec-2020 10:42:01.214 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/tomcat/webapps/manager]
30-Dec-2020 10:42:01.268 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/opt/tomcat/webapps/manager] has finished in [54] ms
30-Dec-2020 10:42:01.278 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
30-Dec-2020 10:42:01.290 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [1379] milliseconds

Command systemctl status tomcat outpout

tomcat.service - Apache Tomcat Web Application Container
   Loaded: loaded (/etc/systemd/system/tomcat.service; enabled; vendor preset: enabled)
   Active: active (running) since Wed 2020-12-30 10:41:58 UTC; 7min ago
  Process: 19050 ExecStop=/opt/tomcat/bin/shutdown.sh (code=exited, status=0/SUCCESS)
  Process: 19075 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
 Main PID: 19082 (java)
    Tasks: 30 (limit: 4915)
   CGroup: /system.slice/tomcat.service
           └─19082 /usr/lib/jvm/java-1.11.0-openjdk-amd64/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Djava.secu

Dec 30 09:24:45 server-1547501-1 systemd[1]: Stopping Tomcat 9 servlet container...
Dec 30 09:24:47 server-1547501-1 systemd[1]: Stopped Tomcat 9 servlet container.
Dec 30 10:41:57 server-1547501-1 systemd[1]: Stopped Apache Tomcat Web Application Container.
Dec 30 10:41:57 server-1547501-1 systemd[1]: Starting Apache Tomcat Web Application Container...
Dec 30 10:41:58 server-1547501-1 systemd[1]: Started Apache Tomcat Web Application Container.

I got that value in my context.xml files

 <Valve className="org.apache.catalina.valves.RemoteAddrValve"
         allow="127.d+.d+.d+|::1|0:0:0:0:0:0:0:1" />

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...