Profiler: No Java process found

Answered

Hello.

I'm following this memory leak tutorial: https://www.jetbrains.com/help/idea/tutorial-find-a-memory-leak.html

In section CPU and Memory Live Charts, I jump on the profiler, but I'm not able to see any Java process:

What Am I doing wrong?

I'm running Intellij IDEA Ultimate 2023.2.2

 

Thank you.

0
9 comments

Which JDK version are you using for the project/Gradle configuration:

  • File > Project Structure > Project Settings > Project > SDK
  • File > Project Structure > Project Settings > Modules > select module > Dependencies > Module SDK
  • Project bytecode version in Settings (⌘ + , or Ctrl + Alt + S) > Build, Execution, Deployment > Compiler > Java Compiler
  • Settings (⌘ + , or Ctrl + Alt + S) > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM

Please try to set a different version of JDK and see if the issue persists.

0

Hello Ivan.

I am using the same JDK as used in the tutorial, Amazon Corretto 11.

  • File > Project Structure > Project Settings > Project > SDK
  • File > Project Structure > Project Settings > Modules > select module > Dependencies > Module SDK
  • Project bytecode version in Settings (⌘ + , or Ctrl + Alt + S) > Build, Execution, Deployment > Compiler > Java Compiler
  • Settings (⌘ + , or Ctrl + Alt + S) > Build, Execution, Deployment > Build Tools > Gradle > Gradle JVM
0

Ok, thanks for the screenshots.
As a general troubleshooting step, try to:

  • File > Invalidate Caches.. > enable Clear file system cache and Local History option > Invalidate and Restart
  • Close IDE, delete .idea folder and any *.iml files in your project root folder in file explorer, and re-import the project from existing sources

If the issue persists, could you please restart IDE, reproduce the issue and share your IDE logs (Help > Collect Logs and Diagnostic Data)? They contain useful information about your environment and can have exceptions/errors related to the issue.

You can upload them here: https://uploads.jetbrains.com, just provide the uploaded file ID.

0

I just spent a few hours banging my head against this same problem, went through the same process the OP did with the tutorial.  In the end, a PC restart resolved the issue for me. Hopefully this saves someone else a few hours

0

I am facing the same issue with IDEA Ultimate 2024.1 version. I tried all the options suggested above including restarting my Windows 11 system and didn't help. Looks like something to do with the new version 2024. 1 . I can run the application and unit tests with the InterlliJ profiler, but am not able to attach any existing Java process that is running. None of the running Java process in my local system shows up in the InterlliJ profiler tab. Any help will be greatly appreciated.

0
What JDK version/vendor do you use to run a Java process that you plan to attach to?

Please share the logs using Help | Collect Logs and Diagnostic Data.

Specify the full command line for the Java process that you can't attach to and provide the `java -version` output for the JVM used.
0

JDK version is 17.0.5 and Oracle is the vendor. The issue is that I am able to connect to the same process if I use 2022 or 2023 version of IntelliJ IDEA Ultimate version. Not sure why 2024.1 being the latest version is not recognizing the process.

0

We can't reproduce the problem in IntelliJ IDEA 2024.1 on Windows. Run Java app with Oracle JDK 17.0.5, the process is visible in the list:

 

 

Please report at https://youtrack.jetbrains.com/newIssue?project=IDEA with the exact steps to reproduce and the logs (Help | Collect Logs and Diagnostic Data).

0

Hi, after multiple tries I resolved the issue, now I can see all JVM process running in my system under the profiler and can attach the IntelliJ profiler to them. However, I am not sure why this solution worked and I will be curious to know from IntelliJ folks about their insight. Basically, the fix was to delete the folder: C:\users\\AppData\Local\Temp\hsperfdata_ from your system. I found the suggestion as part of the second answer provided in the below Stack Overflow issue. https://stackoverflow.com/questions/9296258/why-wont-the-visualvm-profiler-profile-my-application This is the folder all JVM instances that are running in our system write VM stats details with the process id (PID) as the file name and looks like Java Profilers depend on this folder. My guess is that in my case IntelliJ profiler seemed to have trouble accessing this folder preventing it from displaying all the JVM PIDs within the IDE.

0

Please sign in to leave a comment.