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
 

12
43 comments

Hello @B-muradullayev92 could you please share the IDE logs (Help | Collect Logs and Diagnostic Data) via the JetBrains Uploads service and paste the upload id here? We will check for any reason or bug in your IDE.

0

Hello! I have the same problem with all IDEs (idea, datagrip, pycharm).

OS: Fedora 39

IDE versions:

IntelliJ IDEA 2023.3.4 (Ultimate Edition)

DataGrip 2023.3.4

PyCharm 2023.3.3 (Professional Edition)

0

Hi Ivor108 

Does it help to kill 2 (or whatever the hanging process id is at the moment) in the system terminal and restart the IDE?

Is there a .lock file in the directory mentioned in the error message? Did you try deleting it?

If the issue persists, please provide IDE logs for analysis (entire archive): Help | Collect Logs and Diagnostic Data. I will search for exceptions and check your system environment settings and selected IDE VM options.

Logs can be uploaded privately to https://uploads.jetbrains.com. You need to provide the id of the upload here.

0

Yes, deleting the .lock file helps, but this error appears very often and I thought there was some solution.

 

Значок "Проверено сообществом"

 

 

0

Ivor108 Please provide logs for analysis so that I can look for the root of the problem.

0

I uploaded the entire logs directory from IntelliJIdea2023.3 directory:

Upload id: 2024_02_20_XkuWNtjnRwjKp91hpshEvD (file: log.zip)

Thank you!

 

Значок "Проверено сообществом"


 

0
Thank you.
Is the process mentioned in the error message still running if you grep it in the terminal after the message appears?
If yes, can you also collect a thread dump of this process using jstack as described here? -> https://intellij-support.jetbrains.com/hc/en-us/articles/206544899-Getting-a-thread-dump-when-IDE-hangs-and-doesn-t-respond
0

Yes, I can grep this process. 

I tried to use jstack:

$ sudo jstack -l 2 > dump.txt

And got the following message:
2: Unable to open socket file /proc/2/root/tmp/.java_pid2: target process 2 doesn't respond within 10500ms or HotSpot VM not loaded

0

Ivor108 What JDK is used by the system? Try updating it to a higher version.

It could be that the pid file was deleted from the /tmp directory by system cleanup (similar problem). In this case, try killing the process, then wait for the issue to reproduce, grep the new pid and try capturing the dumps via jstack again.

0

I can also confirm on Rider 2023.2.3 to rm the .lock file inside `~/Library/Application\ Support/JetBrains/Rider2023.2`. My issue occurred after the power went out and my machine suddenly turned off. I use Unity and it auto-opens my code in Rider.  Hope it helps.

0

Cmon, fix it.

It is so obvious - turning off a Linux does not always give enough time to PhpStorm to clean the lock file. On next OS start another process with same but legacy PID arise, then later launched PhpStorm consider it as still running previous PhpStorm instance.

Just check if the process of related PID is PhpStorm or not, that's all. If not, clear silently the lock file and go on. Problem solved.

Or, as another idea I got, compare times - if the process related to PID was launched after the lock file mtime, then it is new process with recycled PID.

1

I got a similar message on MacOS when trying to run WebStorm right after upgrading to 2024.1.4.  The message did not have a PID and the corresponding WebStorm config folder did not have a `.lock` file.

However, I did find a `find` for a `.lock` file across all JetBrains config folders and there was one in a Rider folder. When I deleted it, WebStorm ran with no issues. 

I haven't run Rider for months, so something must have changed with WebStorm such that a `.lock` file anywhere causes the message.

0

i delete  C:\Users\xxx\AppData\Roaming\JetBrains\PyCharm2023.2\.lock 
solved the issue

0

Please sign in to leave a comment.