Unable to connect to remote app...

Questions about YourKit Java Profiler
Post Reply
brownmik
Posts: 4
Joined: Tue Nov 29, 2005 8:17 pm

Unable to connect to remote app...

Post by brownmik »

I'm evaluating YourKit, but I'm having troubles connecting to a remote SunOne 8.1 app server. When I try to connect via the YourKit PC GUI, I get the "Connecting to Remote Application" dialog, but it never connects.

SunOne is starting the profiling, as I get the following at startup:

[YourKit Java Profiler 5.0.5] Using JVMPI
[YourKit Java Profiler 5.0.5] *** HINT ***: We recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 5.0.5] Profiler agent is listening on port 10001...
[YourKit Java Profiler 5.0.5] *** HINT ***: To get profiling results, connect to the application from the profiler UI

When I attempt to connect, I get the following error in the SunOne log:

[#|2005-11-29T15:21:55.462-0500|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.stream.err|_ThreadID=11;|
java.nio.channels.NotYetConnectedException
at sun.nio.ch.SocketChannelImpl.ensureReadOpen(SocketChannelImpl.java:114)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:139)
at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:75)
at com.sun.enterprise.server.ss.ASInputStream.read(ASInputStream.java:66)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at java.io.DataInputStream.readFully(DataInputStream.java:266)
at java.io.DataInputStream.readLong(DataInputStream.java:470)
at com.yourkit.runtime.Packet.readHeader(Packet.java:38)
at com.yourkit.runtime.RequestProcessing.dispatchRequest(RequestProcessing.java:11)
at com.yourkit.runtime.Core$1.run(Core.java:281)
at java.lang.Thread.run(Thread.java:534)
|#]

Interestingly, when I kill the SunOne instance, the YourKit PC GUI wakes up and says "There's no application running at ...", so it must have been partially talking to it...?

Any ideas are greatly appreciated.

Best regards,

Mike Brown
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Do you use custom script to start SunOne with profiler agent? By default SunOne app server uses custom NIO based socket implementation, and it makes impossible communication with profiler agent.

Fortunately, J2EE integration wizard specifies necessary properties when creates SH script for launching SunOne.

Regards,
--vladimir
brownmik
Posts: 4
Joined: Tue Nov 29, 2005 8:17 pm

Post by brownmik »

Vladimir,

I had YourKit generate a domain.xml for SunOne, and compared it with my own. My setup did NOT contain the <profiler> subtag in the <java-config> block. So I pasted that in, and it seems to be working!

Thanks!

Mike
Vladimir Kondratyev
Posts: 1626
Joined: Tue Aug 10, 2004 7:52 pm

Post by Vladimir Kondratyev »

Great! :wink:
Post Reply