I am trying to set up Intellij remote debugging with the following conditions:
Host machine: Mac
There, in Intellij Idea I have the following configuration:
Now when I try to debug on the host machine, I get this:
Connected to the target VM, address: '172.16.253.130:57205', transport: 'socket'
Disconnected from the target VM, address: '172.16.253.130:57205', transport: 'socket'
Virtual machine (running on VMware): Windows 10 & Java 8
I add an environment variable there:
set JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=172.16.253.130:57205
And then I launch the application.
And on the virtual machine I receive:
Listening for transport dt_socket at address: 57205
Debugger failed to attach: handshake failed - connection prematurally closed
I have tried setting up addres=57205
- it didn't help.
Disabled firewalls - didn't help.
I am quite lost at this point actually. Would really appreciate any kind of help from the community.
UPDATE:
Here is server.xml for the VM machine that is running the app:
<Server port="8055" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Service name="Catalina">
<Connector port="8080" maxThreads="150" minSpareThreads="25" enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
<Connector port="8081" maxThreads="200" minSpareThreads="25" enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="-1" disableUploadTimeout="true" URIEncoding="UTF-8" scheme="https" secure="true"/>
<Connector port="8009" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" URIEncoding="UTF-8" secure="true"/>
<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="../app" unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.RemoteIpValve" remoteIpHeader="x-forwarded-for" proxiesHeader="x-forwarded-by" />
<Manager className="org.apache.catalina.session.PersistentManager" saveOnRestart="false">
<Store className="org.apache.catalina.session.FileStore"/>
</Manager>
<Context path="/app" useHttpOnly="false">
<Environment name="configuration/app" value="file:C:demo-appapp.conf" type="java.lang.String"/>
</Context>
</Host>
</Engine>
</Service>
</Server>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…