公司有个项目,需要做个云喇叭系统,用户在喇叭上按按钮,触发指令到服务端,服务端收到指令后给云喇叭发消息,云喇叭播报消息。最后决定用MQTT技术,现在服务端的程序在测试研发环境调试都通过了,但是部署到服务器上出了问题。测试研发环境是在windows开发环境下的tomcat8.5,能正常运行。
MQTT的服务端程序是java开发的,生产环境是linux服务器,tomcat8.5,tomcat服务一直出于启动中,服务访问不了,好像卡死了一样,麻烦大佬帮忙看看是怎么回事。tomcat启动日志如下:
02-Sep-2022 15:41:05.035 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/8.5.82
02-Sep-2022 15:41:05.037 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Aug 8 2022 21:26:07 UTC
02-Sep-2022 15:41:05.037 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 8.5.82.0
02-Sep-2022 15:41:05.037 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Linux
02-Sep-2022 15:41:05.037 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 3.10.0-1160.el7.x86_64
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: /usr/java/jdk1.8.0_161/jre
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_161-b12
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: /opt/java/server/tomcat-kflink-mqtt
02-Sep-2022 15:41:05.038 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: /opt/java/server/tomcat-kflink-mqtt
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/opt/java/server/tomcat-kflink-mqtt/conf/logging.properties
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms1024m
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx1024m
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:NewSize=384m
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxNewSize=384m
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:MaxTenuringThreshold=10
02-Sep-2022 15:41:05.039 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -XX:+DisableExplicitGC
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dfile.encoding=UTF-8
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.security.egd=file:/dev/./urandom^M
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/opt/java/server/tomcat-kflink-mqtt
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/opt/java/server/tomcat-kflink-mqtt
02-Sep-2022 15:41:05.040 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/opt/java/server/tomcat-kflink-mqtt/temp
02-Sep-2022 15:41:05.040 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/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
02-Sep-2022 15:41:05.164 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
02-Sep-2022 15:41:05.187 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 564 ms
02-Sep-2022 15:41:05.213 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Sep-2022 15:41:05.213 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/8.5.82]
02-Sep-2022 15:41:05.225 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/opt/java/server/tomcat-kflink-mqtt/webapps/ROOT]
02-Sep-2022 15:41:05.557 FINE [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanResourcePaths No TLD files were found in resource path [/WEB-INF/].
tomcat启用就一直停在这一步了,这时tomcat也不能关闭,只能通过kill进程的方式关闭,小弟刚刚接触mqtt,请大佬帮忙看看