Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-6455

NFS: Exception should be added in NFS log for invalid separator in nfs.exports.allowed.hosts

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.6.0
    • Component/s: nfs
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      The error for invalid separator in dfs.nfs.exports.allowed.hosts property should be added in nfs log file instead nfs.out file.

      Steps to reproduce:
      1. Pass invalid separator in dfs.nfs.exports.allowed.hosts

      <property><name>dfs.nfs.exports.allowed.hosts</name><value>host1  ro:host2 rw</value></property>
      

      2. restart NFS server. NFS server fails to start and print exception console.

      [hrt_qa@host1 hwqe]$ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null host1 "sudo su - -c \"/usr/lib/hadoop/sbin/hadoop-daemon.sh start nfs3\" hdfs"
      starting nfs3, logging to /tmp/log/hadoop/hdfs/hadoop-hdfs-nfs3-horst1.out
      DEPRECATED: Use of this script to execute hdfs command is deprecated.
      Instead use the hdfs command for it.
      
      Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
      	at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
      	at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
      	at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
      	at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
      	at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
      	at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
      

      NFS log does not print any error message. It directly shuts down.

      STARTUP_MSG:   java = 1.6.0_31
      ************************************************************/
      2014-05-27 18:47:13,972 INFO  nfs3.Nfs3Base (SignalLogger.java:register(91)) - registered UNIX signal handlers for [TERM, HUP, INT]
      2014-05-27 18:47:14,169 INFO  nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated user map size:259
      2014-05-27 18:47:14,179 INFO  nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated group map size:73
      2014-05-27 18:47:14,192 INFO  nfs3.Nfs3Base (StringUtils.java:run(640)) - SHUTDOWN_MSG:
      /************************************************************
      SHUTDOWN_MSG: Shutting down Nfs3 at 
      

      NFS.out file has exception.

      EPRECATED: Use of this script to execute hdfs command is deprecated.
      Instead use the hdfs command for it.
      
      Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
              at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
              at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
              at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
              at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
              at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
              at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
      ulimit -a for user hdfs
      core file size          (blocks, -c) 409600
      data seg size           (kbytes, -d) unlimited
      scheduling priority             (-e) 0
      file size               (blocks, -f) unlimited
      pending signals                 (-i) 188893
      max locked memory       (kbytes, -l) unlimited
      max memory size         (kbytes, -m) unlimited
      open files                      (-n) 32768
      pipe size            (512 bytes, -p) 8
      POSIX message queues     (bytes, -q) 819200
      real-time priority              (-r) 0
      stack size              (kbytes, -s) 10240
      cpu time               (seconds, -t) unlimited
      max user processes              (-u) 65536
      virtual memory          (kbytes, -v) unlimited
      file locks                      (-x) unlimited
      
      1. HDFS-6455.patch
        3 kB
        Abhiraj Butala
      2. HDFS-6455.002.patch
        4 kB
        Abhiraj Butala

        Issue Links

          Activity

          Yesha Vora created issue -
          Yesha Vora made changes -
          Field Original Value New Value
          Description The error for invalid separator in dfs.nfs.exports.allowed.hosts property should be added in nfs log file instead nfs.out file.

          Steps to reproduce:
          1. Pass invalid separator in dfs.nfs.exports.allowed.hosts
          {noformat}
          <property><name>dfs.nfs.exports.allowed.hosts</name><value>host1 ro:host2 rw</value></property>
          {noformat}

          2. restart NFS server. NFS server fails to start and print exception console.
          {noformat}
          [hrt_qa@host1 hwqe]$ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null host1 "sudo su - -c \"/usr/lib/hadoop/sbin/hadoop-daemon.sh start nfs3\" hdfs"
          starting nfs3, logging to /tmp/log/hadoop/hdfs/hadoop-hdfs-nfs3-horst1.out
          DEPRECATED: Use of this script to execute hdfs command is deprecated.
          Instead use the hdfs command for it.

          Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
          at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
          at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
          at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
          at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
          at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
          at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
          {noformat}

          NFS log does not print any error message. It directly shuts down.
          {noformat}
          STARTUP_MSG: java = 1.6.0_31
          ************************************************************/
          2014-05-27 18:47:13,972 INFO nfs3.Nfs3Base (SignalLogger.java:register(91)) - registered UNIX signal handlers for [TERM, HUP, INT]
          2014-05-27 18:47:14,169 INFO nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated user map size:259
          2014-05-27 18:47:14,179 INFO nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated group map size:73
          2014-05-27 18:47:14,192 INFO nfs3.Nfs3Base (StringUtils.java:run(640)) - SHUTDOWN_MSG:
          /************************************************************
          SHUTDOWN_MSG: Shutting down Nfs3 at
          {noformat}

          NFS.out file has exception.
          {nofromat}
          EPRECATED: Use of this script to execute hdfs command is deprecated.
          Instead use the hdfs command for it.

          Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
                  at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
                  at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
                  at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
                  at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
                  at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
                  at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
          ulimit -a for user hdfs
          core file size (blocks, -c) 409600
          data seg size (kbytes, -d) unlimited
          scheduling priority (-e) 0
          file size (blocks, -f) unlimited
          pending signals (-i) 188893
          max locked memory (kbytes, -l) unlimited
          max memory size (kbytes, -m) unlimited
          open files (-n) 32768
          pipe size (512 bytes, -p) 8
          POSIX message queues (bytes, -q) 819200
          real-time priority (-r) 0
          stack size (kbytes, -s) 10240
          cpu time (seconds, -t) unlimited
          max user processes (-u) 65536
          virtual memory (kbytes, -v) unlimited
          file locks (-x) unlimited
          {noformat}
          The error for invalid separator in dfs.nfs.exports.allowed.hosts property should be added in nfs log file instead nfs.out file.

          Steps to reproduce:
          1. Pass invalid separator in dfs.nfs.exports.allowed.hosts
          {noformat}
          <property><name>dfs.nfs.exports.allowed.hosts</name><value>host1 ro:host2 rw</value></property>
          {noformat}

          2. restart NFS server. NFS server fails to start and print exception console.
          {noformat}
          [hrt_qa@host1 hwqe]$ ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null host1 "sudo su - -c \"/usr/lib/hadoop/sbin/hadoop-daemon.sh start nfs3\" hdfs"
          starting nfs3, logging to /tmp/log/hadoop/hdfs/hadoop-hdfs-nfs3-horst1.out
          DEPRECATED: Use of this script to execute hdfs command is deprecated.
          Instead use the hdfs command for it.

          Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
          at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
          at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
          at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
          at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
          at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
          at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
          {noformat}

          NFS log does not print any error message. It directly shuts down.
          {noformat}
          STARTUP_MSG: java = 1.6.0_31
          ************************************************************/
          2014-05-27 18:47:13,972 INFO nfs3.Nfs3Base (SignalLogger.java:register(91)) - registered UNIX signal handlers for [TERM, HUP, INT]
          2014-05-27 18:47:14,169 INFO nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated user map size:259
          2014-05-27 18:47:14,179 INFO nfs3.IdUserGroup (IdUserGroup.java:updateMapInternal(159)) - Updated group map size:73
          2014-05-27 18:47:14,192 INFO nfs3.Nfs3Base (StringUtils.java:run(640)) - SHUTDOWN_MSG:
          /************************************************************
          SHUTDOWN_MSG: Shutting down Nfs3 at
          {noformat}

          NFS.out file has exception.
          {noformat}
          EPRECATED: Use of this script to execute hdfs command is deprecated.
          Instead use the hdfs command for it.

          Exception in thread "main" java.lang.IllegalArgumentException: Incorrectly formatted line 'host1 ro:host2 rw'
                  at org.apache.hadoop.nfs.NfsExports.getMatch(NfsExports.java:356)
                  at org.apache.hadoop.nfs.NfsExports.<init>(NfsExports.java:151)
                  at org.apache.hadoop.nfs.NfsExports.getInstance(NfsExports.java:54)
                  at org.apache.hadoop.hdfs.nfs.nfs3.RpcProgramNfs3.<init>(RpcProgramNfs3.java:176)
                  at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.<init>(Nfs3.java:43)
                  at org.apache.hadoop.hdfs.nfs.nfs3.Nfs3.main(Nfs3.java:59)
          ulimit -a for user hdfs
          core file size (blocks, -c) 409600
          data seg size (kbytes, -d) unlimited
          scheduling priority (-e) 0
          file size (blocks, -f) unlimited
          pending signals (-i) 188893
          max locked memory (kbytes, -l) unlimited
          max memory size (kbytes, -m) unlimited
          open files (-n) 32768
          pipe size (512 bytes, -p) 8
          POSIX message queues (bytes, -q) 819200
          real-time priority (-r) 0
          stack size (kbytes, -s) 10240
          cpu time (seconds, -t) unlimited
          max user processes (-u) 65536
          virtual memory (kbytes, -v) unlimited
          file locks (-x) unlimited
          {noformat}
          Abhiraj Butala made changes -
          Attachment HDFS-6455.patch [ 12654201 ]
          Abhiraj Butala made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Brandon Li made changes -
          Link This issue relates to HDFS-6456 [ HDFS-6456 ]
          Abhiraj Butala made changes -
          Attachment HDFS-6455.002.patch [ 12656009 ]
          Abhiraj Butala made changes -
          Assignee Abhiraj Butala [ abutala ]
          Brandon Li made changes -
          Summary NFS: Exception should be added in NFS log for invalid separator in allowed.hosts NFS: Exception should be added in NFS log for invalid separator in nfs.exports.allowed.hosts
          Brandon Li made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Hadoop Flags Reviewed [ 10343 ]
          Resolution Fixed [ 1 ]
          Brandon Li made changes -
          Fix Version/s 2.6.0 [ 12327181 ]
          Arun C Murthy made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              Abhiraj Butala
              Reporter:
              Yesha Vora
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development