TheMonkWhoSoldHisCode
TheMonkWhoSoldHisCode

Reputation: 2332

How to confirm JProfiler agent is attached

I have a application server running and I have attached JProfiler jagent to the server so that I can connect a JProfiler GUI and observe the performance. I have added the following to the JVM parameter list

-agentpath:/exports/JProfiler/jprofiler8/bin/linux-x64/libjprofilerti.so=port=8849

However, when I start my glassfish server, I cannot attach the Jprofiler UI to it. It gives error "Could not connect to :8849. Please make sure that the remote address is correct." The remote ip is indeed correct. How do I know that the application server started with the JVM parameters I mentioned? Is there a way to confirm this?

Upvotes: 0

Views: 1191

Answers (1)

Ingo Kegel
Ingo Kegel

Reputation: 47975

In general, look at the stderr output of your application server. There have to be some lines prefixed with JProfiler>. If not, the -agentpath VM parameter was not passed to the JVM.

In your specific case, you don't have the "nowait" option appended. This means that the JVM will wait at startup for a connection from the JProfiler GUI. If the application server responds to HTTP requests without that a JProfiler GUI has connected at all, the -agentpath VM parameter was definitely not passed to the JVM.

Upvotes: 1

Related Questions