[卡塔利娜家] /catalina.sh:-Dcom.sun.management.jmxremote =:未发现的Tomcat(VM选项)的IntelliJ

问题描述 投票:-1回答:1

当我运行Tomcat服务器与创建VM选项中的“编辑配置”,它出现的错误:

/`Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: -Dcom.sun.management.jmxremote=true: not found`

我找个地方在网络上的意见,在catalina.sh添加如下内容:

-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9010
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false

当我补充说,错误是在这个变化:

/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 118: -Dcom.sun.management.jmxremote=true: not found
/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 119: -Dcom.sun.management.jmxremote.port=9010: not found
/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 120: -Dcom.sun.management.jmxremote.local.only=false: not found
/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 121: -Dcom.sun.management.jmxremote.authenticate=false: not found
/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 122: -Dcom.sun.management.jmxremote.ssl=false: not found
/Tomcat/apache-tomcat-9.0.14/bin/catalina.sh: 1: eval: -Dcom.sun.management.jmxremote=: not found

Addictionally出现黄色窗口:

Application Server was not connected before run configuration stop, reason: 
Unable to ping server at localhost:1099

当我删除在Tomcat中配置“VM选项”我的连接查询,该服务器正常启动。

下面是运行/调试配置的a screenshot

tomcat intellij-idea virtual-machine catalina remote-connection
1个回答
0
投票

【解析】要做到这一点,你需要在catalina.sh写:

JAVA_OPTS="-Dcom.sun.management.jmxremote 
-Dcom.sun.management.jmxremote.port=12345 
-Dcom.sun.management.jmxremote.authenticate=false 
-Dcom.sun.management.jmxremote.ssl=false"

CATALINA_OPTS="-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false"
© www.soinside.com 2019 - 2024. All rights reserved.