Intellij cannot launch because 'process 2' already running

Answered

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. 

20
95 comments

Greg 
It is a known issue in 2023.2: https://youtrack.jetbrains.com/issue/IDEA-330531. The fix will be included in 2023.3.
Which OS are you using? On Linux, the IDE configuration directory is located in your user home directory - /home/<username>.
However, files and folders starting with a . (dot character) can be hidden. You can use ls -a command to list all files/folders, including hidden ones. 

0

OK I deleted everything “~/.config/JetBrains/”, now it starts, but I lost all my settings right?

0

I lost all access to all my servers…..

0

If you deleted the entire configuration directory, then yes the IDE settings are unfortunately gone.

Except if you used Settings Sync or Settings Repository to sync/share settings among IDE instances?
Or maybe there is a backup of the file system in place? Another possibility is to try to restore the deleted data with some data recovery tool. 

0

Yes I got some settings back with “sync”. Most can be rebuilt by hand.

What scares me however is that I think I lost all local history…

0

I deleted these files:

"C:\Users\kotei\AppData\Local\JetBrains\WebStorm2023.2\.pid"

and 

"C:\Users\kotei\AppData\Roaming\JetBrains\WebStorm2023.2\.lock"

and it started.

0

I found a post that contained the solution on my Ubuntu 22.04 system.

https://stackoverflow.com/questions/77003028/error-while-opening-intellij-idea-due-to-an-already-running-process

The resolve the issue you need to delete the .lock file and make sure you have IntelliJIdea2023.2 and not IntelliJIdea2023.1 in the Intellij config folder.

0

just remove idea's user config files ,for me ,run idea by flatpak on fedora 

delete this content :~/.var/app/{{com.jetbrains.xxxxx}}

btw,your ide setting will all gone.

0

i had the same issue: To fix you can go on your terminal type KILL  + given port-id  for was “kill 423 ”

0

You can search for the number of the process in the task manager services section and then select and end the process. This should solve the issue.

In Task Manager go to Services > Click on Search > Type the number of the process > Select and End the process

0

Kill the process from your cmd:

taskkill /F /PID <PID> 

Your PID is written in your exception window after the word Process

1

Removing the .lock file solved the issue for me.

More details on this SO question: https://stackoverflow.com/a/77045915/4834117

0

Same problem.  ubuntu 23.04. 

papchap@sivka:~$ ps ax| grep idea && ps ax|grep java
  9544 pts/0    S+     0:00 grep --color=auto idea
  9546 pts/0    S+     0:00 grep --color=auto java
papchap@sivka:~$ 
 


No java running.

0

Removing `.lock` file will do the trick.
Please make sure you are pointing out to proper folder / app name

Mac
/home/user/.var/app/com.jetbrains.DataGrip/config/JetBrains/DataGrip2023.2/.lock

Linux
~/.config/JetBrains/WebStorm2023.2/.lock

Solution found here: https://www.reddit.com/r/pycharm/comments/15esk6r/cannot_connect_to_already_running_ide_instance/

0

Resolved it by doing the following on my Windows 11 machine.  The process id my error message had was 14764 …

Admin Powershell → typed and executed Get-Process -pid 14764  →  response listed this process and had “msedge” under process name.  → typed and executed kill -pid 14764   → did the Get-Process -pid 14764 again and saw that process was no longer there  → started idea64 again, worked perfectly fine.

Hope this helps.

0

Solved in Ubuntu:

 

rm -r /home/jlebrijo/.config/JetBrains/RubyMine2023.2/.lock

0

I deleteted the jetbrains dir in the ~/.var/app/, and it works again.

0

Same issue, just encountered it today on Mac Big Sur, official dmg 2023.2.2, re-installed, restarted Mac, shutdown Mac and restarted Mac, opened Settings→Security & Privacy there are no alerts here.

Can't see a fix anywhere.

Tried to kill the pid but its Macs Security managerI think.

Been using Intellij for 20 years , never had an issue.

Is there a fix

 

1

This fixed it for me on a Mac

$ cd~/Library/Application Support/JetBrains/IntelliJIdea2023.2
$ mv .lock lock.old

Delete IntelliJ

Re-install InteliJ

 

0

This fixed it for me on a Mac

$ cd~/Library/Application Support/JetBrains/IntelliJIdea2023.2
$ mv .lock lock.old

Delete IntelliJ

Re-install InteliJ

0

Deleting /home/$USER/.var/app/com.jetbrains.PyCharm-Professional fixes the issue, 
There's probably a faulty .jar file in the dir but I didn't debug it lol.

Please note that it will delete all you user settings (Your themes, logged account, plugins etc..)

You can try to backup your files and then remove the folder and try running PyCharm while moving each backup file to the .var directory to find which file causes the issue

0

I managed to fix it by removing all my flatpak applications, I used this blog: https://fostips.com/remove-flatpak-apps-free-up-disk/

0

I have this same issue on a Macbook air.
to date rebooting has solved it 
BUT now it seems to be looking at a system process ID which is always there and I can't clear it.
It is acting like it has some place it stores the process ID ( a file I can delete or edit ? ) and that place gets corrupted.

This only seems to happen after I get some sort of hard crash that locks up everything when running an app I am developing.   Rebooting the mac shit time has not allowed me to re-open intellij.

NOTE: I just deleted all the .lock and *.lock files in ~/Library/Application Support/JetBrains/**/*
and after I was able to run it again.

It seems when I have those crashes it leaves these files in place.  They might contain the process ID of the locker. 

0

The following terminal command helped me:

kill -9 493

0

I found a valid workaround to remove ~/.cache/PhpStorm2023.2/.lock

This contained the process ID of a running IDE after reboot (application wasn't closed upon rebooting due to timeout)

0

Hello everyone! I'm facing the same issue. I managed to fix that by downgrading the version of Flathub. 

flatpak remote-info --log flathub com.jetbrains.DataGrip

// then 

flatpak update --commit=779cdc9d533ac83b63e3a478949c43f5d6e132860fa96379d0e154fd287b3dbe com.jetbrains.DataGrip
 
// For me it started to crash in the version generated in 2023 so I selected 2022

 

Here are a few things to keep in mind:
1- It's not a JetBrains issue, it's a Flathub
2- it started in the 2023 commit, so select a 2022 version
3- The best solution is to use the JetBrains archive instead of Flathub if you don't want issue

0

I had this same issue. I'm using Linux Mint 21.2 Cinnamon and the Idea is installed with Flatpak. I managed to resolve this issue by removing lock-file found in  ~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2023.2/.lock 

1

Miikka Lammela  Worked like an absolute charm, thank you very much!

0

I solved this deleting .lock file

`~/.config/JetBrains/CLion2023.2/.lock`

0

Please sign in to leave a comment.