This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 195166 - GlassFish won't start in debug mode
Summary: GlassFish won't start in debug mode
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 12:13 UTC by gholmer
Modified: 2011-02-10 14:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gholmer 2011-02-08 12:13:56 UTC
[ BUILD # : 201102052128 ]
[ JDK VERSION : 1.6.23 ]

1) install NetBeans 201102052128 with GlassFish b40.
2) right-click server node in Services tab, select "Start in Debug Mode".
3) try to attach debugger, fails
4) open GlassFish admin console in a web browser, check "Debug: Enabled" in JVM
settings
5) right-click server node in Services tab, select "Stop"
6) right-click server node in Services tab, select "Start in Debug Mode".
7) try to attach debugger, fails
8) rigt-click server node in Services tab, select "Stop"
9) manually start the server via "bin/asadmin start-domain domain1"
10) try to attach debugger, attach is now successful

In other words, it won't start in debug mode from NetBeans even when the debug
mode checkbox is selected, but it does work right if you start the server
manually.
Comment 1 gholmer 2011-02-08 12:19:39 UTC
Wait, I think I found it... in the server settings dialog, Java tab, the default address for debugging is set to 41127, but GlassFish defaults to 9009. If I change that, I can start GlassFish in debug mode from NetBeans. This should be changed to default to the same as GlassFish.
Comment 2 Vince Kraemer 2011-02-08 15:02:03 UTC
what port did you specify as the debug port?

Anything interesting in the ide log?
Comment 3 Vince Kraemer 2011-02-08 15:49:29 UTC
(In reply to comment #1)
> Wait, I think I found it... in the server settings dialog, Java tab, the
> default address for debugging is set to 41127, but GlassFish defaults to 9009.
> If I change that, I can start GlassFish in debug mode from NetBeans. This
> should be changed to default to the same as GlassFish.

Opps.  I did not see this note when I drafted my first response.

What is 'that' in the sentence, "If I change that, I can start GlassFish in debug mode from Netbeans"
Comment 4 gholmer 2011-02-08 15:54:57 UTC
"in the server settings dialog, Java tab, the default address for debugging is set to 41127"

If I change 41127 to 9009 in NetBeans, it works. GlassFish defaults to 9009, yes? so why would NetBeans default the debugger attach to a different port?
Comment 5 Vince Kraemer 2011-02-08 20:11:35 UTC
(In reply to comment #4)

> "in the server settings dialog, Java tab, the default address for debugging is
> set to 41127"
> 
> If I change 41127 to 9009 in NetBeans, it works. GlassFish defaults to 9009,
> yes? so why would NetBeans default the debugger attach to a different port?

because the IDE started the server's debugger on port 41127 when you used the 'Start in Debug Mode' action....

The fact that it started on 41127 just was not made clear, so when you said.. Attach to 9009... in the 'Attach debugger' dialog, the connection gets refused... since there is no debugger there.

I am doing a couple things to resolve this...

1. Forcing the IDE to start the server's debugger on 9009... if possible.

2. opening a modeless dialog that gives the port number of the server's debugger IF port 9009 was occupied for some reason.

I am also trying to track down an api that will let the server startup task change the default of the 'Port' field on the Attach Debugger dialog... which would mean that users would not need to read the dialog at all.
Comment 6 Quality Engineering 2011-02-10 11:30:25 UTC
Integrated into 'main-golden', will be available in build *201102100500* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/dd9cdca41bd4
User: vince kraemer <vkraemer@netbeans.org>
Log: #195166 : use better default value... display port value to user
Comment 7 gholmer 2011-02-10 14:55:26 UTC
Verified in build 201102100500, thanks!