Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot connect to already running ide instance. exception: process 2 is still running on linux mint

The "Cannot connect to already running IDE instance" error typically occurs when IntelliJ IDEA detects that another instance of the IDE is already running and prevents you from starting a new one. To resolve this issue, follow these steps:

First, try closing the existing instance of IntelliJ IDEA. If you are encountering this error when trying to start the IDE, you can skip this step.

Open a terminal and use the following commands to remove the "lock" file:

cd ~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2023.2

rm -r .lock

The above commands navigate to the directory where IntelliJ IDEA is installed and deletes the "lock" file. If you are not using the "Ultimate" version or your installation path is different, make sure to adjust the commands accordingly.

Now, try restarting IntelliJ IDEA. The error should be resolved, and the IDE should start without any issues.

These steps are designed to remove the "lock" file used by a running instance of IntelliJ IDEA, allowing you to start a new instance. Please note that these instructions are specific to JetBrains IntelliJ IDEA Ultimate version. If you are using a different version, the directory path and file name may vary, so you should check the directory where IntelliJ IDEA is installed to determine the correct path and file name to remove.

My problem is that I encountered the 'Cannot connect to already running IDE instance. exception: process 2 is still running' error, and as a result, I can't open the application.

like image 641
Bayram Yüksel EKER Avatar asked Oct 25 '25 15:10

Bayram Yüksel EKER


2 Answers

Try this command kill -9 [pid] or remove .lock file in your Home/.config/JetBrains/idedir/

like image 184
Mustapha GANGA Avatar answered Oct 27 '25 06:10

Mustapha GANGA


So i got this error a couple of times, and the solution of deleting the '.lock' file works fine... but it may not be were you think..

  • navigate to home or home/.var/app cd or cd .var/app in my case is: /home/charlito/.var/app
  • find the .lock file find . -name '.lock' in my case is (.var/app/com.google.AndroidStudio/config/Google/AndroidStudio2024.1/.lock)
  • navigate there and remove the '.lock' file

Hope this helps somebody. Bye.

like image 45
LearningCharlito Avatar answered Oct 27 '25 05:10

LearningCharlito