Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » attach failed error
attach failed error [message #136596] Wed, 01 October 2008 22:23 Go to next message
chen is currently offline chenFriend
Messages: 2
Registered: July 2009
Junior Member
Hello,

I am new user for tptp. So pardon me if something is totally wrong here.

I am using the following env.
OS: windows XP
jdk: 1.5.11
eclipse: 3.4.1
tomcat 5.5.23 (using sysdeo plugin in eclipse to invoke it.)

I got tptp through eclipse update. Here are some info:
TPTP platform project is 4.5.1
TPTP Tracing and profiling tools project is 4.3.2
....

I installed the tptp agent controller 4.5.1. (also set the path
environment variable etc.)

I am trying to profiling my tomcat app. I just started tomcat app then
attach the tptp profiler to the app. I am able to do that using the
following jvm option:
-XrunpiAgent:server=enabled

But if I am trying to use the following option, which I should since I
am using jdk 1.5:
-agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf:all ocsites=true

Once I choose the agent and click profile button. It will bring me to
the profile perspective. It seems it tried to profiling then get
terminated. It also print out error:
[Error: Attach failed]

I have no clue where and why the attach failed. And I don't see any
servicelog.log in my agent_install_dir/conf.

Would you some experts point me to the right direction?

thanks.
Re: attach failed error [message #136631 is a reply to message #136596] Thu, 02 October 2008 13:44 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene ChanFriend
Messages: 287
Registered: July 2009
Senior Member
Hi,

Have you tried run with
-agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf
Do you see anything suspicious in the agent controller log file (under
AC/config/servicelog.log)

Alternatively, you can use the profile on server option available in
WTP-TPTP integration, it enables you to select your web application or
simply select a server instance and right-click and 'profile' the selection
on a target server. Profile on Server dialog shows and you can select the
profiling option you prefer (HeapProf is one of the options there).

Eugene


"yc" <jadedr@gmail.com> wrote in message
news:gc0t93$vus$1@build.eclipse.org...
> Hello,
>
> I am new user for tptp. So pardon me if something is totally wrong here.
>
> I am using the following env.
> OS: windows XP
> jdk: 1.5.11
> eclipse: 3.4.1
> tomcat 5.5.23 (using sysdeo plugin in eclipse to invoke it.)
>
> I got tptp through eclipse update. Here are some info:
> TPTP platform project is 4.5.1
> TPTP Tracing and profiling tools project is 4.3.2
> ...
>
> I installed the tptp agent controller 4.5.1. (also set the path
> environment variable etc.)
>
> I am trying to profiling my tomcat app. I just started tomcat app then
> attach the tptp profiler to the app. I am able to do that using the
> following jvm option:
> -XrunpiAgent:server=enabled
>
> But if I am trying to use the following option, which I should since I am
> using jdk 1.5:
> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf:all ocsites=true
>
> Once I choose the agent and click profile button. It will bring me to the
> profile perspective. It seems it tried to profiling then get terminated.
> It also print out error:
> [Error: Attach failed]
>
> I have no clue where and why the attach failed. And I don't see any
> servicelog.log in my agent_install_dir/conf.
>
> Would you some experts point me to the right direction?
>
> thanks.
>
>
>
>
Re: attach failed error [message #136669 is a reply to message #136631] Thu, 02 October 2008 17:35 Go to previous messageGo to next message
chen is currently offline chenFriend
Messages: 2
Registered: July 2009
Junior Member
Hello, Eugene,

thanks for replying.

I tried some the following: (b is a simple java program)
C:\Temp>java -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf b
1192147231051
10/12/2007
12
1192492771051
1
1
1
1


I don't see any error or AC_home/config/servicelog.log generated.

Here is my path:

C:\Temp>set path
Path=C:\dev\Java\jdk1.5.0_11\bin;C:\Perl\bin\;c:\oracle\ora8 1\bin;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C: \WINDOWS\System32\Wbem;
C:\Program Files\PuTTY;C:\Program Files\Perforce;c:\Program
Files\Microsoft SQL
Server\90\Tools\binn\;C:\tptpAC\plugins\org.eclipse.tptp.jav aprofiler;C:\tptpAC\
bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH


would you take a look to see if anything wrong with my env?

I will take a look at WTP and try to set it up.

thanks.

Eugene Chan wrote:
> Hi,
>
> Have you tried run with
> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf
> Do you see anything suspicious in the agent controller log file (under
> AC/config/servicelog.log)
>
> Alternatively, you can use the profile on server option available in
> WTP-TPTP integration, it enables you to select your web application or
> simply select a server instance and right-click and 'profile' the selection
> on a target server. Profile on Server dialog shows and you can select the
> profiling option you prefer (HeapProf is one of the options there).
>
> Eugene
>
>
> "yc" <jadedr@gmail.com> wrote in message
> news:gc0t93$vus$1@build.eclipse.org...
>> Hello,
>>
>> I am new user for tptp. So pardon me if something is totally wrong here.
>>
>> I am using the following env.
>> OS: windows XP
>> jdk: 1.5.11
>> eclipse: 3.4.1
>> tomcat 5.5.23 (using sysdeo plugin in eclipse to invoke it.)
>>
>> I got tptp through eclipse update. Here are some info:
>> TPTP platform project is 4.5.1
>> TPTP Tracing and profiling tools project is 4.3.2
>> ...
>>
>> I installed the tptp agent controller 4.5.1. (also set the path
>> environment variable etc.)
>>
>> I am trying to profiling my tomcat app. I just started tomcat app then
>> attach the tptp profiler to the app. I am able to do that using the
>> following jvm option:
>> -XrunpiAgent:server=enabled
>>
>> But if I am trying to use the following option, which I should since I am
>> using jdk 1.5:
>> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf:all ocsites=true
>>
>> Once I choose the agent and click profile button. It will bring me to the
>> profile perspective. It seems it tried to profiling then get terminated.
>> It also print out error:
>> [Error: Attach failed]
>>
>> I have no clue where and why the attach failed. And I don't see any
>> servicelog.log in my agent_install_dir/conf.
>>
>> Would you some experts point me to the right direction?
>>
>> thanks.
>>
>>
>>
>>
>
>
Re: attach failed error [message #136681 is a reply to message #136669] Thu, 02 October 2008 19:10 Go to previous messageGo to next message
Eugene Chan is currently offline Eugene ChanFriend
Messages: 287
Registered: July 2009
Senior Member
Hi,

You will have to setup the system PATH for the profiling agent to load.
Please refer to the documentation link 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
and you will need the following variables before you start the server
process, as stated in the link.
To run the Java Profiling Agent in standalone mode on Windows, perform the
following steps:

1.. Set TPTP_AC_HOME=<<Agent Controller Home>>
2.. Set
JAVA_PROFILER_HOME=%TPTP_AC_HOME%\plugins\org.eclipse.tptp.j avaprofiler
3.. Set PATH=%JAVA_PROFILER_HOME%;%PATH%;%TPTP_AC_HOME%\bin
4.. Set PATH=%PATH%;%JAVA_HOME%\bin
5.. Execute the Java application with the -agentlib parameter as described
above.
Eugene

"yc" <jadedr@gmail.com> wrote in message
news:gc30od$hd6$1@build.eclipse.org...
> Hello, Eugene,
>
> thanks for replying.
>
> I tried some the following: (b is a simple java program)
> C:\Temp>java -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf b
> 1192147231051
> 10/12/2007
> 12
> 1192492771051
> 1
> 1
> 1
> 1
>
>
> I don't see any error or AC_home/config/servicelog.log generated.
>
> Here is my path:
>
> C:\Temp>set path
> Path=C:\dev\Java\jdk1.5.0_11\bin;C:\Perl\bin\;c:\oracle\ora8 1\bin;C:\Program
> Files\Oracle\jre\1.1.7\bin;C:\WINDOWS\system32;C:\WINDOWS;C: \WINDOWS\System32\Wbem;
> C:\Program Files\PuTTY;C:\Program Files\Perforce;c:\Program
> Files\Microsoft SQL
> Server\90\Tools\binn\;C:\tptpAC\plugins\org.eclipse.tptp.jav aprofiler;C:\tptpAC\
> bin
> PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
>
>
> would you take a look to see if anything wrong with my env?
>
> I will take a look at WTP and try to set it up.
>
> thanks.
>
> Eugene Chan wrote:
>> Hi,
>>
>> Have you tried run with
>> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf
>> Do you see anything suspicious in the agent controller log file (under
>> AC/config/servicelog.log)
>>
>> Alternatively, you can use the profile on server option available in
>> WTP-TPTP integration, it enables you to select your web application or
>> simply select a server instance and right-click and 'profile' the
>> selection on a target server. Profile on Server dialog shows and you can
>> select the profiling option you prefer (HeapProf is one of the options
>> there).
>>
>> Eugene
>>
>>
>> "yc" <jadedr@gmail.com> wrote in message
>> news:gc0t93$vus$1@build.eclipse.org...
>>> Hello,
>>>
>>> I am new user for tptp. So pardon me if something is totally wrong here.
>>>
>>> I am using the following env.
>>> OS: windows XP
>>> jdk: 1.5.11
>>> eclipse: 3.4.1
>>> tomcat 5.5.23 (using sysdeo plugin in eclipse to invoke it.)
>>>
>>> I got tptp through eclipse update. Here are some info:
>>> TPTP platform project is 4.5.1
>>> TPTP Tracing and profiling tools project is 4.3.2
>>> ...
>>>
>>> I installed the tptp agent controller 4.5.1. (also set the path
>>> environment variable etc.)
>>>
>>> I am trying to profiling my tomcat app. I just started tomcat app then
>>> attach the tptp profiler to the app. I am able to do that using the
>>> following jvm option:
>>> -XrunpiAgent:server=enabled
>>>
>>> But if I am trying to use the following option, which I should since I
>>> am using jdk 1.5:
>>> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf:all ocsites=true
>>>
>>> Once I choose the agent and click profile button. It will bring me to
>>> the profile perspective. It seems it tried to profiling then get
>>> terminated. It also print out error:
>>> [Error: Attach failed]
>>>
>>> I have no clue where and why the attach failed. And I don't see any
>>> servicelog.log in my agent_install_dir/conf.
>>>
>>> Would you some experts point me to the right direction?
>>>
>>> thanks.
>>>
>>>
>>>
>>>
>>
Re: attach failed error [message #137398 is a reply to message #136596] Thu, 23 October 2008 12:41 Go to previous message
Asaf Yaffe is currently offline Asaf YaffeFriend
Messages: 333
Registered: July 2009
Senior Member
yc,

>
> But if I am trying to use the following option, which I should since I
> am using jdk 1.5:
> -agentlib:JPIBootLoader=JPIAgent:server=enabled;HeapProf:all ocsites=true
>
> Once I choose the agent and click profile button. It will bring me to
> the profile perspective. It seems it tried to profiling then get
> terminated. It also print out error:
> [Error: Attach failed]
>

Can you please enable the JVMTI Profiler logging option (see below),
reproduce the failure and post the log file here?

To enable logging, define the following environment variables:
set MARTINI_LOGGER_DIRECTORY=<full path to an existing directory>
set MARTINI_LOGGER_LOG_LEVEL=5

A log file named MLog<pid>.log will be generated in
MARTINI_LOGGER_DIRECTORY.

Thanks,
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Previous Topic:AGR: Waiting for process
Next Topic:How to record tests on eclipse plugin and replay in tptp 4.4.1?
Goto Forum:
  


Current Time: Fri Apr 19 00:52:40 GMT 2024

Powered by FUDForum. Page generated in 0.02635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top