tomcat - [Catalina home]/catalina.sh : -Dcom. sun.management.jmxremote=: 未找到 Tomcat(VM 选项)IntelliJ

标签 tomcat intellij-idea virtual-machine catalina remote-connection

当我在“编辑配置”中使用 making vm 选项运行 Tomcat 服务器时,出现错误:

/`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

上瘾出现黄色窗口:

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

当我从 Tomcat 配置中的“vm 选项”中删除我的连接查询时,该服务器正确启动。

这里是 a screenshot运行/调试配置。

最佳答案

[已解决] 为此,您需要在 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"

关于tomcat - [Catalina home]/catalina.sh : -Dcom. sun.management.jmxremote=: 未找到 Tomcat(VM 选项)IntelliJ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54557246/

相关文章:

java - Hibernate:非法尝试将代理与两个打开的 session 相关联

import - 导入虚拟机时出错是 Virtualbox 中的设备

azure - 1 个 VM 连接到 2 个 VNET?

JSF UTF 8 个字符只在第一个表单帖子、jsf、tomcat 中没有看到?

java - 自动重新加载Tomcat webapp?

java - 如何替换 HttpServletResponse 输出流?

Android:Logcat 在 Intellij IDEA 中不显示任何内容

scala - 为什么当我打印希腊字符时,IntelliJ 的 scala 控制台会显示问号?

Android工作室错误 "Unsupported Modules Detected: Compilation is not supported for following modules"

azure - 在 Microsoft Azure 中打开端口