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

For anyone looking for a solution - deleting: 

~/.config/JetBrains/IntelliJIdea2023.2/.lock

resolves the issue
 

2

Same problem on Ubuntu 20.04.6 LTS, 
CLion version: 
CLion 2023.2.1
Build #CL-232.9559.58, built on August 22, 2023
Runtime version: 17.0.8+7-b1000.8 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-156-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 8
Registry:
   run.processes.with.pty=TRUE
   debugger.attach.dialog.enabled=true
Current Desktop: ubuntu:GNOME

My error is “… Process 4577 is still running”
So I skip through this error by using “sudo kill -9 4577” to kill 4577 process, then restart clion look fine 

0

Having some same issue on my Ubuntu OS. The version of IDE intellij idea ultimate installed was installed from the package version from intellij.

After checking the process in question, seemed it reference a closed tab of my firefox browser. So decided to shutdown firefox before opening the IDE, and that worked.

0

hey folks. 

Maintainer of https://github.com/flathub/com.jetbrains.PyCharm-Professional here. 

Personally i never seen this one before today. looks like for some reason when pycharm stopped working correctly it leaves /home/USER/.var/app/com.jetbrains.PyCharm-Professional/config/JetBrains/PyCharm2023.2/.lock file with content of its pid. its always 2 because of how its run. removing this file restores startup. 

i believe that bug is not related to flatpak installation. but open to  any ideas on how we can fix it 

0

I'm getting this same error on Windows 10.  (The Process ID is different, of course)  I've deleted the .pid file in the personal config directory, as well as trying to run the repair program and even downloaded toolbox to see if it could find any issues.  Uninstall/reinstall made no difference.  Slack is not running.  At this point I'm very frustrated because I can't use my IDE.

0

The repair tool works nice.

One or more plugins was incompatible with PhpStorm build 232.9559.64

The repair tool reset PhpStorm to the default configuration and disabled all plugins. After, the app works nice.

My OS: Linux Mint

Sorry for my english.

0

Disabled the new UI fixed it for me

0

I'm using PopOS 22.04, to fix it I used
kill -9 <PID that appears on the pop up screen>

2

This is because when IntelliJ / the host machine shuts down incorrectly it leaves a .lock file. During the start Idea seems to not even check if there's an OS lock on it, just the presence of the file prevents it from starting. So even a reboot won't fix this problem since the files will stay put. Manually removing the file will make IntelliJ usable again.

This could probably be changed to be made more robust by locking the file, and testing if the file is actually locked  / in use, or not use a file to check if Idea is active in the first place.

For flatpack install the location is:
~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2023.2/.lock

For normal installs:
~/.config/JetBrains/IntelliJIdea2023.2/.lock

4

Yes, thank you, finally! Deleting the lock file resolved the issue for me.

0

hi,

same issue with flatpack/fedora38

you have to delete the .lock file in pycharm install directory

On fedora 38 : 

~/.var/app/com.jetbrains.PyCharm-Professional/config/JetBrains/PyCharm2023.2/.lock

If you dont know where your .lock file is type:

sudo find / -type f -name “.lock”

0

Removing the .lock in ~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2023.2 helped me on PopOS 

1

when PyCharm exit not proper, it not delete .lock file.
this is solving of problem:

1) find .lock file:
> sudo find -iname .lock | grep PyCharm
./.var/app/com.jetbrains.PyCharm-Community/config/JetBrains/PyCharmCE2023.2/.lock

2) then copy path, and delete .lock file
> sudo rm -rf ./.var/app/com.jetbrains.PyCharm-Community/config/JetBrains/PyCharmCE2023.2/.lock

3) and run PyCarm.. if it is installed as flatpak app - from terminal you may run it by command:
flatpak run com.jetbrains.PyCharm-Community

.. or by clicking at PyCharm in Programs

0

I got the same error:

Start Failed
Cannot connect to already running IDE instance.
Exception: Process 7,505 is still running


I tried to kill the related process (7505), it solved my problem, but the process was my browser…

Have a good day. 

1

