Intellij cannot launch because 'process 2' already running

已回答

After using intellij for multiple years on the same pc without any problum, suddenly this happened. When I want to startup my intellij on Ubuntu I get an error: "IDE Already Running", Cannot connect to already running IDE instance. CannotActivateException: Process 2 is still running. When I press "V ok" intellij starts up, opens, and then closes immediatly. I've tried restarting my pc and reinstalling intellij. When I check my running processes, nothing that has anything to do with intelijj is running. 

19

Remove the .lock file

.config/JetBrains/IdeaIC2023.2/.lock

1

I was able to solve this by deleting ~/.var/app/com.jetbrains.DataGrip/config/JetBrains/DataGrip2023.2/.lock file.

It may be in a different location on your system, so try searching for .lock file in your home folder.

 

0

In my Mac there is a file named .lock in ~/Library/Application Support/JetBrains/IntelliJIdea2023.2 folder, the contents of the file is the unix process id of the running idea instance. When the computer is chrashing while idea is running, this file will not be deleted after reboot, so idea will not start. I manually deleted this file and everything went back to normal.

1

I have same issue on macOS sonoma. my webstorm 2023.2.4 install from toolbox. cannot launch.

0

Issue should be fixed in 2023.2.5 and 2023.3: https://youtrack.jetbrains.com/issue/IDEA-330531

0

Was solved for me by running:

rm ~/.var/app/com.jetbrains.PyCharm-Professional/config/JetBrains/PyCharm2024.3/.lock

I think the issue is if you shutdown without properly closing PyCharm, so the lock file doesn't get deleted properly. Don't know why this only happens in the flatpak version

0

I also encountered this problem with the flatpak package for Rider 2025.3 on Pop! OS 24.04 after killing the hung Rider process. The error message I received was very similar to the original post, but included a full stack trace resulting from DirectoryLock$CannotActivateException.

Solved by deleting this file: ~/.var/app/com.jetbrains.Rider/config/JetBrains/Rider2025.3/.lock

0

请先登录再写评论。