Configure hive server2 authentication and beeline password-less link hive data warehouse
Use the beeline link to report an error after starting the hive server2 service
Beeline >! connect jdbc:hive2://localhost:10000
Connecting to jdbc:hive2://localhost:10000
Enter username for jdbc:hive2://localhost:10000: hadoop
Enter password for jdbc:hive2://localhost:10000: * *
19-03-01 22:01:59 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: Failed to open new session: java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException (org.apache.hadoop.security.authorize.AuthorizationException): User: hadoop is not allowed to impersonate hadoop (state=08S01,code=0)
Problem location:
Reason: hiveserver2 has added permission control, which needs to be configured in the configuration file of hadoop
Solution:
Add the following configuration content to the core-site.xml configuration file of hadoop
Hadoop.proxyuser.hadoop.hosts
Hadoop.proxyuser.hadoop.groups
Then restart hadoop.
Official website description link:
Https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-common/Superusers.html
A screenshot from the official
Login Test:
It can be seen that the login was successful
Test an existing library