'Intellij Idea remote tomcat server config
I cannot make a remote tomcat server config with remote deploy work with Intellij Idea.
I also couldn't find any tutorial about deploying a webapp on a remote server.
What I have tried so far is to follow these pages: https://www.jetbrains.com/help/idea/run-debug-configuration-tomcat-server.html and https://www.jetbrains.com/help/idea/creating-a-remote-server-configuration.html for the remote tomcat server configuration and this page: https://www.jetbrains.com/help/idea/deployment-connection-tab.html for the remote server configuration.
Here are screenshots of the configurations I have:
I also have this host configured in my server.xml local tomcat configuration file:
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">
and on the remote server I have this Java configuration:
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"
But I get this error in Intellij when I try to run the configuration:
Error running 'remote server'
Unable to connect to the remote-dev.mycompany.corp:1099, reason: javax.management.InstanceNotFoundException: Catalina:type=Deployer,host=localhost
Would someone have any guidance on what I'm doing wrong?
Thanks in advance!
[EDIT] Here is the trace of the error in Intellij log:
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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


