pycharm sftp connection failed
I try to connect my host, but failed. The error log is below, how could I fix it ?
2019-03-18 16:59:09,951 [ 977209] WARN - loyment.ui.WebServerConfigForm - Could not determine the type of file "sftp://ss1.sockgo.com/".
org.apache.commons.vfs2.FileSystemException: Could not determine the type of file "sftp://ss1.sockgo.com/".
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1510)
at org.apache.commons.vfs2.provider.AbstractFileObject.isFile(AbstractFileObject.java:1695)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doListChildrenResolved(SftpFileObject.java:462)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:1148)
at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1101)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:259)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://ss1.sockgo.com/".
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:107)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.statSelf(SftpFileObject.java:177)
at org.apache.commons.vfs2.provider.sftp.SftpFileObject.doGetType(SftpFileObject.java:112)
at org.apache.commons.vfs2.provider.AbstractFileObject.getType(AbstractFileObject.java:1501)
... 11 more
Caused by: com.intellij.ssh.SshTransportException: Session.connect: java.net.ConnectException: 连接超时 (Connection timed out)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:120)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:68)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:182)
at com.jetbrains.plugins.webDeployment.connections.PatchedSftpFileSystem.getChannel(PatchedSftpFileSystem.java:57)
... 14 more
Caused by: com.jcraft.jsch.JSchException: Session.connect: java.net.ConnectException: 连接超时 (Connection timed out)
at com.jcraft.jsch.Session.connect(Session.java:565)
at com.jcraft.jsch.Session.connect(Session.java:183)
at com.intellij.ssh.impl.SshConnection.b(SshConnection.kt:142)
at com.intellij.ssh.impl.SshConnection.a(SshConnection.kt:109)
... 17 more
2019-03-18 17:00:32,914 [1060172] WARN - t.connections.RemoteConnection - Forced closing file system of sftp://ss1.sockgo.com:22/ in @5e048458
2019-03-18 17:00:32,915 [1060173] DEBUG - t.connections.RemoteConnection - File system of sftp://ss1.sockgo.com:22/ in @5e048458 is closed.
Please sign in to leave a comment.
Are you trying to configure remote interpreter and automatically create deployment for it?
Do you have problems accessing your remote host from the system terminal (outside of PyCharm)?
I am also receiving this error in my logs. For me, I was able to set up automatic deployments, and it was working just last week. But now it started giving this error, both in PhpStorm and RubyMine. I am able to access my remote host from the system terminal and also from another SFTP file transfer program, Cyberduck.
Edit: Also, using my password instead of "Key pair OpenSSH or PuTTY" to connect works just fine.
May I ask you to try recreating your remote interpreter and deployment configuration from scratch (remove existing ones and create again)?
Does it help?
If not, please add the following lines to Help | Debug Log Settings…, reproduce the problem, upload renamed idea.log from Help | Show Log in…. to https://uploads.services.jetbrains.com/ and let me know the name of that file.
Sergey,
Retrying from scratch didn't help, unfortunately. I have added those lines in the debug log settings, reproduced the problem, and I have uploaded my log file, 'jnmuhich-idea.log'. Let me know what you think.
Thanks!
Which Authentication type do you currently use?
Please check that it is saved under "Preferences | Build... | Deployment "
I am trying to use 'Key Pair...' which is what I had working last week.
Do you use any custom algorithms in ssh config?
What is your version of OpenSSH?
I am not aware of any custom algorithms in ssh config.
My OpenSSH is version 7.9p1.
Apparently it is related to https://youtrack.jetbrains.com/issue/PY-33521 since we do not yet support OpenSSH 7.8+
Try downgrading your OpenSSH
Would I just need to downgrade, or would I also need to create new ssh keys? Thanks so much for your assistance.
I have fixed my issue. The home directory on the server was set to 777 permissions. When I changed it to have 755 permissions, I was able to use the ssh key with no issue.
I was able to overcome my issue with the same error message, by configuring my SSH server to use the default port, 22. I had configured a non-default port, which doesn't seem to work for PyCharm.
Hi there!
When I try to upload changes to a remote file, it says:
could not resolve file ‘sftp://192.168.0.102’
What's wrong, please? What's the solution?
Abelardo León González Please check your Preferences/Settings | Build, Execution, Deployment | Deployment settings for host 192.168.0.102 and make sure the test connection button is working. If the issue persists, try recreating the deployment and make sure it's selected as default.
It didn't work:
Could you please reproduce the issue and provide logs from **Help | Collect Logs and Diagnostic Data** after adding the following lines to **Help | Diagnostic Tools | Debug Log Settings...**?
```
#com.intellij.ssh
#com.jetbrains.plugins.webDeployment
```
(keep the # character)
You can use uploading service at https://uploads.jetbrains.com/ , and provide upload ID in your reply.