cancel
Showing results for 
Search instead for 
Did you mean: 

Debug error "Failed to connect to remote VM"

Former Member
0 Kudos
7,451

Hi experts

i've the following message when i try to run debug in sts:

"Failed to connect to remote VM. Connection refused. Connection refused: connect"

i saw that port 8000 is not open, even if in project.properties there's the correct property: tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

does anyone has some idea?this's very urgent because now i'm not able to debug.

Thanks for your precious help Marco

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

i've no process running in this machine, port 8001 are closed.. i can't really understand what is going on

manjeesh86
Discoverer
0 Kudos

Try with 8005 port tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8005,suspend=n -Xverify:none -DforceANSI=true

manjeesh86
Discoverer
0 Kudos

I had same issue and found another process running in machine on port 8000 and 8001 (Windows: netstat -a). I switched to 8005 and its working.
tomcat.debugjavaoptions=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8005,suspend=n -Xverify:none -DforceANSI=true

Try it.

Former Member
0 Kudos

When the server start, do you see

Listening for transport dt_socket at address: 8000

Former Member
0 Kudos

no...i don't have this text

Former Member
0 Kudos

You won't be able to connect the debugger if you don't see this line.

So either your tomcat.debugjavaoptions is overrriden by conf when the server startup or you don't start in debug mode

Former Member
0 Kudos

The config line is good. So I suggest, check in the hac if the tomcat.debugjavaoptions and the tomcat.development.mode is set

Former Member
0 Kudos

HI jean-luc

In hac: tomcat.debugjavaoptions = -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=n

tomcat.development.mode=true

looks like are set.

Former Member
0 Kudos

Where you able to connect to debug before or you never have?

My Intellij config if that helps

Former Member
0 Kudos

no, i was never able to run dubug in this machine....i was able in another one, i can't really understand what is wrong

Former Member
0 Kudos

Maybe the port 8000 is already used by another program on your machine.

rbespalovnc
Participant
0 Kudos

Either that or try to turn off the firewall and restart the hybris. The config looks good

Former Member
0 Kudos

Are you starting your hybris server in debug mode?

 ./hybrisserver.sh debug
Former Member
0 Kudos

Hi Michael

Yes, i'm starting hybris with: hybrisserver.bat debug