简体   繁体   中英

Failed to connect to remote VM. Connection refused. on glassfish for remote debugging

I checked the solution for this problem in stackoverflow and in other sites but I couldn't find any solution. My problem is when I try to debug by placing breakpoints I am getting the below error saying.

Message: “Failed to connect to remote VM. Connection Refused”

In GlassFish

jvm settings

Debug: enabled (I enabled this option)

Debug Options: -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9001

in

domain.xml

-Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9001

I changed the default address 9009 to 9001 because 9009 is not working, and we have one glassfish have multiple domains to overcome conflicts for debug default address I changed the address for debug

Eclipse IDE in debug configuration

in Connect

Host: localhost

port: 9001

Allow termination of remote VM (I enabled this options)

in Source

I added all my project files

in common

I enabled debug

as of now for me everything is looking fine but still I am unable to debug the code, can anyone help me how to solve this problem?

When I've seen this problem it's always been a blocked port. Either the server's firewall or some other firewall between you and that server. Make sure the debug port, 9001 or whatever you're configured for, is open.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM