Error while opening intellij "Cannot connect to already running IDE instance. Exception: Process 2,837 is still running"
Answered
My intellij was working fine, I restarted by laptop and now facing issue as shown in below screenshot
Tried restarting laptop and reinstalling intellij from official website, using snap command but it did'nt fix the issue
Please sign in to leave a comment.
Hi Onkar. Thanks for taking the time to report this. The issue is a known one: https://youtrack.jetbrains.com/issue/IDEA-330531
The workaround is to either kill the process with id 2837 from the OS terminal, or delete the file called
.lock
from the IDE config directory.I encountered the same problem, but it was resolved when I restarted my machine and launched IntelliJ before any other applications. Everything worked flawlessly in that case.
If you know the PID, you can simply kill that process instead of restarting the machine. i.e. kill 2837
Removing the .lock file solved the issue for me.
More details on this SO question: https://stackoverflow.com/a/77045915/4834117
Removing the .lock file solved the issue for me. thanks
/home/user/.config/JetBrains/idedir/.lock
I have the same problem, except it does not mention a PID.
There is also no .lock file in my configuration directory. There was a .pid file. But deleting that did not help.
Andreas Pfau
Which OS are you using? Files and folders with names starting with a dot character (.) can be hidden on Linux/macOS.
You can show them by running
ls -a
command in the terminal.Oh sorry, it's Windows 11 and I'm showing all files.
I'm having the Problem with PhpStorm 2023.2.
I started DatGrip 2023.2, it starts without trouble, but also generates no .lock file.
Edit: another Windows restart later it works again. I checked several times for processes left in task manager before restarting, there were none…
Andreas Pfau
Thanks for the update. This issue should be fixed in the latest EAP build: https://www.jetbrains.com/idea/nextversion. If you encounter it again, please try to install the EAP version 2023.3.
I have the same issue on 2023.2.2 so switched to EAP for now: Ivan Pajic thanks, that solves it for now.
Running Tuxedo Linux 22.04 (essentially Ubuntu) with KDE Plasma 5.27.8 and installed PhpStorm via Flatpak and I'm getting essentially the same exact error However, my situation is a little different so I'm not entirely sure if it's related to the linked issue (IDEA-330531).
Basically, what I'm seeing is PID 2 reported in the error, however, that is
kthreadd
on my system; that number is obviously far too low to be correct. See below. Is this related to that issue or something different Ivan Pajic?Patrick Nelson
Yes, it looks to be the same issue.
Do you have a
.lock
file in the IDE configuration directory? It could be hidden since it is a dotfile. You can usels -a
command to show hidden files. If yes, please try to delete it.Also, the issue could be related to the Flatpak installation. Does it happen with the installation downloaded from the official website: https://www.jetbrains.com/idea/download?
Had similar issue with DataGRip 2023.2
- killing PID did NOT help
- removing .lock file helped!
Thanks!
Ivan Pajic Nope. That's why I posted; not just to pile on, but because I couldn't fix it. It's a Flatpak which might be part of the issue; i.e. it just shipped like that and was not fixable. I think it's containerized meaning that lock file is isolated somehow which was why I couldn't find it.
There was no configuration directory at all in ~/.config, the `JetBrains` directory didn't exist at all. Also, as noted above, the PID was obviously wrong; it was pointing to a system process and of course PhpStorm isn't running as a system process. Also probably an artifact of the Flatpak (this was installed via Discover in KDE on Tuxedo Linux a fork of Ubuntu).
Patrick Nelson
Could you try looking for PhpStorm configuration directory in a similar path:
~/.var/app/com.jetbrains.PhpStorm/config/JetBrains/PhpStorm2023.2/.lock
?I just had the same problem on Fedora. Had to delete the .lock file in ~/.config/JetBrains/PhpStorm2023.2
The launcher should be smart enough to check if the process specified in the .lock file actually exists…
Patrick Nelson you can see where the config directory is if you look for something like “/Jetbrains” or “/.config” in the toolbox log file.
find "/Users/[your username]/Library/Application Support/JetBrains" -name ".lock" -delete
Note for Users: Replace [your username] with your actual username on the system before running the command. If you're unsure of your username, you can find it by typing the command `whoami` in the Terminal. This command will return your username.
This `find` command will search for and delete all `.lock` files within the JetBrains directory in your Application Support folder. Please make sure it's safe to delete these files before executing the command.
Additional Note: If you're unsure of the exact path to your JetBrains directory, start with this command to locate it: `find ~ -type d -name "JetBrains" 2>/dev/null`
This command will list JetBrains-related directories, helping you identify the correct path for the above deletion command.
This is really annoying issue and it's exists after last updates. You need to fix it.
nikitasius
Did it occur for you in the 2023.3 EAP build: https://www.jetbrains.com/idea/nextversion?
If yes, could you please add a comment on the original issue? Thank you.
i'm on `Build #IU-232.10203.10, built on October 24, 2023`
nikitasius
Fix for this issue is included in the
2023.3
EAP release: https://www.jetbrains.com/idea/nextversion/.Also, it is planned for the next stable release
2023.2.5
.Note about my personal experience - it happens on my MacBook with Linux, which has sometimes problem to shutdown correctly (once per month currently, on daily usage of PhPStorm).
IDE probably does not get chance to clean the .lock file.
My proposal is to check if running process is IDE, because on next OS start another application got same PID.
edit: Which is what the https://youtrack.jetbrains.com/issue/IDEA-330531 describes 👍
faced same exact issue in linux mint 21.1, solved by removing rider that has been installed from Flathub and downloaded it from JetBrain Toolbox
The latest version 2023.2.5 that it said would fix this issue made no difference. I'm still having this problem. Specifically, this error occurs when my app stops responding, and this generates some errors in the log:
And after that it starts to give this problem. The app is not running because I check the processes and, as a precaution, I go to the app's information and force the app to stop, but I have to uninstall the app manually to be able to work.
XayUp
Could you please add a comment to this issue and provide some details about the issue you are still facing in 2023.2.5? Thanks!
Ivan Pajic
I couldn't find the lock file but this other path you mentioned saved me!
~/.var/app/com.jetbrains.PhpStorm/config/JetBrains/PhpStorm2023.2/.lock
Hvala druze :)
On Mac M1 I ca confirm deleting the .lock solved the issue
I have this same issue. I have checked
Using Pop OS 22.04
I originally installed using the tar.gz method, successfully activated, but removed it after I couldn't easily add to dock
Added through the Pop shop tried to activate but wasn't giving me (I think) a spot to add the Activation ID
After a restart after installing a couple of plugins, gives me the errors. I have
~/.var/app/com.jetbrains.PhpStorm/config/JetBrains/PhpStorm2023.3/.lock which I can remove
and ~/.config/JetBrains/PhpStorm2023.3 which lock is missing
The IDE starts up, but I get this
And whatever I do, it shuts down. Then I get the error
How can I reset the whole system so I can reinstall?
Hello, Bholman. To perform the full IDE reinstallation, you should not only uninstall the IDE, but delete manually all IDE directories.
If reinstalling the IDE doesn't help, could you please share the IDE logs (
Help | Collect Logs and Diagnostic Data
) via the JetBrains Uploads service and write here the ID you receive? I want to check which exact errors are reported there.I also have the same error. I removed .loc file. But, when I open any my file via phpStorm again, it shuts down unexpectedly, and then it gives the error of “cannot connect to…”.