Return-Path: X-Original-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-hdfs-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 73A981197F for ; Fri, 23 May 2014 22:48:02 +0000 (UTC) Received: (qmail 86322 invoked by uid 500); 23 May 2014 22:48:02 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 86271 invoked by uid 500); 23 May 2014 22:48:02 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 86262 invoked by uid 99); 23 May 2014 22:48:02 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 May 2014 22:48:02 +0000 Date: Fri, 23 May 2014 22:48:02 +0000 (UTC) From: "Zhongyi Xie (JIRA)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HDFS-6411) nfs-hdfs-gateway mount raises I/O error and hangs when a unauthorized user attempts to access it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDFS-6411?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14007= 818#comment-14007818 ]=20 Zhongyi Xie commented on HDFS-6411: ----------------------------------- Hi Brandon,=20 I think you missed=20 import org.apache.hadoop.ipc.RemoteException; because the patch doesn=E2=80=99t compile and complains about unable to fin= d symbol at line 494 Thanks! -Zhongyi > nfs-hdfs-gateway mount raises I/O error and hangs when a unauthorized use= r attempts to access it > -------------------------------------------------------------------------= ----------------------- > > Key: HDFS-6411 > URL: https://issues.apache.org/jira/browse/HDFS-6411 > Project: Hadoop HDFS > Issue Type: Bug > Components: nfs > Affects Versions: 2.2.0 > Reporter: Zhongyi Xie > Assignee: Brandon Li > Attachments: HDFS-6411-branch-2.2.patch, HDFS-6411.002.patch, HDF= S-6411.patch, tcpdump-HDFS-6411-Brandon.out > > > We use the nfs-hdfs gateway to expose hdfs thru nfs. > 0) login as root, run nfs-hdfs gateway as a user, say, nfsserver.=20 > [root@zhongyi-test-cluster-desktop hdfs]# ls /hdfs > backups hive mr-history system tmp user > 1) add a user nfs-test: adduser nfs-test(make sure that this user is not = a proxyuser of nfsserver > 2) switch to test user: su - nfs-test > 3) access hdfs nfs gateway > [nfs-test@zhongyi-test-cluster-desktop ~]$ ls /hdfs > ls: cannot open directory /hdfs: Input/output error > retry: > [nfs-test@zhongyi-test-cluster-desktop ~]$ ls /hdfs > ls: cannot access /hdfs: Stale NFS file handle > 4) switch back to root and access hdfs nfs gateway > [nfs-test@zhongyi-test-cluster-desktop ~]$ exit > logout > [root@zhongyi-test-cluster-desktop hdfs]# ls /hdfs > ls: cannot access /hdfs: Stale NFS file handle > the nfsserver log indicates we hit an authorization error in the rpc hand= ler; org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.autho= rize.AuthorizationException): User: nfsserver is not allowed to impersonate= nfs-test > and NFS3ERR_IO is returned, which explains why we see input/output error.= =20 > One can catch the authorizationexception and return the correct error: NF= S3ERR_ACCES to fix the error message on the client side but that doesn't se= em to solve the mount hang issue though. When the mount hang happens, it st= ops printing nfsserver log which makes it more difficult to figure out the = real cause of the hang. According to jstack and debugger, the nfsserver see= ms to be waiting for client requests -- This message was sent by Atlassian JIRA (v6.2#6252)