Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 847
bulltorious Avatar asked Sep 23 '14 11:09

bulltorious


1 Answers

  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.

like image 190
bulltorious Avatar answered Oct 07 '22 04:10

bulltorious