Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9BE5B1935B for ; Tue, 5 Apr 2016 09:06:26 +0000 (UTC) Received: (qmail 10967 invoked by uid 500); 5 Apr 2016 09:06:26 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 10894 invoked by uid 500); 5 Apr 2016 09:06:26 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 10593 invoked by uid 99); 5 Apr 2016 09:06:26 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Apr 2016 09:06:26 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id B756E2C1F62 for ; Tue, 5 Apr 2016 09:06:25 +0000 (UTC) Date: Tue, 5 Apr 2016 09:06:25 +0000 (UTC) From: "Sean Cho (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11774) listStatus in FTPFileSystem fails with connection reset MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15225933#comment-15225933 ] Sean Cho commented on HADOOP-11774: ----------------------------------- Hi, after investigation and tests, we figured out that some configurations in FTPFIleSystem class in hadoop common project were hard-coded. The code is as follows. client.setFileTransferMode(FTP.BLOCK_TRANSFER_MODE); client.setFileType(FTP.BINARY_FILE_TYPE); client.setBufferSize(DEFAULT_BUFFER_SIZE); According to RFP documentation(https://tools.ietf.org/html/rfc959), there are three transfer mode for FTP generally.(Stream, Block, Compressed) However, IIS FTP server does not support BLOCK_TRANSFER_MODE apparently, and it gives a connection reset error when you run a command after another. I think it is more reasonable to allow user to configure these. I can commit the change to this if no one else has already worked on this. Any comments? > listStatus in FTPFileSystem fails with connection reset > ------------------------------------------------------- > > Key: HADOOP-11774 > URL: https://issues.apache.org/jira/browse/HADOOP-11774 > Project: Hadoop Common > Issue Type: Bug > Components: fs > Affects Versions: 2.3.0 > Environment: Remote FTP located in Windows NT FTP > Reporter: Krishnamoorthy Dharmalingam > > Following exception trace raised when FTPFileSystem.listStatus() called in Passive/active mode. > Caused by: java.net.SocketException: Connection reset > at java.net.SocketInputStream.read(SocketInputStream.java:196) > at java.net.SocketInputStream.read(SocketInputStream.java:122) > 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.FTP.sendCommand(FTP.java:552) > at org.apache.commons.net.ftp.FTP.sendCommand(FTP.java:601) > at org.apache.commons.net.ftp.FTP.quit(FTP.java:809) > at org.apache.commons.net.ftp.FTPClient.logout(FTPClient.java:979) > at org.apache.hadoop.fs.ftp.FTPFileSystem.disconnect(FTPFileSystem.java:151) > at org.apache.hadoop.fs.ftp.FTPFileSystem.getFileStatus(FTPFileSystem.java:395) > at org.apache.hadoop.fs.FileSystem.isFile(FileSystem.java:1424) -- This message was sent by Atlassian JIRA (v6.3.4#6332)