这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 物联网技术 » MQTT服务端程序部署,tomcat一直启动,卡着不动了

共3条 1/1 1 跳转至

MQTT服务端程序部署,tomcat一直启动,卡着不动了

菜鸟
2022-09-02 16:43:41     打赏

公司有个项目,需要做个云喇叭系统,用户在喇叭上按按钮,触发指令到服务端,服务端收到指令后给云喇叭发消息,云喇叭播报消息。最后决定用MQTT技术,现在服务端的程序在测试研发环境调试都通过了,但是部署到服务器上出了问题。测试研发环境是在windows开发环境下的tomcat8.5,能正常运行。

MQTT的服务端程序是java开发的,生产环境是linux服务器,tomcat8.5,tomcat服务一直出于启动中,服务访问不了,好像卡死了一样,麻烦大佬帮忙看看是怎么回事。tomcat启动日志如下:

image.png

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,请大佬帮忙看看




关键词: tomcat     部署     卡着     启动     服务     mqtt    

专家
2022-09-02 20:35:52     打赏
2楼

感谢分享


菜鸟
2022-09-21 11:00:58     打赏
3楼

1.  nginx转发、网络转发




2.  应用排查


        先验证tomcat 是否正常,将应用从tomcat中移除,进行单独启动tomcat.


3. 端口排查


        验证了应用可以链接的所有外部端口,是否可以正常访问。


最后使用jstack 进行监控进程ID,进行排查,检查jdbc RUNNABLE状态,是否有请求,无返回。数据库排查 Waiting for table flush,检查最近数据库是否有备份,参数是否有问题,如有需要调整。重启应用解决。





========================


深圳BGP 电信单线单IP 119/月


微端BGP,100M  299/月


枣庄BGP,50M 100G防 599/月


枣庄BGP32-32-50M 100G防


枣庄BGP32-64-100M 100G防


i9-9900K-64G-50M 100G防


i9-9900K-64G-100M  100G防 


更多配置地区欢迎老板加Q2850309052咨询备用!



共3条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]