Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-3781

hbase shell cannot start "NoMethodError: undefined method `close' for nil:NilClass"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.90.2
    • 0.92.0
    • shell
    • None
    • windows 7, cygwin

    • Reviewed
    • resolve problem under windows for starting the hbase shell (no close method error)

    Description

      After following the instruction for installing hbase on windows with cygwin, and trying to run the hbase shell i got the following error
      NoMethodError: undefined method `close' for nil:NilClass
      initialize at C:/_servers/db/hbase/V090~1.2//bin/../lib/ruby/irb/hirb.rb:39
      start at C:_servers\db\hbase\V090~1.2\/bin/hirb.rb:171
      (root) at C:_servers\db\hbase\V090~1.2\/bin/hirb.rb:183

      After a while of investigation it seems that the error comes from the fact that "/dev/null" is not functioning as expected. When changing to "NUL" (in lib/ruby/irb/hirb.rb line 34), which is window equivalent, the shell worked ok.
      The fix
      change: f = File.open("/dev/null", "w") to f = File.open("NUL", "w")

      Attachments

        1. HBASE-3781-0.90.2.patch
          0.8 kB
          Mikael Sitruk

        Activity

          People

            Unassigned Unassigned
            mikaels Mikael Sitruk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: