How to connect JProfiler to an application running on localhost?

I have an application running on my localhost and I want to profile the application to find out how to improve application performance. I follow the configuration steps as defined, but it cannot connect to the local server, is there a step-by-step guide on the following rules:

  • Configure JProfiler to work with an application running on localhost?
  • How to profile and what areas to look for when profiling for an application?
  • Configure JProfiler using the Eclipse IDE, now I can see the profile scrolls in run dropdown in eclipse, but they are not activated and therefore how can it be activated?

I have a similar problem as in this question , but I canโ€™t understand the solution, any suggestions on this will really be appreciated.

I try at some point without any success when setting up JProfiler to work with an application running on localhost, any suggestions would be highly appreciated.

I am new to the world of profiling apps and therefore really appreciate if you can provide some useful pointers

I get the following error message:

Could not connect to 127.0.0.1:8849. Please make sure that the remote address is correct, the remote program is started properly, and the network route allows socket connections. , and I configured with New Server Integration, not sure what else needs to be done and how this can be fixed.

After adding -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849,nowait,id=117,config=C:\Users\user\.jprofiler6\config.xml in vm arguments in the startup configuration, and then when I run the configuration, I get

 JProfiler> Protocol version 32 JProfiler> Using JVMTI JProfiler> JVMTI version 1.1 detected. JProfiler> 64-bit library JProfiler> Don't wait for frontend to connect. JProfiler> Using config file C:\Users\user\.jprofiler6\config.xml (id: 117) JProfiler> Could not find session with id: 117` 
+6
source share
2 answers

Manually adding a virtual machine parameter to the startup configuration in eclipse is not recommended for profiling with JProfiler.

For more information on integrating the IDE into eclipse, see this screenshot and this help page . You can then profile JBoss with the eclipse startup configuration without adding any VM parameters.

There are other ways of profiling without manually adding any VM parameters:

  • The easiest way to get started is to use the Quick Attach feature in JProfiler. Using "Session-> Quick Attach" you get a list of running JVMs that you can profile without adding any JVM parameters.

  • If you skipped the source code navigation to the eclipse in the previous step, then the same action is available in eclipse if the JProfiler plugin is installed.

enter image description here

  1. For offline configuration, use the integration wizard by calling "Session-> Integration Wizards-> New Server Integration" from the JProfiler main menu. The integration wizard will change the beginning of the script, so you do not need to add any VM parameters.

For the error message you received, I suspect that C:\Users\user\.jprofiler6\config.xml does not exist. Decreasing the parameter to -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849 will work, then the JBoss VM will wait until you connect to the session type "Attach to JVM (local or remote)" from JProfiler. In any case, adding VM parameters manually is only necessary in special situations.

+9
source

I know this is an old thread. Also, I'm not sure that the problem described here is not the same as what I have in mind.

My colleague had a very similar problem: he did not see any local JVM using the Quick Attach feature on Windows. Trying to add a jvm agent parameter or reinstall JProfiler also did not help.

The solution was to delete the folder named% USERPROFILE% \ AppData \ Local \ Temp \ hsperfdata_username after stopping all java processes. Probably something related to the permissions of this folder was corrupted.

-1
source

Source: https://habr.com/ru/post/901041/


All Articles