Couldn't connect to console process. Process finished with exit code -1

已回答

The above error is given when trying to use a remote interpreter. I can use to "tools -> start ssh session" without any problems.  My ssh connection is key-based. 

5
Avatar
Permanently deleted user

oh!. This is a critical feature. Hope it will get fixed soon.

5
Avatar
Permanently deleted user

How many years has this been open with no action? It's a paid feature of PyCharm Professional.

After fighting with problems with the documentation and incorrect assumptions made about a Python environment when installing the helpers causing failures, a week of effort to get PyCharm Professional running is leaving a very bad taste in my mouth, even with as much as we all enjoy IntelliJ 

10
Avatar
Permanently deleted user

This is still a problem. Any update on this?

5
Avatar
Permanently deleted user

Still a problem in Pycharm Professional 2018.1...

2
Avatar
Permanently deleted user

We paid for Pycharm Professional only for this feature and it is not working!? is there any solution for this?

2
Avatar
Permanently deleted user

In case somebody still needs a solution:
go to (settings - build - console - python console) and set "working directory" box to your working area directory, this worked on my Windows

0
Avatar
Permanently deleted user

Unfortunately this did not seem to work on linux @Shady. It is a real shame this is not working yet..

0

@S1259008

Are you using the latest PyCharm version? Do you get exactly this error "Couldn't connect to console process. Process finished with exit code -1" ?

It would be nice if you do the following:

1. Add the following lines into Help > Debug log settings:

#com.intellij.ssh
#com.jetbrains.plugins.webDeployment

2. Reproduce the issue, gather logs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files), and upload the to our FTP at https://uploads.services.jetbrains.com/

Afterwards please let me know the file name you had uploaded.

0

@Andrey Resler

 

For me the problem replicates. The issue is most probably related to the fact that I am on DirectAccess VPN and for some unknown reason it chooses to go through ipv6. Remote debugging remote launching is working fine but remote console doesn't. Here are the logs:

2019-06-12 22:30:51,010 [ 521818] INFO - plots.PySciEnvironmentProvider - Plots on port: 51043
2019-06-12 22:30:51,019 [ 521827] INFO - plugins.remotesdk.RemoteUpload - Uploading helpers to /someorganization/someuser/.pycharm_helpers
2019-06-12 22:30:51,020 [ 521828] DEBUG - ellij.ssh.SshConnectionService - Creating sftp channel within SSH session @292d687c to someuser@someserver:22
2019-06-12 22:30:51,343 [ 522151] INFO - plugins.remotesdk.RemoteUpload - Remote helpers version is PY-191.7479.30, local helpers version is PY-191.7479.30
2019-06-12 22:30:51,400 [ 522208] DEBUG - ellij.ssh.SshConnectionService - Creating sftp channel within SSH session @292d687c to someuser@someserver:22
2019-06-12 22:30:51,501 [ 522309] DEBUG - ellij.ssh.SshConnectionService - Executing SSH command: cd /someorganization/someuser/tmp/pycharm_project_94; exec env "JETBRAINS_REMOTE_RUN"="1" "PYCHARM_MATPLOTLIB_INTERACTIVE"="true" "PYDEVD_LOAD_VALUES_ASYNC"="True" "PYTHONPATH"="/someorganization/someuser/tmp/pycharm_project_94:/someorganization/someuser/.pycharm_helpers/pycharm_matplotlib_backend:/someorganization/someuser/.pycharm_helpers/pycharm_display:/someorganization/someuser/.pycharm_helpers/third_party/thriftpy:/someorganization/someuser/.pycharm_helpers/pydev" "PYTHONIOENCODING"="UTF-8" "PYCHARM_DISPLAY_PORT"="51043" "IPYTHONENABLE"="True" "PYCHARM_MATPLOTLIB_INDEX"="0" "PYCHARM_HOSTED"="1" "PYTHONUNBUFFERED"="1" '/dat/jsim/.anaconda/20170421/bin/python' '-u' '/someorganization/someuser/.pycharm_helpers/pydev/pydevconsole.py' '--mode=server' within SSH session @292d687c to someuser@someserver:22
2019-06-12 22:30:54,591 [ 525399] DEBUG - #com.intellij.ssh.SshSession - Adding local tunnel 62199 => localhost:36972 for SSH session @292d687c to someuser@someserver:22
2019-06-12 22:30:57,502 [ 528310] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 46 ms

0

@Lobanov Sergey

Are you running the latest version of PyCharm?

If you're getting the same error "Process finished with exit code -1", that just means that connection to pydevd server wasn't successful, and in most cases it implicates network issues. I suggest the following test:

1. Run pydevd server manually. Open your log and copy the execution command. From your log above it would be:

cd /someorganization/someuser/tmp/pycharm_project_94; exec env "JETBRAINS_REMOTE_RUN"="1" "PYCHARM_MATPLOTLIB_INTERACTIVE"="true" "PYDEVD_LOAD_VALUES_ASYNC"="True" "PYTHONPATH"="/someorganization/someuser/tmp/pycharm_project_94:/someorganization/someuser/.pycharm_helpers/pycharm_matplotlib_backend:/someorganization/someuser/.pycharm_helpers/pycharm_display:/someorganization/someuser/.pycharm_helpers/third_party/thriftpy:/someorganization/someuser/.pycharm_helpers/pydev" "PYTHONIOENCODING"="UTF-8" "PYCHARM_DISPLAY_PORT"="51043" "IPYTHONENABLE"="True" "PYCHARM_MATPLOTLIB_INDEX"="0" "PYCHARM_HOSTED"="1" "PYTHONUNBUFFERED"="1" '/dat/jsim/.anaconda/20170421/bin/python' '-u' '/someorganization/someuser/.pycharm_helpers/pydev/pydevconsole.py' '--mode=server'

 

2. This will start the server and show you the assigned port. Then, create SSH tunnel between your workstation and the remote host to that port, confirm the port is listening locally with nenstat, and test connection with `telnet localhost <tunneled_port>`.

 

This is basically what PyCharm does, so if this works, python console in PyCharm should also work. If, however, the test works, but the console does not, please submit a ticket to our issue tracker: https://youtrack.jetbrains.com/issues/PY

Describe the test that was done and provide information about version, OS, and logs (https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files)

0

Still bugs on Version 2019.2.6(192.7142.79, Feb 2020). It happens after I run dozens of codes. I have to restart PyCharm to make it work again...

0

请先登录再写评论。