简体   繁体   English

Glassfish Netbeans附加到localhost“连接被拒绝”

[英]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: 每当我想现在调试一些java代码时,我得到:

Attaching to localhost:9009 Connection Refused. 附加到localhost:9009拒绝连接。

It is glassfish and Netbeans. 它是glassfish和Netbeans。 Now this Chrome connector thing has started appearing. 现在这个Chrome连接器已经开始出现了。 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. 我试图做的最后一件事是将一些hibernate配置从.hbm.xml移到注释中,最终会比它的价值更加痛苦。

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. 我在Netbeans有另一个项目,也遇到了同样的问题。 I have tried rebooting and all of the firewalls are off. 我尝试重新启动,所有防火墙都关闭了。

  1. Open up the glassfish admin console in your browser ( http://localhost:4848 ) 在浏览器中打开glassfish管理控制台( http:// localhost:4848
  2. Click Configurations -> server-config -> JVM Settings . 单击配置 - > server-config - > JVM设置
  3. Set Debug Options to: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009 调试选项设置为: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9009
  4. Ensure Debug is checked. 确保选中Debug
  5. Click Save . 单击保存
  6. Restart the server. 重启服务器。

Try your debugging again. 再试一次调试。

For some reason, it had unchecked itself. 出于某种原因,它已经取消了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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