tomcat9状态运行但页面未加载

c86crjj0  于 2021-06-27  发布在  Java
关注(0)|答案(0)|浏览(277)

我只是使用以下教程安装我的新tomcat 9示例:https://www.digitalocean.com/community/tutorials/install-tomcat-9-ubuntu-1804 但是tomcat没有在端口8080上显示默认页面(我得到了连接超时)
以下是catalina启动日志:

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

命令系统CTL状态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.

我在context.xml文件中得到了这个值

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

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题