Trying to profile tomcat [message #136904] |
Sun, 12 October 2008 15:14 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bike_head.yahoo.com
Some backgound: FC9 x64, java-1.6 opensdk, tomcat 5.5, eclipse 3.4.1,
tptp (platform 4.5.1, web apps 4.4.200, profiling 4.3.200), agent
controller 4.5.1
I have successfully profiled JUnit programs using the integrated
controller and external agent controller. However, trying to profile
these same programs under tomcat has stumped me.
First I tried creating a tomcat service instance. I set this up and it
starts fine and I can interact with my app. However when I start it using
profiling, while the server status shows it as profiling, nothing appears
on the profile monitor window.
So I then tried a different tack: adding
" -agentlib:JPIBootLoader=JPIAgent:server=controlled\;HeapProf :allocsites=true "
to CATALINA_OPTS and using an external agent controller. This resulted in
"Error occurred during initialization of VM
Could not find agent library on the library path or in the local
directory: JPIBootLoader". I have the agent on my PATH and I added the
AC's lib directory to LD_LOADER_PATH. I even tried adding tptpcore.jar to
the CLASSPATH on a guess. I then tried a simple "java -agentlib..." and
it failed too. Clearly I have some path/lookup issue, but I can't find
anything in the agent setup instructions that would give me a clue as to
what I'm doing wrong.
So what am I doing wrong. Right now I'd like to profile tomcat,
preferably from the service tab, but eventually using an external AC.
Thanks for any help
|
|
|
Re: Trying to profile tomcat [message #136916 is a reply to message #136904] |
Mon, 13 October 2008 19:57 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bike_head.yahoo.com
I did make some progress on this.It turns out I had two agents registered
with eclipse: the default one at 10002 and one I added at 10006. I
removed the 10006 and I'm able to start the tomcat server and a profiling
entry appears in the profile monitor windows. I am *still* not able to
start tomcat with a standalone AC.
However, this advance is only a small one since I never get any profiling
information (i.e. the status is always "profiling" and never changes to
indicate it is gathering information). I do get the exception at the end
of this message in the console window of the tomcat process. The only
google references I can find about this type of error are related to TPTP
and it is the case that I can run the server normally (i.e. not profiled)
through eclipse and it works fine.
As a side question, the error at the very end talks about looking in the
log file. However, in this run the AC was the internal one started by
eclipse. I looked in
<eclipse> plugins/org.eclipse.tptp.platform.ac.linux_em64t_4.4.1.v2008 08290100/agent_controller/config/,
but there is no serverlog.log like there is when I start my own AC. I
could find nothing in the <workspace>/.metadata/.log ether. So where is
the IAC log?
Thanks for any help. I really like eclipse and would love to understand
TPTP and get it working for my projects.
Oct 13, 2008 11:25:01 AM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet SOAService threw exception
java.lang.VerifyError: (class:
com/amberpoint/svrcore/types/identity/impl/AnonymousIdentity , method:
isAnonymous signature: ()Z) Expecting to find integer on stack
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at
com.amberpoint.svrcore.identity.setup.IdentitySetupRuntime.c lass$(IdentitySetupRuntime.java:157)
at
com.amberpoint.svrcore.identity.setup.IdentitySetupRuntime.r egisterDeserializationClasses(IdentitySetupRuntime.java:221)
at
com.amberpoint.svrcore.setupdata.impl.BaseSetupData.register DeserializationClasses(BaseSetupData.java:93)
at
com.amberpoint.svrcore.services.AmberPointServiceHelper.regi sterBasicDeserializationClasses(AmberPointServiceHelper.java :2658)
at
com.amberpoint.svrcore.services.coreService.impl.AmberPointC oreServiceImpl.registerDeserializationClasses(AmberPointCore ServiceImpl.java:184)
at
com.amberpoint.util.soa.utils.ServiceBase.initialize(Service Base.java:586)
at
com.amberpoint.svrcore.services.coreService.impl.AmberpointC oreService.initialize(AmberpointCoreService.java:58)
at
com.amberpoint.svrcore.services.coreService.impl.AmberPointC oreServiceImpl.initialize(AmberPointCoreServiceImpl.java:201 )
at
com.amberpoint.intermediaries.services.coreserviceintermedia ry.impl.CoreServiceIntermediary.initialize(CoreServiceInterm ediary.java:62)
at
com.amberpoint.intermediaries.services.coreserviceintermedia ry.impl.CoreServiceIntermediaryImpl.initialize(CoreServiceIn termediaryImpl.java:67)
at
com.amberpoint.util.soa.services.urservice.UrServiceImpl.doI nit(UrServiceImpl.java:322)
at
com.amberpoint.util.soa.services.urservice.UrServiceImpl.ini t(UrServiceImpl.java:270)
at
com.amberpoint.container.impl.StartupServiceInitHelper.initS ervices(StartupServiceInitHelper.java:52)
at
com.amberpoint.container.impl.WebApplicationDeploymentUnit.p rocessFirstRequest(WebApplicationDeploymentUnit.java:696)
at
com.amberpoint.container.impl.servlet.ServletDeploymentUnit. firstRequest(ServletDeploymentUnit.java:579)
at
com.amberpoint.util.soa.servlet.ServiceDeploymentServlet.doP ost(ServiceDeploymentServlet.java:224)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(A uthenticatorBase.java:432)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
at
org.apache.catalina.authenticator.SingleSignOn.invoke(Single SignOn.java:392)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:636)
[Error: EC JPIAgent received message (FATAL ERROR): Internal error (see
log file).]
|
|
|
Re: Trying to profile tomcat [message #136997 is a reply to message #136916] |
Tue, 14 October 2008 14:25 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eugene Chan![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ewchan%40ca.ibm.com) Messages: 287 Registered: July 2009 |
Senior Member |
|
|
Hi Brian,
THANKS first for your interest in using TPTP.
The information on setting up the system variables for Agent Controller is
available here:
http://dev.eclipse.org/viewcvs/index.cgi/platform/org.eclips e.tptp.platform.agentcontroller/src-native-new/packaging_md/ windows/getting_started.html?root=TPTP_Project&view=co#J ava_15
Note the part that says 'To run the Java Profiling Agent in standalone mode
on Windows, perform the following steps:', you will have to map it to Linux
as followed:
1.. export TPTP_AC_HOME=<<Agent Controller Home>>
2.. export
JAVA_PROFILER_HOME=$TPTP_AC_HOME\plugins\org.eclipse.tptp.ja vaprofiler
3.. export
LD_LIBRARY_PATH=$JAVA_PROFILER_HOME:$LD_LIBRARY_PATH:$TPTP_A C_HOME\lib
4.. export LD_LIBRARY_PATH=$LD_LIBRARY_PATH;$JAVA_HOME\bin
5.. Execute the Java application with the -agentlib parameter as described
above.
The IAC log file is actually saved under the
workspace\.metadata\.plugins\org.eclipse.tptp.platform.iac.a dministrator\config
folder.
I would suggest you try
1. stop workbench
2. make sure there is no ACServer running on your machine as well as any
dangling java process started with the ACServer.
3. setup the varilables as listed above for your Tomcat server process.
4. start ACServer (optional step, only if you are using standalone AC)
5. start workbench.
6. start the Tomcat
7. attach to profiling agent and collect.
You may also want to consider the profile on server option which integrate
Tomcat profiling for your. All you have to do is install WebTools project
and TPTP project in your Eclipse workbench, create an instance of Tomcat in
the server view and select your web application/project in workbench and
select Profile As > Profile on Server to start the profiling of your
application on the target Tomcat server.
HTH
Eugene
"Brian Anderson" <bike_head@yahoo.com> wrote in message
news:e84cc571bebd20b71c55ade2f50d33fa$1@www.eclipse.org...
>
> I did make some progress on this.It turns out I had two agents registered
> with eclipse: the default one at 10002 and one I added at 10006. I
> removed the 10006 and I'm able to start the tomcat server and a profiling
> entry appears in the profile monitor windows. I am *still* not able to
> start tomcat with a standalone AC.
>
> However, this advance is only a small one since I never get any profiling
> information (i.e. the status is always "profiling" and never changes to
> indicate it is gathering information). I do get the exception at the end
> of this message in the console window of the tomcat process. The only
> google references I can find about this type of error are related to TPTP
> and it is the case that I can run the server normally (i.e. not profiled)
> through eclipse and it works fine.
>
> As a side question, the error at the very end talks about looking in the
> log file. However, in this run the AC was the internal one started by
> eclipse. I looked in
> <eclipse> plugins/org.eclipse.tptp.platform.ac.linux_em64t_4.4.1.v2008 08290100/agent_controller/config/,
> but there is no serverlog.log like there is when I start my own AC. I
> could find nothing in the <workspace>/.metadata/.log ether. So where is
> the IAC log?
>
> Thanks for any help. I really like eclipse and would love to understand
> TPTP and get it working for my projects.
>
>
>
>
>
> Oct 13, 2008 11:25:01 AM org.apache.catalina.core.StandardWrapperValve
> invoke
> SEVERE: Servlet.service() for servlet SOAService threw exception
> java.lang.VerifyError: (class:
> com/amberpoint/svrcore/types/identity/impl/AnonymousIdentity , method:
> isAnonymous signature: ()Z) Expecting to find integer on stack
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:186)
> at
> com.amberpoint.svrcore.identity.setup.IdentitySetupRuntime.c lass$(IdentitySetupRuntime.java:157)
> at
> com.amberpoint.svrcore.identity.setup.IdentitySetupRuntime.r egisterDeserializationClasses(IdentitySetupRuntime.java:221)
> at
> com.amberpoint.svrcore.setupdata.impl.BaseSetupData.register DeserializationClasses(BaseSetupData.java:93)
> at
> com.amberpoint.svrcore.services.AmberPointServiceHelper.regi sterBasicDeserializationClasses(AmberPointServiceHelper.java :2658)
> at
> com.amberpoint.svrcore.services.coreService.impl.AmberPointC oreServiceImpl.registerDeserializationClasses(AmberPointCore ServiceImpl.java:184)
> at
> com.amberpoint.util.soa.utils.ServiceBase.initialize(Service Base.java:586)
> at
> com.amberpoint.svrcore.services.coreService.impl.AmberpointC oreService.initialize(AmberpointCoreService.java:58)
> at
> com.amberpoint.svrcore.services.coreService.impl.AmberPointC oreServiceImpl.initialize(AmberPointCoreServiceImpl.java:201 )
> at
> com.amberpoint.intermediaries.services.coreserviceintermedia ry.impl.CoreServiceIntermediary.initialize(CoreServiceInterm ediary.java:62)
> at
> com.amberpoint.intermediaries.services.coreserviceintermedia ry.impl.CoreServiceIntermediaryImpl.initialize(CoreServiceIn termediaryImpl.java:67)
> at
> com.amberpoint.util.soa.services.urservice.UrServiceImpl.doI nit(UrServiceImpl.java:322)
> at
> com.amberpoint.util.soa.services.urservice.UrServiceImpl.ini t(UrServiceImpl.java:270)
> at
> com.amberpoint.container.impl.StartupServiceInitHelper.initS ervices(StartupServiceInitHelper.java:52)
> at
> com.amberpoint.container.impl.WebApplicationDeploymentUnit.p rocessFirstRequest(WebApplicationDeploymentUnit.java:696)
> at
> com.amberpoint.container.impl.servlet.ServletDeploymentUnit. firstRequest(ServletDeploymentUnit.java:579)
> at
> com.amberpoint.util.soa.servlet.ServiceDeploymentServlet.doP ost(ServiceDeploymentServlet.java:224)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:252)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:173)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:213)
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:178)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(A uthenticatorBase.java:432)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:126)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:105)
> at
> org.apache.catalina.authenticator.SingleSignOn.invoke(Single SignOn.java:392)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:107)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:148)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:869)
> at
> org.apache.coyote.http11.Http11BaseProtocol$Http11Connection Handler.processConnection(Http11BaseProtocol.java:664)
> at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(Poo lTcpEndpoint.java:527)
> at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:80)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.ru n(ThreadPool.java:684)
> at java.lang.Thread.run(Thread.java:636)
> [Error: EC JPIAgent received message (FATAL ERROR): Internal error (see
> log file).]
>
>
>
|
|
|
Re: Trying to profile tomcat [message #137112 is a reply to message #136997] |
Wed, 15 October 2008 21:45 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bike_head.hotmail.com
Thanks for taking the time to look at my problem.
I guess I should have been more clear: I have setup all the environment
variable you outline and those in the installation instructions
(TPTP_AC_HOME, JAVA_PROFILER_HOME, PATH, LD_LIBRARY_PATH). After all that
I get "could not find agent library". I'm runing Linux FC9-x64. I have
a em64 AC I downloaded within the last few days. I get the same problem
on java "OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)" and java
"Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)"
I also tried to profile using the services window as you suggested. As I
put in the post you replied to, I get constant VerifyExceptions stack
dumps and no profiling information. I have no problem profiling JUnit
tests started from withing eclipse
I'm stuck.
|
|
|
Re: Trying to profile tomcat [message #137160 is a reply to message #137112] |
Thu, 16 October 2008 13:18 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eugene Chan![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=ewchan%40ca.ibm.com) Messages: 287 Registered: July 2009 |
Senior Member |
|
|
Hi Brian,
Could you double check and see if you have libJPIBootLoader.so in your
\eclipse\dropins\eclipse\plugins\org.eclipse.tptp.platform.j vmti.runtime....\agent_files\linux_em64t
folder,
or plugins\org.eclipse.tptp.javaprofiler?
If you do see it there, make sure your JAVA_PROFILER_HOME points to either
one of them, and have JAVA_PROFILER_HOME as part of the LD_LIBRARY_PATH.
You may want to verify that the server process does pick up the variable
setup by echoing them in your Tomcat start up script.
Eugene
"Brian Anderson" <bike_head@hotmail.com> wrote in message
news:a1e2731fd5c2569af94da5b3196fcffa$1@www.eclipse.org...
> Thanks for taking the time to look at my problem.
>
> I guess I should have been more clear: I have setup all the environment
> variable you outline and those in the installation instructions
> (TPTP_AC_HOME, JAVA_PROFILER_HOME, PATH, LD_LIBRARY_PATH). After all that
> I get "could not find agent library". I'm runing Linux FC9-x64. I have
> a em64 AC I downloaded within the last few days. I get the same problem
> on java "OpenJDK 64-Bit Server VM (build 1.6.0-b09, mixed mode)" and java
> "Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)"
>
> I also tried to profile using the services window as you suggested. As I
> put in the post you replied to, I get constant VerifyExceptions stack
> dumps and no profiling information. I have no problem profiling JUnit
> tests started from withing eclipse
>
> I'm stuck.
>
|
|
|
Powered by
FUDForum. Page generated in 0.04393 seconds