How to Enable Java Debugger for Glassfish Cluster Profile

Often times things work fine for Single Instance App Server, but when the same application is put on cluster mode, the results are not as expected. For glassfish, the steps I use for enabling the debugger for cluster mode is slightly from non-cluster mode. Also, there is one extra manual step involved to make the debugger work.

First for Clustered Glassfish, you can easily enable the debugger using the Admin Web GUI. Here are the steps involved. (for the purposes of illustration cluster name and instance name  is assumed to be cluster1 and instance-ONE)

  1. Log on to Admin GUI (http://<server>:4848/index.jsf). 
  2. Navigate to Configurations -> cluster1-config -> JVM Settings
  3. On the General Tab, Enable the Debug Check Box and for the Debug Options Text Box remove the port number. Leave it blank (Figure 1).
  4. Shutdown node agent (asadmin stop-node-agent)
  5. Go to domain.xml for the cluster instance (\\openesb\\glassfish\\nodeagents\\cluster1-nodeagent\\instance-ONE\\config) and enable the debug-enabled flag to true for the cluster1-config (Figure 2).
  6. Start the node agent (asadmin start-node-agent) and look for the debug port in the server log (Figure 3). The server log will print the port to use.

Debug Configuration for Clustured Glassfish

Figure 1 Figure 2

Server Log

Figure 3
Comments:

This did not work. I followed the steps exactly, and the node agent starts without indicating a debug listening port:

C:\\Program Files\\glassfish-v2u2\\bin>asadmin start-node-agent
Please enter the admin user name>admin
Please enter the admin password>
Please enter the master password [Enter to accept the default]:>
Redirecting output to C:/Program Files/glassfish-v2u2/nodeagents/SPNodeAgent1/agent/logs/server.log
Redirecting application output to C:/Program Files/glassfish-v2u2/nodeagents/SPpNodeAgent1/agent/logs/se
rver.log
Redirecting output to C:/Program Files/glassfish-v2u2/nodeagents/ScreenPopNodeAgent1/SPInstance3/logs/s
erver.log
Redirecting output to C:/Program Files/glassfish-v2u2/nodeagents/SPNodeAgent1/ScreenPopInstance1/logs/s
erver.log
Command start-node-agent executed successfully.

C:\\Program Files\\glassfish-v2u2\\bin>

Posted by Anthony on January 16, 2009 at 01:49 AM PST #

Thanks so much, worked perfectly.

Its ridiculous that it doesnt work out of the box.

Duncan

Posted by Duncan Campbell on November 03, 2010 at 10:35 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Malkit works in software development at Oracle, Inc. working in Oracle Business Process Manager, part of Oracle Fusion Middleware. Malkit came to Oracle through Sun Microsystems acquisition, living and working in Los Angeles, California.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today