hbase shell: TypeError:不能接收NilClass

时间:2021-02-05 20:40:41

I'm getting this strange error when trying to launch hbase shell. I'm using CDH5.

我在尝试发射hbase外壳时遇到了这个奇怪的错误。我用CDH5。

# hbase shell
TypeError: can't dup NilClass
         dup at org/jruby/RubyKernel.java:1940
  initialize at file:/usr/lib/hbase/lib/jruby-complete-1.6.8.jar!/META-INF/jruby.home/lib/ruby/1.8/pathname.rb:212
      (root) at /usr/lib/hbase/bin/../bin/hirb.rb:41

Has it occurred to anyone? How can I resolve this?

有人想到过吗?我如何解决这个问题?

1 个解决方案

#1


1  

I faced a similar exception. The reason was because, my older version of hbase was actually pointed in the path. so when I type hbase shell, the older hbase was invoked. I corrected my environment variables properly and pointed it to new hbase, then it was working fine. So yours will be also similar issue.

我也遇到过类似的例外。原因是,我的旧版本的hbase实际上是指向路径的。所以当我输入hbase shell时,旧的hbase被调用。我正确地修正了我的环境变量,并将它指向新的hbase,然后它运行良好。所以你的问题也会是相似的。

export HBASE_HOME=<add the proper path to hbase-dir>
export PATH=$HBASE_HOME/bin:$PATH

This worked for me.

这为我工作。

#1


1  

I faced a similar exception. The reason was because, my older version of hbase was actually pointed in the path. so when I type hbase shell, the older hbase was invoked. I corrected my environment variables properly and pointed it to new hbase, then it was working fine. So yours will be also similar issue.

我也遇到过类似的例外。原因是,我的旧版本的hbase实际上是指向路径的。所以当我输入hbase shell时,旧的hbase被调用。我正确地修正了我的环境变量,并将它指向新的hbase,然后它运行良好。所以你的问题也会是相似的。

export HBASE_HOME=<add the proper path to hbase-dir>
export PATH=$HBASE_HOME/bin:$PATH

This worked for me.

这为我工作。