Intellij Idea远程Tomcat服务器配置

时间:2018-10-29 11:17:52

标签: tomcat intellij-idea remote-debugging

我无法使用Intellij Idea进行具有远程部署的远程tomcat服务器配置。

我也找不到任何有关在远程服务器上部署Web应用程序的教程。

到目前为止,我一直尝试遵循以下页面:https://www.jetbrains.com/help/idea/run-debug-configuration-tomcat-server.htmlhttps://www.jetbrains.com/help/idea/creating-a-remote-server-configuration.html用于远程tomcat服务器配置,而此页面:https://www.jetbrains.com/help/idea/deployment-connection-tab.html用于远程服务器配置。

以下是我的配置的屏幕截图:

remote configuration

server configuration

我还在server.xml本地tomcat配置文件中配置了此主机:

<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

在远程服务器上,我具有以下Java配置:

JAVA_OPTS="${JAVA_OPTS}
-Dcom.sun.management.jmxremote=
-Dcom.sun.management.jmxremote.port=1099
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=remote-dev.mycompany.corp"

但是当我尝试运行配置时,我在Intellij中收到此错误:

Error running 'remote server'
Unable to connect to the remote-dev.mycompany.corp:1099, reason: javax.management.InstanceNotFoundException: Catalina:type=Deployer,host=localhost

有人会对我做错什么有任何指导吗?

谢谢!

[编辑] 这是Intellij日志中错误的踪迹:

    2018-10-29 11:36:28,532 [8332722]   WARN - erver.JavaeeServerInstanceImpl - Catalina:type=Deployer,host=localhost 
javax.management.InstanceNotFoundException: Catalina:type=Deployer,host=localhost
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1095)
    at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getAttribute(DefaultMBeanServerInterceptor.java:643)
    at com.sun.jmx.mbeanserver.JmxMBeanServer.getAttribute(JmxMBeanServer.java:678)
    at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1445)
    at javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)
    at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1309)
    at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1401)
    at javax.management.remote.rmi.RMIConnectionImpl.getAttribute(RMIConnectionImpl.java:639)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
    at sun.rmi.transport.Transport$1.run(Transport.java:200)
    at sun.rmi.transport.Transport$1.run(Transport.java:197)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:748)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
    at com.sun.jmx.remote.internal.PRef.invoke(Unknown Source)
    at javax.management.remote.rmi.RMIConnectionImpl_Stub.getAttribute(Unknown Source)
    at javax.management.remote.rmi.RMIConnector$RemoteMBeanServerConnection.getAttribute(RMIConnector.java:903)
    at com.intellij.javaee.oss.util.AbstractConnectorCommand.getAttribute(AbstractConnectorCommand.java:128)
    at org.jetbrains.idea.tomcat.admin.TomcatAdminServerBase$1.doExecute(TomcatAdminServerBase.java:53)
    at org.jetbrains.idea.tomcat.admin.TomcatAdminServerBase$1.doExecute(TomcatAdminServerBase.java:37)
    at com.intellij.javaee.oss.util.AbstractConnectorCommand$1.call(AbstractConnectorCommand.java:36)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
2018-10-29 11:36:28,539 [8332729]   WARN - erver.JavaeeServerInstanceImpl - javax.management.InstanceNotFoundException: Catalina:type=Deployer,host=localhost 

0 个答案:

没有答案