Deployment SFTP test fails but SSH connection succeeds

Answered

I am trying to setup a deployment connection to a remote server.

Using the credentials I have been given I can use WinSCP to transfer files. I can also start a SSH terminal in Intellij using the details I have set up for the connection in the Deployment options

However when I go to File/Settings/Deployment and Test SFTP connection it fails with a 'could not connect to server' message. I am using Username/Password authentication if it makes any difference.

0
7 comments

We need to take a look at the logs to figure out what's happening there.

Please add #com.jetbrains.plugins.webDeployment and #com.intellij.ssh to Help | Debug Log Settings, restart IDEA, try to connect to the server again and then collect the logs bundle with (Help | Compress Logs).

You can submit the logs within a support ticket as probably you wouldn't want to share them publicly. Please share the ticket ID here so that I could assign it to myself.

0

Hello, I have met a similar problem with PyCharm where a SSH terminal can successfully run to link my remote server, while the deployment failed to connect the server under SFTP. It reported "EOF while reading package". I have submitted a request on your forum to discuss this issue.

0

This also happens in version 2020.2 of pycharm.

0

See my latest bug report: the host name needs to be lower case only (both in PyCharm and your .ssh/config or similar file). Then it works and connects.

1

Andreas, yep, we are not aware that the hostname can be case-sensitive because of the SSH config: https://youtrack.jetbrains.com/issue/IDEA-241761

0

Here is log from PHPStorm:

2021-01-25 00:46:28,934 [ 33574] INFO - rationStore.ComponentStoreImpl - Saving Project(name=ghpotos-new, containerState=COMPONENT_CREATED, componentStore=/Users/sd/Workspace/projects/gphotos/runtime)XDebuggerManager took 30 ms 
2021-01-25 00:46:28,986 [ 33626] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 5596 ms 
2021-01-25 00:46:29,036 [ 33676] INFO - rationStore.ComponentStoreImpl - Saving appPluginAdvertiserExtensions took 29 ms 
2021-01-25 00:48:38,598 [ 163238] DEBUG - t.connections.RemoteConnection - Opening connection to sftp://192.168.1.8:22/ in @732d0151 
2021-01-25 00:48:38,599 [ 163239] DEBUG - ellij.ssh.SshConnectionService - Creating sftp channel within SshjSshConnection(synsay@192.168.1.8)@2c620f4b 
2021-01-25 00:48:38,616 [ 163256] INFO - .channel.direct.SessionChannel - Will request `sftp` subsystem 
2021-01-25 00:48:38,627 [ 163267] WARN - net.schmizz.concurrent.Promise - <<chan#1 / chanreq for subsystem>> woke to: net.schmizz.sshj.connection.ConnectionException: Request failed 
2021-01-25 00:48:38,628 [ 163268] WARN - t.connections.RemoteConnection - Request failed 
com.intellij.ssh.SshTransportException: Request failed
at com.intellij.ssh.impl.sshj.SshjSshConnection.openChannel(SshjSshConnection.kt:54)
at com.intellij.ssh.impl.SshConnection$openChannel$1.invoke(SshConnection.kt:68)
at com.intellij.ssh.impl.SshConnection$openChannel$1.invoke(SshConnection.kt:30)
at com.intellij.ssh.Ssh.wrapBlockingSshCall(ssh.kt:436)
at com.intellij.ssh.Ssh.wrapBlockingSshCall$default(ssh.kt:418)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:57)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:203)
at com.intellij.ssh.SshConnectionService$failSafeSftp$1.invoke(SshConnectionService.kt:214)
at com.intellij.ssh.SshConnectionService$failSafeSftp$1.invoke(SshConnectionService.kt:34)
at com.intellij.ssh.impl.channels.FailSafeSftpChannel.getHome(FailSafeSftpChannel.kt:167)
at com.jetbrains.plugins.webDeployment.connections.platform.PlatformSftpFileSystem.<init>(PlatformSftpFileSystem.java:38)
at com.jetbrains.plugins.webDeployment.connections.platform.PlatformSftpFileProvider.doCreateFileSystem(PlatformSftpFileProvider.java:112)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.tryToCreateFileSystem(AbstractOriginatingFileProvider.java:157)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:101)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:79)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:63)
at com.jetbrains.plugins.webDeployment.connections.SftpFileProviderProxy.findFile(SftpFileProviderProxy.java:74)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:715)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:647)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:262)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: net.schmizz.sshj.connection.ConnectionException: Request failed
at net.schmizz.sshj.connection.channel.AbstractChannel.gotResponse(AbstractChannel.java:405)
at net.schmizz.sshj.connection.channel.AbstractChannel.handle(AbstractChannel.java:192)
at net.schmizz.sshj.connection.ConnectionImpl.handle(ConnectionImpl.java:130)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:507)
at net.schmizz.sshj.transport.Decoder.decodeMte(Decoder.java:159)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:79)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:231)
at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
2021-01-25 00:48:38,629 [ 163269] WARN - loyment.ui.WebServerConfigForm - Connection failed 
com.jetbrains.plugins.webDeployment.CustomFileSystemException: Connection failed
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:281)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:270)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: com.intellij.ssh.SshTransportException: Request failed
at com.intellij.ssh.impl.sshj.SshjSshConnection.openChannel(SshjSshConnection.kt:54)
at com.intellij.ssh.impl.SshConnection$openChannel$1.invoke(SshConnection.kt:68)
at com.intellij.ssh.impl.SshConnection$openChannel$1.invoke(SshConnection.kt:30)
at com.intellij.ssh.Ssh.wrapBlockingSshCall(ssh.kt:436)
at com.intellij.ssh.Ssh.wrapBlockingSshCall$default(ssh.kt:418)
at com.intellij.ssh.impl.SshConnection.openChannel(SshConnection.kt:57)
at com.intellij.ssh.SshConnectionService.sftp(SshConnectionService.kt:203)
at com.intellij.ssh.SshConnectionService$failSafeSftp$1.invoke(SshConnectionService.kt:214)
at com.intellij.ssh.SshConnectionService$failSafeSftp$1.invoke(SshConnectionService.kt:34)
at com.intellij.ssh.impl.channels.FailSafeSftpChannel.getHome(FailSafeSftpChannel.kt:167)
at com.jetbrains.plugins.webDeployment.connections.platform.PlatformSftpFileSystem.<init>(PlatformSftpFileSystem.java:38)
at com.jetbrains.plugins.webDeployment.connections.platform.PlatformSftpFileProvider.doCreateFileSystem(PlatformSftpFileProvider.java:112)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.tryToCreateFileSystem(AbstractOriginatingFileProvider.java:157)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:101)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:79)
at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:63)
at com.jetbrains.plugins.webDeployment.connections.SftpFileProviderProxy.findFile(SftpFileProviderProxy.java:74)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:715)
at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:647)
at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.lambda$createConnection$0(RemoteConnectionPool.java:262)
... 11 more
Caused by: net.schmizz.sshj.connection.ConnectionException: Request failed
at net.schmizz.sshj.connection.channel.AbstractChannel.gotResponse(AbstractChannel.java:405)
at net.schmizz.sshj.connection.channel.AbstractChannel.handle(AbstractChannel.java:192)
at net.schmizz.sshj.connection.ConnectionImpl.handle(ConnectionImpl.java:130)
at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:507)
at net.schmizz.sshj.transport.Decoder.decodeMte(Decoder.java:159)
at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:79)
at net.schmizz.sshj.transport.Decoder.received(Decoder.java:231)
at net.schmizz.sshj.transport.Reader.run(Reader.java:59)
0

Please sign in to leave a comment.