I uninstalled Intellij Community and Toolbox completely. Then, I downloaded Idea Community from the site, unzipped it in $HOME. From the terminal, I change to $HOME/idea-IC-232.9559.62/bin folder and ran the repair program. This was its output:

$ ./repair
INFO: 2023/09/05 09:19:29 Log file /tmp/IntelliJRepairBinary1980255814/repair.log cretaed
INFO: 2023/09/05 09:19:29 Starting repair utility for all aspects
INFO: 2023/09/05 09:19:29 Caches aspect started
INFO: 2023/09/05 09:19:29 Nothing to do here
INFO: 2023/09/05 09:19:29 Caches aspect finished
INFO: 2023/09/05 09:19:29 Hashes aspect started
INFO: 2023/09/05 09:19:29 Downloading manifest file
WARNING: Unable to download manifest file from https://download.jetbrains.com/idea/IC-232.9559.62.tar.gz.manifest:
Error downloading Manifest file. Response status = 404
INFO: 2023/09/05 09:19:31 Hashes aspect finished
INFO: 2023/09/05 09:19:31 Logs aspect started
FATAL ERROR: goroutine 1 [running]:
runtime/debug.Stack()
/usr/local/go/src/runtime/debug/stack.go:24 +0x65
repair/logger.ExitWithExceptionOnError({0x8b80e0, 0xc000338570})
/src/logger/logger.go:60 +0x54
repair/helpers.ParseIdeaLogFile({0xc00033a580?, 0x2d?})
/src/helpers/log_parser.go:30 +0x4d
repair/helpers.GetPluginsWithExceptionsInIdeaLog(...)
/src/helpers/log_parser.go:18
repair/cmd.RunLogAspect({0x0?, 0x0?, 0x0?})
/src/cmd/log.go:34 +0x4d
repair/cmd.glob..func8(0xafff80?, {0xb35c48?, 0x0?, 0x0?})
/src/cmd/log.go:21 +0x27
github.com/spf13/cobra.(*Command).execute(0xafff80, {0xb35c48, 0x0, 0x0})
/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:944 +0x847
github.com/spf13/cobra.(*Command).ExecuteC(0xb00260)
/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068 +0x3bd
github.com/spf13/cobra.(*Command).ExecuteC(0x0?)
/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1012 +0x56d
repair/cmd.runAllAspects()
/src/cmd/root.go:113 +0x1d0
repair/cmd.Execute()
/src/cmd/root.go:42 +0x10a
main.main()
/src/main.go:8 +0x17
open /home/luciano/.cache/JetBrains/IdeaIC2023.2/log/idea.log: no such file or directory

So, as he said there is no idea.log file, I created it:

$ echo " " > /home/luciano/.cache/JetBrains/IdeaIC2023.2/log/idea.log

And I run repair again:

$ ./repair
INFO: 2023/09/05 09:23:46 Log file /tmp/IntelliJRepairBinary2929534779/repair.log cretaed
INFO: 2023/09/05 09:23:46 Starting repair utility for all aspects
INFO: 2023/09/05 09:23:46 Caches aspect started
INFO: 2023/09/05 09:23:46 Nothing to do here
INFO: 2023/09/05 09:23:46 Caches aspect finished
INFO: 2023/09/05 09:23:46 Hashes aspect started
INFO: 2023/09/05 09:23:46 Downloading manifest file
WARNING: Unable to download manifest file from https://download.jetbrains.com/idea/IC-232.9559.62.tar.gz.manifest:
Error downloading Manifest file. Response status = 404
INFO: 2023/09/05 09:23:48 Hashes aspect finished
INFO: 2023/09/05 09:23:48 Logs aspect started
INFO: 2023/09/05 09:23:48 Parsing idea.log file...
Let's try to start the IDE to check if the issue is still here? [y/n]
y

At this point, Idea has run and has the error dialog. I responde “y” again:

