Error when connecting local tomcar-server

Questions about YourKit Java Profiler
adelhaj
Posts: 8
Joined: Wed May 04, 2005 10:38 pm

Post by adelhaj »

adelhaj wrote:
Vladimir Kondratyev wrote:Please check Tomcat's log file to find which port is used by profiler

Thanks for the reply? I'd read that here as well, but I look inside the logs and I don't see anything. Which log file are you refering too?? Is there a specific one I should be looking at.

And if you could explain in short about "the port used by the profiler"? Is this different than the port used by tomcat??

Thanks
--------------------------
I have to add the following to this post, sorry for being confusing.

When I use eclipse and say "Profile Last launched", it works perfect, in the log file for our application, catalina.out, I see this.

[YourKit Java Profiler 4.0.10] Using JVMPI
[YourKit Java Profiler 4.0.10] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 4.0.10] Listening on port 1827...

Now when I use the modified batch file (startwbs.bat which was mofified by your kit, posted above) to start the application and I look at the same log file, I see nothing there. I was expecting the text above to show up at the same location in the log file. It is no where to be found.

Any Ideas??
Vladimir Kondratyev
Posts: 1624
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Is this different than the port used by tomcat??
Yes, it's different. Of course! Tomcat uses some port (usually 80 or 8080) to serve HTTP requests. The profiler is not a web browser, it communicates with JVM plug-in (profiler agent) via different port.
I look inside the logs and I don't see anything
It means that Tomcat starts without profiler agent, i.e. Tomcat isn't configured properly. Please send initial and modified Tomcat startup scripts to [email protected]
adelhaj
Posts: 8
Joined: Wed May 04, 2005 10:38 pm

Post by adelhaj »

Vladimir Kondratyev wrote:
Is this different than the port used by tomcat??
Yes, it's different. Of course! Tomcat uses some port (usually 80 or 8080) to serve HTTP requests. The profiler is not a web browser, it communicates with JVM plug-in (profiler agent) via different port.
I look inside the logs and I don't see anything
It means that Tomcat starts without profiler agent, i.e. Tomcat isn't configured properly. Please send initial and modified Tomcat startup scripts to [email protected]
-------------

I sent them out to the address provided.
adelhaj
Posts: 8
Joined: Wed May 04, 2005 10:38 pm

Any updates.

Post by adelhaj »

Any updates on this, I sent you guys the files yesterday. If you can't get back to me soon, please let me know, since I'm waiting on a resolution.

Thanks a lot
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hi,

I'm afraid I do not see that email in the [email protected] mailbox.
Could you please re-send it and provide the exact subject line of the original email.

Best regards,
Anton
adelhaj
Posts: 8
Joined: Wed May 04, 2005 10:38 pm

This has been sent out a week ago, today

Post by adelhaj »

Anton Katilin wrote:Hi,

I'm afraid I do not see that email in the [email protected] mailbox.
Could you please re-send it and provide the exact subject line of the original email.

Best regards,
Anton
Hi Anton,
did you get my e-mail, I sent out your requested information last week from an address at capitalstream.com , let me know what the status of this is. I appriciate all the help you guys have provided.


Thanks
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

Hello,

Now I can see your email, thanks.

Regarding the scripts. Looks like they are not standart, or are hardly modified, so the integration wizard cannot work properly with them.


Please do the following:

1. Change line

set JAVA_OPTS=-server -Xmx256M

to

set JAVA_OPTS=-server -Xmx256M -Xrunyjpagent

2. Insert at the top of the script:

set PATH=c:\where yourkit is installed\bin\win32;%PATH%

This should make it work.

Best regards,
Anton
adelhaj
Posts: 8
Joined: Wed May 04, 2005 10:38 pm

Follow up

Post by adelhaj »

Anton Katilin wrote:Hello,

Now I can see your email, thanks.

Regarding the scripts. Looks like they are not standart, or are hardly modified, so the integration wizard cannot work properly with them.


Please do the following:

1. Change line

set JAVA_OPTS=-server -Xmx256M

to

set JAVA_OPTS=-server -Xmx256M -Xrunyjpagent

2. Insert at the top of the script:

set PATH=c:\where yourkit is installed\bin\win32;%PATH%

This should make it work.

Best regards,
Anton

So I made the recommended changes and I still don't see the desired effect, which is seeing the port number get printed in the console or Log files and being able to connect to the tomcat session via the profiler tool. Anyother suggestions?

You mentioned that our scripts are "Looks like they are not standart, or are hardly modified", can you tell me about this more? Do you think I should be using someother way so I can use the profiler tool. I am willing to make these chages since I like this tool so much.


Thanks
Anton Katilin
Posts: 6172
Joined: Wed Aug 11, 2004 8:37 am

Post by Anton Katilin »

So I made the recommended changes and I still don't see the desired effect, which is seeing the port number get printed in the console or Log files and being able to connect to the tomcat session via the profiler tool. Anyother suggestions?
Instead of -Xrunyjpagent please try -Xrunyjpagent:port=12345

where 12345 is the hard-coded port to be used. Choose any other if 12345 is busy.

Then connect to that port.
You mentioned that our scripts are "Looks like they are not standart, or are hardly modified", can you tell me about this more? Do you think I should be using someother way so I can use the profiler tool. I am willing to make these chages since I like this tool so much.
Under "standard" I mean scripts exactly as they are in Tomcat distribution archive of this or that Tomcat version. Some changes and modifications in scripts are OK for the integration wizard. But your scripts are absolutely different from any Tomcat version we were comparing to.
You can try to install Tomcat from distribution archive, and try integration then.
Post Reply