Hi,

I was wondering if anyone here might have any idea about this issue I was
having debugging my Tomcat app. I posted this question on Stack Overflow
several days ago but didn't get any responses (and it said it was only
viewed 15 times despite having the Java and Tomcat tags which is weird).
Anyway, here is the question, thanks:


I'm trying to attach my Eclipse debugger running on my Windows host to a
Tomcat 8 server running in my local Vagrant box (Virtual Box) running
CentOS 7.

Here is the full error from the Eclipse logs:

java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:179)
    at java.io.DataInputStream.readFully(DataInputStream.java:189)
    at java.io.DataInputStream.readFully(DataInputStream.java:163)
    at
org.eclipse.jdi.internal.connect.SocketTransportService.readHandshake(SocketTransportService.java:216)
    at
org.eclipse.jdi.internal.connect.SocketTransportService.access$7(SocketTransportService.java:212)
    at
org.eclipse.jdi.internal.connect.SocketTransportService$3.run(SocketTransportService.java:183)
    at java.lang.Thread.run(Thread.java:761)


The output from `vagrant up` seems correct (port 8000 is the debugging
port):

==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 8000 => 8000 (adapter 1)
    default: 8443 => 8443 (adapter 1)
    default: 22 => 2222 (adapter 1)

I can access my application (using https://localhost:8443/app) via a
browser from my host without issue; connecting the debugger is the issue.
The debugger is configured for a Remote Java Application with connection
properties:

Host: localhost
Port: 8000

Starting Tomcat of course displays the correct:

Listening for transport dt_socket at address: 8000


Based on the some other questions, the answer maybe have something to do
with configuring Tomcat to run on 0.0.0.0 instead of the default.

So I tried configuring the Connectors in Tomcat's server.xml with the line
address="0.0.0.0" but the result was the same.

Any other ideas about getting this to work? Also, assuming the answer is
something to do with changing the address to 0.0.0.0, why would I need to
do that to get the debugger to work if accessing the app via browser is
already fine on localhost:8443?

P.S. It is not a firewall issue.

Reply via email to