The issue still here? [y/n]
y
INFO: 2023/09/05 09:24:06 Shutting down the IDE and continue repairing
INFO: 2023/09/05 09:24:06 Parsing idea.log file...
INFO: 2023/09/05 09:24:06 Logs aspect finished
INFO: 2023/09/05 09:24:06 Plugins aspect started
INFO: 2023/09/05 09:24:07 No suspicious plugins found
INFO: 2023/09/05 09:24:07 Plugins aspect finished
INFO: 2023/09/05 09:24:07 Runtime aspect started
INFO: 2023/09/05 09:24:08 Default runtime is in use. No need to take actions.
INFO: 2023/09/05 09:24:08 Runtime aspect finished
INFO: 2023/09/05 09:24:08 VmOptions aspect started
INFO: 2023/09/05 09:24:08 Couldn't detect custom .vmoptions file for /home/luciano/idea-IC-232.9559.62/bin/idea.sh
There is nothing to do with vmoptions aspect.
INFO: 2023/09/05 09:24:08 VmOptions aspect finished
INFO: 2023/09/05 09:24:08 Repair utility finished execution.
Is the error still here? [y/n]
y

At this point, I run idea.sh and the dialog error show again. I respond “y” again:

Let's try to restore default settings as a last troubleshooting step? [y/n]
y
INFO: 2023/09/05 09:24:55 Restoring default settings...
INFO: 2023/09/05 09:24:55 Configuration directory /home/luciano/.config/JetBrains/IdeaIC2023.2/ been moved to /home/luciano/.config/JetBrains/IdeaIC2023.2/.old

After it did that (restore default settings), I ran the idea.sh script and it was successful!

0

Also encountered this issue when running inside flatpak. Deleting the .lock file at `~/.var/app/com.jetbrains.IntelliJ-IDEA-Ultimate/config/JetBrains/IntelliJIdea2023.2/.lock` fixed the issue for me.

0

To fix this issue, you need to remove the .lock file in your configuration. It's in the config folder, examples for IntelliJIdea2023.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 IntelliJIdea2023.1 and IntelliJIdea2023.2. You need the latest.*

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

0

Hi,

 

I have the same issue. I'm on Fedora 38, I use official jetbrain toolbox to install intellij.

I solve the problem by removing the a lock file: 

rm ~/.config/JetBrains/IntelliJIdea2023.2/.lock

I hope i will help you

0

I had the same problem on Mac. This worked for me: /Applications/PyCharm\ CE.app/Contents/bin/repair
Just accept all options. If the problems persist and you have already used this command before (and it helped earlier), just delete this folder: /Users/<Your_user>/Library/Application Support/JetBrains/PyCharmCE2023.2.old and run the first command again

Hope this helps

0

Hi all, I found a work around, unpluging Internet connection, killing all service that belongs to intellij through command line. Then restart, internet stills unplugged. It will open the editor without problem.

0

Try to delete .lock file in config directory

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

I have tried and it run 

0

for me the solution was when it shows the process number 5.290 just to do a

 kill 5290

I assume I have it somewhere in the autorerun on startup of my IDE.

 

0

for windows you can kill the task by running TASKKILL /F /PID [the process number from the error message] in the terminal, close the error message, and reopen.

0

Deleting `.lock` file seems to do the trick.

Flatpack path: `~/.var/app/com.jetbrains.<product>/config/JetBrains/<product>/.lock`

Deb / Toolbox path: `~/.config/JetBrains/<product>/.lock`

I tend to just “shutdown” my pc without closing my running apps, I believe this might be cause of the lock file lingering.

1

I have updated Jetbrains Toolbox today and now PhpStorm refuses to start…

Cannot connect to already running IDE instance.
Exception: Process 30,049 is still running

Everything was installed by the Toolbox. Help!!!

0

Toolbox says Fleet is running and cannot be updated, but fleet is not installed…

 

0

Greg 
Could you try killing the process with the id mentioned in the error message: 30049?
Also, you can try to delete .lock file located in the IDE configuration directory.

0

Hello

There is no such process.

I tried deleting all JB products and re-installing, same thing. Also killing every java process on the system.

Everything was working fine until JB Toolbox did some upgrade…

1

Please tell me I don't have to switch to vscode in emergency… :(

0

Please sign in to leave a comment.