Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

HBase Shell giving error

NoMethodError: undefined method `getTerminal' for Java::Jline::Terminal:Module

refresh_width at /usr/hdp/

initialize at /usr/hdp/

(root) at /usr/hdp/


I found it required higher version of protobuf jar so I updated HBase lib by replacing to protobuf-java-3.1.0.jar from protobuf-java-2.5.0.jar, still facing same error.


Super Collaborator

Did you make any changes in the hbase classpath or any new jars added to the lib directory? It seems that you have wrong jline there.

View solution in original post


Super Collaborator

Did you make any changes in the hbase classpath or any new jars added to the lib directory? It seems that you have wrong jline there.


I did not changed hbase classpath, I just replace protobuf jar that I mentioned above

Super Collaborator

I would suggest to return back the original protobuf (there was a thread about a similar issue somewhere on the internet, but this issue is not relevant to the protobuf). And check that no new jars were added to the HBase lib directory (like phoenix-client for example).

As suggested I return back the original protobuf, but still facing same error. There is no new jar is added in /hbase/lib but we have phoenix, ranger etc jar as I installed all this by Ambari.

Super Collaborator

Can you run ls -la /usr/hdp/*.jar and attach output here?



In /usr/hdp/current/hbase-master/lib

  1. protobuf-java-3.1.0.jar -> /usr/ibmpacks/current/bigmatch/hbase/lib/protobuf-java-3.1.0.jar
  2. spark-assembly- -> /usr/ibmpacks/current/bigmatch/hbase/lib/sparkassembly-

I unlink above two and changed protobuf-java-3.1.0.jar from protobuf-java-2.5.0.jar in /hbase/lib and follow below link.

It worked for me.


NoMethodError indicates that you are not using the correct version of jar in the classpath.

This is because the "protobuf-java-2.5.0.jar" might be having some classes with different method signature and the newer jar might have different syntax of those methods so you will get errors like you are getting. [NoMethodError: undefined method `getTerminal']

Which means in the newer version of the jar "getTerminal" method seems to be removed.


In this case what should me next course of action?


Please do not try to upgrade individual JARs Major Version. Because with every major version change many APIs are changed completely, Like some methods are added new/ some methods are removed and some methods signature is changed. So i will suggest you to not to upgrade the Major version (from 2.5.0 to 3.1.0 ). Please revert back to your old jar "protobuf-java-2.5.0.jar"


For example you can refer to the following link which says that lots of methods have been removed between 2.5 and 3.0 version of Protobuf-java

You can get the details by clicking on the "Removed Methods" and "Added Methods" links


Hbase in HDP-2.5 will NOT work with protobuf-3.0. Please refrain from manually changing libraries or classpath entries of any of the HDP components.

I have HDP2.5, I changed protobuf-3.0 with default one.

Cloudera Employee

cat /etc/hbase/conf/hbase-site.xml |grep -1 hbase.tmp, please make sure chmod 777 to hbase.tmp.dir . Things should work after same.

[root@HDCLUS01-HOST6 lib]# cat /etc/hbase/conf/hbase-site.xml |grep -1 hbase.tmp








----------------------------------------------------------- As mentioned above I provide chmod 777, but my bad still getting same error

I changed jruby-complete-1.7.4.jar to jruby-complete-1.6.8 in /hbase/lib, I tried to restart HBase but not Hmaster is stopped with "Connection refused to hdclus01-host6:16000"

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.