Hbase Shell startup error: [ERROR] Terminal initialization failed; falling back to unsupported

After starting hbase, I found that the hbase shell started to report an error:

version 2.0.0-alpha4, r5c4b985f89c99cc8b0f8515a4097c811a0848835, Tue Oct 31 16:00:33 PDT 2017
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
    at jline.TerminalFactory.create(TerminalFactory.java:101)
    at jline.TerminalFactory.get(TerminalFactory.java:159)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:438)
    at org.jruby.javasupport.JavaMethod.invokeStaticDirect(JavaMethod.java:360)
    at org.jruby.java.invokers.StaticMethodInvoker.call(StaticMethodInvoker.java:40)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:339)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:77)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:339)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:77)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:328)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:141)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:145)
    at org.jruby.RubyClass.newInstance(RubyClass.java:994)
    at org.jruby.RubyClass$INVOKER$i$newInstance.call(RubyClass$INVOKER$i$newInstance.gen)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:339)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:77)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:339)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:109)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:95)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:428)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:355)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:109)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:95)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:298)
    at org.jruby.runtime.callsite.CachingCallSite.callBlock(CachingCallSite.java:79)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:83)
    at org.jruby.ir.instructions.CallBase.interpret(CallBase.java:428)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:355)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:83)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:179)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:165)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:200)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:338)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:163)
    at org.jruby.ir.interpreter.InterpreterEngine.processCall(InterpreterEngine.java:314)
    at org.jruby.ir.interpreter.StartupInterpreterEngine.interpret(StartupInterpreterEngine.java:73)
    at org.jruby.ir.interpreter.InterpreterEngine.interpret(InterpreterEngine.java:77)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.INTERPRET_METHOD(MixedModeIRMethod.java:144)
    at org.jruby.internal.runtime.methods.MixedModeIRMethod.call(MixedModeIRMethod.java:130)
    at org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:192)
    at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:318)
    at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:131)
    at usr.java.hbase_minus_2_dot_0_dot_0_minus_alpha4.bin.hirb.invokeOther148:print_banner(/usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:175)
    at usr.java.hbase_minus_2_dot_0_dot_0_minus_alpha4.bin.hirb.RUBY$script(/usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:175)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at org.jruby.ir.Compiler$1.load(Compiler.java:95)
    at org.jruby.Ruby.runScript(Ruby.java:827)
    at org.jruby.Ruby.runNormally(Ruby.java:746)
    at org.jruby.Ruby.runNormally(Ruby.java:764)
    at org.jruby.Ruby.runFromMain(Ruby.java:577)
    at org.jruby.Main.doRunFromMain(Main.java:417)
    at org.jruby.Main.internalRun(Main.java:305)
    at org.jruby.Main.run(Main.java:232)
    at org.jruby.Main.main(Main.java:204)

