Error: We get the below error sometimes while trying the hive commands or while using the database present in the repository


We can try below resolution:

  • We need to close all the running instance of Hive shell (if any) as well as terminals also.
  • execute sudo jps
  • We will see a process with the name RunJar. note down its process id. Lets say it is 5242
  • Then execute sudo kill 5242
  • Now execute sudo hive

Please find the screenshot for the same.

After following the above steps we can start the hive shell or can use any of the database present in the repository.