Check if you are using remote metastore with hiveserver2. There are some issues with that configuration, and as a result embedded metastore is reccomended with HiveServer2.
Start hiveserver2 with the command : hiveserver2 -hiveconf hive.metastore.uris=’ ‘
(put a space between the quotes in value of metastore.uris above)
To verify the final configuration that HS2 is using, you can run “set <variablename>” from beeline.
eg -
> set hive.metastore.uris