Support Questions
Find answers, ask questions, and share your expertise

FAILED: HiveAuthzPluginException Failed to retrieve roles for hive

Expert Contributor

I am able to connect to Beeline, created a database, and use that database. But got the following error when trying to create a table. The create-table statement syntax is correct.

Connected to: Apache Hive (version
Driver: Hive JDBC (version
Beeline version by Apache Hive
0: jdbc:hive2://,data01> Create table blah blah;
Error: Error while compiling statement: FAILED: HiveAuthzPluginException Failed to retrieve roles for hive: Metastore Authorization api invocation for remote metastore is disabled in this configuration. Run commands via jdbc/odbc clients via HiveServer2 that is using embedded metastore. (state=42000,code=40000)

As far as I know, this is related to Hive Metastore, so I went to Ambari and found the following setting in Hive.

Any suggestion?


Expert Contributor

It is strange to me to see the port number is 2181. I thought the port number should be 10000. However, I tried the following command

beeline -u "jdbc:hive2://name1.iehp.local:10000"

and got the error

WARN jdbc.HiveConnection: Failed to connect to Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status. Error: Could not open client transport with JDBC Uri: jdbc:hive2:// name1.iehp.local (state=08S01,code=0)
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.