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

共9条 1/1 1 跳转至

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

菜鸟
2022-09-02 16:38:21     打赏

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

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

image.png


这时tomcat也不能关闭,只能通过kill进程的方式关闭,小弟刚刚接触mqtt,请大佬帮忙看看




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

菜鸟
2022-09-02 16:44:41     打赏
2楼

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/].


截图有点不清楚,复制出来吧


专家
2022-09-02 17:50:39     打赏
3楼

感谢分享


专家
2022-09-02 19:59:56     打赏
4楼

感谢分享


专家
2022-09-02 20:34:43     打赏
5楼

感谢分享


专家
2022-09-02 20:37:07     打赏
6楼

感谢分享


菜鸟
2022-09-05 13:28:56     打赏
7楼

1、在tomcat的bin/catalina.sh中加入这么一行:JAVA_OPTS="-Djava.security.egd=file:/dev/./urandom" 即可。  

       2、jvm环境:打开$JAVA_PATH/jre/lib/security/java.security这个文件,找到下面的内容:

    securerandom.source=file:/dev/urandom

    替换成

    securerandom.source=file:/dev/./urandom



菜鸟
2022-09-06 13:57:55     打赏
8楼

试试看这篇文章能不能解决,https://blog.csdn.net/sq_bang/article/details/57086263,另外还要注意在代码里面没有引用特殊的windows的特性的东西


菜鸟
2022-09-06 14:17:08     打赏
9楼

有没有等过,也许是启动时间相当长


共9条 1/1 1 跳转至

回复

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