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 117464 - 0110: profile web-project in GF cluster setup
Summary: 0110: profile web-project in GF cluster setup
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: Sun All
: P2 blocker (vote)
Assignee: issues@profiler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-02 14:36 UTC by nouar38
Modified: 2008-03-31 16:00 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
snapshoot of the IDE screen/session (157.88 KB, image/jpeg)
2007-10-02 14:37 UTC, nouar38
Details
DAS server.log (79.23 KB, text/plain)
2007-10-02 14:39 UTC, nouar38
Details
node-agent (na) server.log (20.82 KB, text/plain)
2007-10-02 14:40 UTC, nouar38
Details
IDE messages.log (41.72 KB, text/plain)
2007-10-02 14:43 UTC, nouar38
Details
new process GF with jstack saved to a file (27.77 KB, text/plain)
2007-10-02 15:11 UTC, nouar38
Details
domain1 (.xml) if needed (54.82 KB, text/xml)
2007-10-02 15:17 UTC, nouar38
Details
EELogDomains proposed patch (869 bytes, patch)
2007-10-11 14:57 UTC, J Bachorik
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description nouar38 2007-10-02 14:36:09 UTC
NB 6.0 200701101200 & jdk 1.6 u2 (b05).

Profile web Project in domain1 (cluster setup) with 1 node-agent/1 cluster (not running)/ 1 instance(not running), can
see some profiling data and after 1 mn, the IDE window << the profiled application has finished execution>> popped up,
and profiling is stopped.

How to produce:
---------------
Install netbeans Web and J2EE distrib without GF v2 fcs, using root in default location.
Download GF v2 fcs and expand using cluster-setup.xml

1) Do the setup to have 1 node agent/ 1 cluster/ 1 instance: 
/tmp/testpassword created with:
AS_ADMIN_PASSWORD=adminadmin
AS_ADMIN_MASTERPASSWORD=changeit

# cd /glassfish_download/glassfish/bin
# ./asadmin start-domain
# ./asadmin create-node-agent na
# ./asadmin start-node-agent --startinstances=false --passwordfile /tmp/testpassword na
# ./asadmin create-cluster c1
# ./asadmin create-instance --cluster c1 --nodeagent na i1

all is OK.
verified with asadmin list-domains/list-node-agents/list-instances/list-clusters that only DAS and node agent are
running.

2) Start IDE using root and --userdir <set to a new path on local FS>
3) Register the server instance (DAS) as default local domain, platfrom location set to /glassfish_download/glassfish/
OK, can see the started green arrow.
4) Stop the server using the "Stop" item in Services/servers/domain1-cluster
5) Open (or create if none) a simple web application Hello World
6) call "Profile Project" item in projects, select "enable threads profiling".

in the output-web application:
<<
profile-j2ee:
start-profiled-server-extraargs:
Server is ready waiting for profiler to attach...
Profiler attached, waiting for the server to start up...
/NetBeansProjects/testProfile4/nbproject/profiler-build-impl.xml:19: The following error occurred while executing this line:
/NetBeansProjects/testProfile4/nbproject/profiler-build-impl.xml:30: Starting of server in profile mode timed-out after
300 secs.
BUILD FAILED (total time: 5 minutes 12 seconds)
>>

will attach the snapshot of the screen and the server log.
Comment 1 nouar38 2007-10-02 14:37:36 UTC
Created attachment 49991 [details]
snapshoot of the IDE screen/session
Comment 2 nouar38 2007-10-02 14:39:26 UTC
Created attachment 49992 [details]
DAS server.log
Comment 3 nouar38 2007-10-02 14:40:32 UTC
Created attachment 49993 [details]
node-agent (na) server.log
Comment 4 nouar38 2007-10-02 14:43:13 UTC
Created attachment 49995 [details]
IDE messages.log
Comment 5 nouar38 2007-10-02 15:05:14 UTC
did also "undeploy & deploy" 5 times for the same project (testProfile4). 
So, steps are:

