0

我似乎无法为 IntelliJ IDEA 中的部署设置 SFTP 连接。ArrayIndexOutOfBoundsException每次我尝试连接到服务器时都会得到一个。设置 FTP 服务器时,我没有收到此异常,并且一切似乎都运行良好。

服务器是可访问的,我仔细检查了我的登录详细信息......

在此处输入图像描述

有谁知道如何解决这一问题?

4

1 回答 1

4

感谢 CrazyCoder 指出idea.log文件。我只是在“事件日志”中四处寻找,它很空:-)

当我跟踪日志文件时,我发现了以下异常:

2013-05-25 16:36:37,608 [49048641]   WARN - i.remotebrowser.ServerTreeNode - Could not connect to SFTP server at "sftp://server01.local/". 
org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at "sftp://server01.local/".
    at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:108)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.getFileSystem(AbstractOriginatingFileProvider.java:102)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:80)
    at org.apache.commons.vfs2.provider.AbstractOriginatingFileProvider.findFile(AbstractOriginatingFileProvider.java:64)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:698)
    at org.apache.commons.vfs2.impl.DefaultFileSystemManager.resolveFile(DefaultFileSystemManager.java:624)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:121)
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionManager.openConnection(RemoteConnectionManager.java:122)
    at com.jetbrains.plugins.webDeployment.ui.remotebrowser.ServerTreeContext.getConnection(ServerTreeContext.java:83)
    at com.jetbrains.plugins.webDeployment.ui.remotebrowser.ServerTreeNode.computeFile(ServerTreeNode.java:266)
    at com.jetbrains.plugins.webDeployment.ui.remotebrowser.ServerTreeNode.getChildren(ServerTreeNode.java:132)
    at com.intellij.ui.treeStructure.SimpleTreeStructure.getChildElements(SimpleTreeStructure.java:25)
    at com.intellij.ide.util.treeView.AbstractTreeUi$31.run(AbstractTreeUi.java:1618)
    at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1824)
    at com.intellij.ide.util.treeView.AbstractTreeUi.getChildrenFor(AbstractTreeUi.java:1615)
    at com.intellij.ide.util.treeView.AbstractTreeUi.access$4600(AbstractTreeUi.java:60)
    at com.intellij.ide.util.treeView.AbstractTreeUi$46.run(AbstractTreeUi.java:2702)
    at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1824)
    at com.intellij.ide.util.treeView.AbstractTreeUi.access$2400(AbstractTreeUi.java:60)
    at com.intellij.ide.util.treeView.AbstractTreeUi$57$1.run(AbstractTreeUi.java:3379)
    at com.jetbrains.plugins.webDeployment.ui.remotebrowser.WebServerTreeBuilder.runBackgroundLoading(WebServerTreeBuilder.java:90)
    at com.intellij.ide.util.treeView.AbstractTreeUi$57.run(AbstractTreeUi.java:3370)
    at com.intellij.ide.util.treeView.AbstractTreeUi.execute(AbstractTreeUi.java:1824)
    at com.intellij.ide.util.treeView.AbstractTreeUi.access$2400(AbstractTreeUi.java:60)
    at com.intellij.ide.util.treeView.AbstractTreeUi$58.run(AbstractTreeUi.java:3435)
    at com.intellij.util.concurrency.WorkerThread.run(WorkerThread.java:108)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:680)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)
Caused by: org.apache.commons.vfs2.FileSystemException: Error during processing known-hosts file "/Users/Robert/.ssh/known_hosts".
    at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:126)
    at org.apache.commons.vfs2.provider.sftp.SftpFileProvider.doCreateFileSystem(SftpFileProvider.java:97)
    ... 33 more
Caused by: com.jcraft.jsch.JSchException: java.lang.ArrayIndexOutOfBoundsException
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:171)
    at com.jcraft.jsch.KnownHosts.setKnownHosts(KnownHosts.java:60)
    at com.jcraft.jsch.JSch.setKnownHosts(JSch.java:269)
    at org.apache.commons.vfs2.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:122)
    ... 34 more
Caused by: java.lang.ArrayIndexOutOfBoundsException

known_hosts我的文件 ( )似乎有问题Error during processing known-hosts file "/Users/Robert/.ssh/known_hosts"。我备份并删除了它,现在一切似乎都工作正常。我只需要查看哪一行是时髦的,因为sshsftp实用程序在终端内工作得很好,不要抱怨我的known_hosts文件。

希望这对其他有同样错误的人来说很方便。

于 2013-05-25T14:45:06.807 回答