green_32
green_32

Reputation: 1593

Error while opening Intellij IDEA due to an already running process

I am trying to open the Intellij IDEA on Mac, but it is showing the following error:

Cannot connect to already running IDE instance.

Exception: Process 464 is still

I was able to open Intellij perfectly some time back, but now suddenly this error has popped up out of nowhere.

Upvotes: 149

Views: 105766

Answers (20)

tejasvi
tejasvi

Reputation: 305

Deleting .lock file didn't help me. Running this command fixed it sudo killall -9 idea.

Upvotes: 1

rk4056
rk4056

Reputation: 9

Have you tried restarting your computer?

I restarted and intellij opened successfully.

Upvotes: -1

Umut Can Arda
Umut Can Arda

Reputation: 81

If you downloaded the Linux package from the store or flatpak, you can find the .lock file in the extension below and delete it.

/home/username/.var/app/com.jetbrains.PhpStorm/config/JetBrains/

Upvotes: 0

luckydonald
luckydonald

Reputation: 6856

macOS:

The problem is a lock file still existing. On crashes this may be the case.

The solution is to remove them:

rm -i ~/Library/Application\ Support/JetBrains/*/.lock

This will ask you to delete any lock files it finds, for example:

$ rm -i ~/Library/Application\ Support/JetBrains/*/.lock
remove PyCharm2023.2/.lock? y
$

Upvotes: 6

Mohammad Javad Ghasemy
Mohammad Javad Ghasemy

Reputation: 132

On Linux, just run the repair. For me, it's in the bin folder.

Enter image description here

Upvotes: -1

José Júnior
José Júnior

Reputation: 601

Keep in mind your path on macOS might be this one:

/Users/john-doe//Library/Application Support/JetBrains/IdeaIC2023.2/

Upvotes: 1

Ismoil Shokirov
Ismoil Shokirov

Reputation: 3011

In my case, I had an error code of 567. Killing the process didn't help, so I had to delete the .lock file.

In my case lock file was at: /Users/yourUSERNAME/Library/Application Support/JetBrains/WebStorm2023.2/.lock

I just run the rm command on it to remove the file and WebStorm worked.

Upvotes: 5

Yaman Abd
Yaman Abd

Reputation: 314

On macOS here is how I fixed it:

  1. open iTerm
  2. cd /Users/<username>/Library/Application\ Support/JetBrains/
  3. find . -name .lock
  4. rm -rf <lock_file_path>

Upvotes: 16

kagama
kagama

Reputation: 311

I got Linux Manjaro (Arch Linux) from Flatpak, and my .lock file is at ~/.var/app/com.jetbrains.PyCharm-Professional/config/JetBrains/PyCharm2023.2/.lock. Deleting that and everything works like mentioned above.

I, by the way, had PID 2 :S So it is not something I could just kill.

Upvotes: 3

Alexander
Alexander

Reputation: 55

For me (IntelliJ IDEA installed from Flatpak on Pop!_OS) the location of .lock file is ~/.var/app/com.jetbrains.IntelliJ-IDEA-Community/config/JetBrains/IdeaIC2023.2. All you need is to delete it.

Upvotes: 4

Ahmed Mansy
Ahmed Mansy

Reputation: 145

I fixed it by killing the process with its process ID.

For me it was 511, so I ran this command in Terminal (I am using macOS):

kill -9 511

Upvotes: 9

Md. Jamil Ahsan
Md. Jamil Ahsan

Reputation: 284

You can follow the procedures by which I had resolved this issue (on Linux):

  1. Go to the home directory
  2. Then go to the .config/JetBrains directory
  3. There you can find the IDE's folder you have used with the version. Go to the version's folder you are currently using.
  4. Delete the .lock file

Try now and the IDE should open.

Upvotes: 12

saawgr
saawgr

Reputation: 150

For macOS users on IntelliJ 2023: Remove the .lock file from your terminal using

rm ~/Library/Application\ Support/JetBrains/IdeaIC2023.2/.lock

Upvotes: 6

Abdul Mateen
Abdul Mateen

Reputation: 1997

I also faced a similar issue, on a MacBook Air (M1).

Cannot connect to already running IDE instance. Exception: Process 427 is still running

I resolved it by running the following command on the terminal.

kill -9 427

Upvotes: 69

infiniteLearner
infiniteLearner

Reputation: 4189

For Linux users:

  1. Execute ps -ef | grep <port displayed in error message> to see if it is getting used by any process.
  2. kill -9 <process ID from 1.>
  3. Now try to launch again.

Upvotes: 7

german_goncharov
german_goncharov

Reputation: 3420

To fix this issue, you need to remove the .lock file in your configuration. It's in the config folder. The examples are for IntelliJ IDEA 2023.2.

Linux:

~/.config/JetBrains/IntelliJIdea2023.2

Windows:

C:\Users\JohnS\AppData\Roaming\JetBrains\IntelliJIdea2023.2

macOS:

~/Library/Application\ Support/JetBrains/IntelliJIdea2023.2

There can be multiple versions of your program in the JetBrains folder, such as IntelliJ IDEA 2023.1 and IntelliJ IDEA 2023.2. You need the latest.

Delete the .lock file and run the program; everything should work. At least it helped me.


On Unix-like systems (Linux and macOS) you can look for the location for the .lock file using:

find ~/ -type f -name '.lock'

Upvotes: 327

inquisitive
inquisitive

Reputation: 3974

I faced this problem today. I did a ps -ef | grep 481 (for me the error was - Cannot connect to already running IDE instance. Exception: Process 481 is still running) and it showed Notes. I closed Notes and then restarted IntelliJ IDEA. It started working.

Upvotes: 11

Concerned Citizen
Concerned Citizen

Reputation: 61

I just run into this problem. I am using Ubuntu 22.04 (Jammy Jellyfish). When I killed the process shown in the dialog box, it shut down my Firefox browser. Then I managed to open IntelliJ without any issues. I opened up Firefox after that. So far so good.

Upvotes: 6

Shingai Munyuki
Shingai Munyuki

Reputation: 611

I just killed the troublesome process (process 516) in my terminal.

sudo kill 516   
// '516' <- (Instead of '516') PASTE YOUR PROCESS CODE HERE

Upvotes: 4

Kinyua
Kinyua

Reputation: 147

I had the same error:

I resolved it by running the command: kill -9 2610. 2610 was the PID. So for your case, it will be kill -9 464

The reason is that there could be a process running.

Upvotes: 12

Related Questions