Getting following error when trying to run hbase shell in OSX(version: 10.11.4):
warning: -J-Dfile.encoding=UTF-8 argument ignored (launched in same VM?)
warning: -J-XX:MaxPermSize=1024m argument ignored (launched in same VM?)
warning: -J-Xmx4096m argument ignored (launched in same VM?)
TypeError: can't convert Pathname into String require at org/jruby/RubyKernel.java:1071
require at file:/usr/local/Cellar/hbase/1.2.6/libexec/lib/jruby-complete-1.6.8.jar!/META INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36
(root) at /usr/local/Cellar/hbase/1.2.6/libexec/bin/hirb.rb:118
I installed the Hbase with brew by : brew install hbase
As given in the solution here, I also trying set PATH variables like following:
➜ ~ export HBASE_HOME=/usr/local/Cellar/hbase/1.2.6/libexec
➜ ~ export PATH=$HBASE_HOME/bin:$PATH
I also have jruby-complete-1.6.8.jar in $HBASE_HOME/lib, as stated here. But still the same error continues.
Edit 1
➜ rvm list:
rvm rubies
ruby-2.1.2 [ x86_64 ]
ruby-2.2.0 [ x86_64 ]
=* ruby-2.2.2 [ x86_64 ]
# => - current
# =* - current && default
# * - default
➜ ruby -v
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
➜ which ruby
/usr/bin/ruby
Guessing that something is wrong in rvm, I uninstalled it via: rvm remove and rvm uninstall. But still the error persists.
Edit 2
➜ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
[email protected]
Warning: Your Xcode (7.3.1) is outdated.
Please update to Xcode 8.2.1 (or delete it).
Xcode can be updated from the App Store.
Warning: Some installed formula are missing dependencies.
You should `brew install` the missing dependencies:
brew install erlang@19
Run `brew missing` for more details.
➜ brew missing
rabbitmq: erlang@19
Edit 3
What I figured out is I am able to run HBASE as a root user, so if I do following:
> Sudo su
root> export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
root> hbase shell
......It works......
So it seems, it is some permission issue, due to which not able to run normally.
brew doctor? - Thomas Ayoub10.12, I was able tobrew install hbase, made sure the links were set up withbrew link --overwrite hbaseand with no other changes, I was able to boothbase shell. Java isJava(TM) SE Runtime Environment (build 1.7.0_79-b15). I did not setHBASE_HOMEand I did not edit the path. - WattsInABox