1) Do the setup to have 1 node agent/ 1 cluster/ 1 instance.
2) Start IDE using root and --userdir <set to a new path on local FS>
3) Register the server instance (DAS) as default local domain, platfrom location set to /glassfish_download/glassfish/
4) Open (or create if none) a simple web application Hello World
"undeploy & deploy" 5 times
5) Stop the server using the "Stop" item in Services/servers/domain1-cluster
6) call "Profile Project" item in projects, select "enable threads profiling".
Comment 6 nouar38 2007-10-02 15:11:50 UTC
Created attachment 49996 [details]
new process GF with jstack saved to a file
Comment 7 nouar38 2007-10-02 15:18:02 UTC
Created attachment 49998 [details]
domain1 (.xml) if needed
Comment 8 nouar38 2007-10-02 15:29:59 UTC
After, the domain1 cannot be started any more with "Start" item in Services.
If we kill the process 21736, start is OK. But we get the harmless IDE-ERROR for server cannot be started with the 5
reasons (with jdk1.6u2-b05). Ses issue 116928 loggued with jdk1.6u1.

Comment 9 nouar38 2007-10-02 16:21:03 UTC
same behaviour if we do:
1) Start in Profile mode 
2) Profile/Attach Profiler select of the web application, and profiling only CPU (Analyze Performance ) & Profile Only
Project Classes.
Comment 10 Vince Kraemer 2007-10-02 17:57:00 UTC
have been able to reproduce.
Comment 11 Vince Kraemer 2007-10-03 01:23:06 UTC
Note: you do not have to go through all the setup that Nouar indicates.

You can...

Install NetBeans build with GF V2 b58g

start the IDE.

Use the add server wizard to add a personal domain with a cluster profile.

Create a web app that targets the newly created cluster profile domain.

Attempt to profile the web app project.

In my case...

The server appears to start.

the profiler attaches.

The Threads view starts scrolling.  the VM Telemetry starts to display.

After about 10 seconds, there is a dialog that says, "The profiled application has finished execution. Press OK to
terminate the VM."

The data in my server log looks like the data that Nouar has posted.

There is a zombie process, too...  I have to kill -9 this process to be able to start the app server after I encounter
this problem.
Comment 12 J Bachorik 2007-10-04 15:04:56 UTC
I've just checked the profiler side and it seems the problem vanishes once I get rid off using java.util.logging in one
profiler class.
If this helps I'd replace the Logger with something like System.out.println() instead.
Comment 13 Vince Kraemer 2007-10-04 18:04:54 UTC
can you send me the altered profiler jars?  I would like to validate your results, before we make a change in the profiler.
Comment 14 Vince Kraemer 2007-10-05 16:36:41 UTC
It looks like this problem can be addressed by changes in the profiler code. See
http://www.netbeans.org/issues/show_bug.cgi?id=117464#desc13.

Reassigning to that component.

I realize the bug may be in the app server code base. Someone with a better understanding of the profiler should work
with  one of the engineers from the server team to track the root cause and resolve it.
Comment 15 J Bachorik 2007-10-09 14:36:32 UTC
In the profiler code we stopped using java.util.logging.Logger. This prevents the exception to happen but it doesn't fix
the main cause which lays probably somewhere in the appserver code.
Plz, reevaluate the issue with the latest profiler build
Comment 16 nouar38 2007-10-09 15:28:46 UTC
downloading/installing daily 200710090000 on windows/xp, hope the new code of profiler is in. Test will be done using
jdk 1.6u3.
Comment 17 Vince Kraemer 2007-10-10 21:29:39 UTC
solaris 10 jdk 1.5.0 update 12, recently updated NB src, freshly installed gf v2 58g

developer profile:

registered developer profile domain (running under jdk1.5.0 update 12)
started/sopped domain
started domain in profile mode.
attached.
watched the telemetry info for a bit.
accessed the admin gui login page
saw telemetry "spikes"
detached
stopped server

repeated process with cluster profile domain

