简体   繁体   中英

Glassfish Netbeans Attaching to localhost “Connection refused”

I have no idea why this started happening and because of this I am not sure what to check. Whenever I want to debug some java code now, I get:

Attaching to localhost:9009 Connection Refused.

It is glassfish and Netbeans. Now this Chrome connector thing has started appearing. Unfortunately, now it won't stop on any of my breakpoints. Fantastic.

The last thing I was trying to do was move some hibernate config from .hbm.xml to annotations and that ended up being more pain than it was worth.

Does anyone have any ideas on how I can debug this? I have another project in Netbeans and that is also suffering from the same problem. I have tried rebooting and all of the firewalls are off.

  1. Open up the glassfish admin console in your browser ( http://localhost:4848 )
  2. Click Configurations -> server-config -> JVM Settings .
  3. Set Debug Options to: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009
  4. Ensure Debug is checked.
  5. Click Save .
  6. Restart the server.

Try your debugging again.

For some reason, it had unchecked itself.

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