Took 0.0120 seconds
Unhandled Java exception: java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
                     <init> at jline/console/ConsoleReader.java:228
                     <init> at jline/console/ConsoleReader.java:219
                     <init> at jline/console/ConsoleReader.java:207
               initReadline at org/jruby/ext/readline/Readline.java:105
      getHolderWithReadline at org/jruby/ext/readline/Readline.java:143
                 s_readline at org/jruby/ext/readline/Readline.java:169
                       call at org/jruby/ext/readline/Readline$INVOKER$s$s_readline.gen:-1
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:358
                       call at org/jruby/runtime/callsite/CachingCallSite.java:195
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:323
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
            INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:132
            commonYieldPath at org/jruby/runtime/MixedModeIRBlockBody.java:148
              yieldSpecific at org/jruby/runtime/IRBlockBody.java:84
              yieldSpecific at org/jruby/runtime/Block.java:134
              yieldSpecific at org/jruby/ir/runtime/IRRuntimeHelpers.java:419
                  interpret at org/jruby/ir/instructions/YieldInstr.java:74
             processOtherOp at org/jruby/ir/interpreter/StartupInterpreterEngine.java:187
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:111
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:83
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:179
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:165
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:348
                  callBlock at org/jruby/runtime/callsite/CachingCallSite.java:173
                       call at org/jruby/runtime/callsite/CachingCallSite.java:177
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:332
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
            INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:132
            commonYieldPath at org/jruby/runtime/MixedModeIRBlockBody.java:148
                       call at org/jruby/runtime/IRBlockBody.java:73
                       call at org/jruby/runtime/Block.java:124
                       call at org/jruby/RubyProc.java:289
                     call19 at org/jruby/RubyProc.java:273
                       call at org/jruby/RubyProc$INVOKER$i$0$0$call19.gen:-1
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:196
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:83
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:179
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:165
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:200
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:338
                       call at org/jruby/runtime/callsite/CachingCallSite.java:163
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:314
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:83
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:179
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:165
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:200
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:338
                       call at org/jruby/runtime/callsite/CachingCallSite.java:163
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:314
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:339
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
            INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:132
            commonYieldPath at org/jruby/runtime/MixedModeIRBlockBody.java:148
              yieldSpecific at org/jruby/runtime/IRBlockBody.java:84
              yieldSpecific at org/jruby/runtime/Block.java:134
                       loop at org/jruby/RubyKernel.java:1298
                       call at org/jruby/RubyKernel$INVOKER$s$0$0$loop.gen:-1
                       call at org/jruby/internal/runtime/methods/JavaMethod.java:498
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:298
                  callBlock at org/jruby/runtime/callsite/CachingCallSite.java:79
                       call at org/jruby/runtime/callsite/CachingCallSite.java:83
                  interpret at org/jruby/ir/instructions/CallBase.java:428
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:355
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
            INTERPRET_BLOCK at org/jruby/ir/interpreter/Interpreter.java:132
            commonYieldPath at org/jruby/runtime/MixedModeIRBlockBody.java:148
                    doYield at org/jruby/runtime/IRBlockBody.java:186
                      yield at org/jruby/runtime/BlockBody.java:116
                      yield at org/jruby/runtime/Block.java:165
                      enter at org/jruby/RubyContinuation.java:107
            rbCatch19Common at org/jruby/RubyKernel.java:1127
                  rbCatch19 at org/jruby/RubyKernel.java:1120
                       call at org/jruby/RubyKernel$INVOKER$s$rbCatch19.gen:-1
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:348
                  callBlock at org/jruby/runtime/callsite/CachingCallSite.java:173
                       call at org/jruby/runtime/callsite/CachingCallSite.java:177
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:332
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:109
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:95
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:298
                  callBlock at org/jruby/runtime/callsite/CachingCallSite.java:79
                       call at org/jruby/runtime/callsite/CachingCallSite.java:83
                  interpret at org/jruby/ir/instructions/CallBase.java:428
                processCall at org/jruby/ir/interpreter/InterpreterEngine.java:355
                  interpret at org/jruby/ir/interpreter/StartupInterpreterEngine.java:73
                  interpret at org/jruby/ir/interpreter/InterpreterEngine.java:77
           INTERPRET_METHOD at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:144
                       call at org/jruby/internal/runtime/methods/MixedModeIRMethod.java:130
                       call at org/jruby/internal/runtime/methods/DynamicMethod.java:192
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
  invokeOther153:eval_input at usr/java/hbase_minus_2_dot_0_dot_0_minus_alpha4/bin//usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:199
             block in start at /usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:199
                yieldDirect at org/jruby/runtime/CompiledIRBlockBody.java:156
                      yield at org/jruby/runtime/BlockBody.java:114
                      yield at org/jruby/runtime/Block.java:165
                      enter at org/jruby/RubyContinuation.java:107
            rbCatch19Common at org/jruby/RubyKernel.java:1127
                  rbCatch19 at org/jruby/RubyKernel.java:1120
                       call at org/jruby/RubyKernel$INVOKER$s$rbCatch19.gen:-1
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:348
                  callBlock at org/jruby/runtime/callsite/CachingCallSite.java:173
                       call at org/jruby/runtime/callsite/CachingCallSite.java:177
       invokeOther195:catch at usr/java/hbase_minus_2_dot_0_dot_0_minus_alpha4/bin//usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:198
                      start at /usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:198
                       call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:77
                       call at org/jruby/internal/runtime/methods/CompiledIRMethod.java:152
               cacheAndCall at org/jruby/runtime/callsite/CachingCallSite.java:318
                       call at org/jruby/runtime/callsite/CachingCallSite.java:131
       invokeOther198:start at usr/java/hbase_minus_2_dot_0_dot_0_minus_alpha4/bin//usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:204
                     <main> at /usr/java/hbase-2.0.0-alpha4/bin/hirb.rb:204
        invokeWithArguments at java/lang/invoke/MethodHandle.java:627
                       load at org/jruby/ir/Compiler.java:95
                  runScript at org/jruby/Ruby.java:827
                runNormally at org/jruby/Ruby.java:746
                runNormally at org/jruby/Ruby.java:764
                runFromMain at org/jruby/Ruby.java:577
              doRunFromMain at org/jruby/Main.java:417
                internalRun at org/jruby/Main.java:305
                        run at org/jruby/Main.java:232
                       main at org/jruby/Main.java:204

Reason: /usr/java/hadoop-2.6.5/share/hadoop/yarn/lib/jline-0.9.94.jar version is lower

Solution: 

rm -rf  /usr/java/hadoop-2.6.5/share/hadoop/yarn/lib/jline-0.9.94.jar

cp /usr/java/apache-hive-2.1.1-bin/lib/jline-2.12.jar /usr/java/hadoop-2.6.5/share/hadoop/yarn/lib/


Read More:

Leave a Reply

Your email address will not be published. Required fields are marked *