2013-08-22 92 views
19

嘿,我在PHPstorm中遇到了一個與FTP連接的問題。我知道我有正確的參數,因爲它適用於其他FTP客戶端。PHPStorm FTP連接失敗

我得到的錯誤是:無法列出文件夾目錄「ftp://real-meal.com/

的端口設置爲21,因爲它應該是。我知道我有正確的用戶名/密碼。任何想法可能是什麼問題?

這裏是日誌文件:

2013-08-22 14:31:40,053 [8689769] INFO - api.vfs.impl.local.FileWatcher - Change requests:38912, filtered:15503 
2013-08-22 14:35:55,090 [8944806] INFO - api.vfs.impl.local.FileWatcher - Change requests:39936, filtered:15933 
2013-08-22 14:36:12,356 [8962072] WARN - i.remotebrowser.ServerTreeNode - Could not list the contents of folder "ftp://real-meal.com/". 
org.apache.commons.vfs2.FileSystemException: Could not list the contents of folder "ftp://real-meal.com/". 
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:926) 
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.getChildren(FtpFileObject.java:443) 
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChild(AbstractFileObject.java:1006) 
    at com.jetbrains.plugins.webDeployment.connections.RemoteConnectionPool.createConnection(RemoteConnectionPool.java:124) 
    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:434) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
    at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
    at java.lang.Thread.run(Thread.java:722) 
     at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:151) 
    Caused by: java.net.SocketTimeoutException: Read timed out 
     at java.net.SocketInputStream.$$YJP$$socketRead0(Native Method) 
     at java.net.SocketInputStream.socketRead0(SocketInputStream.java) 
     at java.net.SocketInputStream.read(SocketInputStream.java:150) 
     at java.net.Socke 

tInputStream.read(SocketInputStream.java:121) 
    at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283) 
    at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325) 
    at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177) 
    at java.io.InputStreamReader.read(InputStreamReader.java:184) 
    at java.io.BufferedReader.fill(BufferedReader.java:154) 
    at java.io.BufferedReader.read(BufferedReader.java:175) 
    at org.apache.commons.net.io.CRLFLineReader.readLine(CRLFLineReader.java:58) 
    at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:310) 
    at org.apache.commons.net.ftp.FTP.__getReply(FTP.java:290) 
    at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:479) 
    at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:718) 
    at org.apache.commons.net.ftp.FTPClient._openDataConnection_(FTPClient.java:657) 
    at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3097) 
    at org.apache.commons.net.ftp.FTPClient.initiateListParsing(FTPClient.java:3072) 
    at org.apache.commons.net.ftp.FTPClient.listFiles(FTPClient.java:2731) 
    at org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFilesInDirectory(FTPClientWrapper.java:162) 
    at org.apache.commons.vfs2.provider.ftp.FTPClientWrapper.listFiles(FTPClientWrapper.java:149) 
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doGetChildren(FtpFileObject.java:141) 
    at org.apache.commons.vfs2.provider.ftp.FtpFileObject.doListChildren(FtpFileObject.java:459) 
    at org.apache.commons.vfs2.provider.AbstractFileObject.getChildren(AbstractFileObject.java:917) 
    ... 30 more 
+0

請您可以檢查上市[這裏](http://intellij-support.jetbrains.com/entries/23403071?challenge=3qe0p5zedki8ogd)的解決方案 - 沒有任何人的幫助? – lena

+0

勾選「不檢查http連接」對我來說解決了問題 – Daria

回答

118

我只是有在PHPstorm同樣的問題。要解決它,我只需點擊高級並選擇被動模式。一旦我做到了,它就會爲我連接起來。希望能幫助到你。

+8

當然。我現在討厭我......或者也許討厭PhpStorm ..小時失利...... – insign

+1

在我的情況下,我不得不選中複選框「always use list command」,這是被動模式屏幕上的最後一個選項。 –

+1

OMG謝謝! WTF做被動模式嗎?大聲笑謝謝我正要殺人xD – Radmation

9

MauricioOtta:轉到文件 - >設置... - >部署。選擇FTP連接並點擊高級選項...按鈕。勾號被動模式然後應用並保存您的設置。由於這個問題比我想要記住的次數多,所以我對Todd的解決方案非常滿意。仍然有一些失敗的下載,但沒有那麼多!

0

對我來說,我也不得不刪除「ftp」。從ftp主機的名字 - 否則得到一個'主機找不到'的消息。最重要的是,您可能需要在Mappings選項卡上放置一個「/」作爲您的部署路徑(或適用於您自己的設置的任何內容),以便真正吸引人,並且很好。

0

我有同樣的問題。 遵循的路徑: enter image description here