same results

This issue appears to be resolved in this configuration.
Comment 18 Vince Kraemer 2007-10-10 21:40:56 UTC
solaris 10 jdk 1.6.0 update 2, recently updated NB src, freshly installed gf v2 58g

developer profile:

registered developer profile domain (running under jdk1.6.0 update 2)
started/sopped domain
started domain in profile mode.
attached.
watched the telemetry info for a bit.
accessed the admin gui login page
saw telemetry "spikes"
detached
stopped server

cluster domain still has problem.
Comment 19 Vince Kraemer 2007-10-10 21:58:22 UTC
solaris 10, jdk 6 update 3

developer profile ok

cluster profile no joy
Comment 20 J Bachorik 2007-10-11 14:55:17 UTC
There seems to be some kind of logger configuration problem. The call to "_logger.getResourceBundleName()" in the
"com.sun.enterprise.ee.admin.lbadmin.lifecycle.LoadbalancerAdminEventListener" class.
The base root seems to be realted to the fact that in the class "com.sun.logging.ee.EELogDomains" there is a definition
of the admin logger namespace as follows: "ee.enterprise.system.tools.admin"
But, in the rest of the codebase a different namespace is used - namely "enterprise.system.tools.admin". 
So I experimented a bit and changed the definition in the EELogDomains to be "enterprise.system.tools.admin" and after
rebuild it seems that the problem has been solved.
Attaching diff so you can try the fix and then decide what to do next.
Comment 21 J Bachorik 2007-10-11 14:57:02 UTC
Created attachment 50695 [details]
EELogDomains proposed patch
Comment 22 Vince Kraemer 2007-10-11 15:37:00 UTC
I opened a parallel issue in the GF issuezilla https://glassfish.dev.java.net/issues/show_bug.cgi?id=3759

I have pointed them back to this issue and pinged them about your proposed change...
Comment 23 nouar38 2007-10-12 09:34:37 UTC
why don't we need to fix the setting of the second variable ?

<<<public static final String NODE_AGENT_LOGGER = 
          DOMAIN_ROOT + "ee.enterprise.system.nodeagent";
>>>
Comment 24 J Bachorik 2007-10-12 09:56:28 UTC
because the namespace "ee.enterprise.system.nodeagent" seems to be used systemwide while the namespace
"ee.enterprise.system.tools.admin" seems to be kind of orphaned
look inside com.sun.jbi.jsf.util.SystemLoggerUtilities for an example
Comment 25 Vince Kraemer 2007-10-12 22:08:43 UTC
I have built gf v2 ur1 with the proposed patch.  it does appear to resolve the problem.
Comment 26 Vince Kraemer 2007-10-16 16:22:38 UTC
this may require server side changes... the V1 Update 1 would be the most likely vehicle to get server side fixes to users.
Comment 27 Vince Kraemer 2007-10-25 22:59:03 UTC
The root cause of this issue was resolved by changes in the server.  The fix will be available as part of V2 update 1.
Comment 28 Petr Jiricka 2007-10-30 10:01:09 UTC
The waiver is now approved.
Comment 29 Vince Kraemer 2008-01-09 22:24:54 UTC
well, the server doesn't die... but the ant 'process' never detects that the server is running either.
Comment 30 Vince Kraemer 2008-02-01 23:07:27 UTC
I did some testing with GF V2 update 1.  This issue is still open for jdk 6.

the profiler and server appear to connect correctly under jdk5... but not under jdk 6
Comment 31 Vince Kraemer 2008-02-01 23:16:11 UTC
this is also failing with v2.1 b19 with jdk6 and nb 6.0
Comment 32 J Bachorik 2008-03-31 16:00:26 UTC
vkraemer, the symptoms you are describing originate in GlassFish and are not the same as the ones used for opening this
issue. I created a new GlassFish issue for the described problem -
https://glassfish.dev.java.net/issues/show_bug.cgi?id=4551
I would suggest closing this issue as FIXED because the original issue has been resolved