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

Sentry thrift API protocol version mismatch

Contributor

hi:

 

CDH5.5.1 impala+sentry,thirft api protocol versoin mismatch,catalog service can not been started:

Error initialializing Catalog. Please run 'invalidate metadata'
Java exception follows:
com.cloudera.impala.catalog.CatalogException: Error updating authorization policy: 
	at com.cloudera.impala.catalog.CatalogServiceCatalog.reset(CatalogServiceCatalog.java:359)
	at com.cloudera.impala.service.JniCatalog.<init>(JniCatalog.java:94)
Caused by: com.cloudera.impala.common.ImpalaRuntimeException: Error refreshing authorization policy, current policy state may be inconsistent. Running 'invalidate metadata' may resolve this problem: 
	at com.cloudera.impala.util.SentryProxy.refresh(SentryProxy.java:306)
	at com.cloudera.impala.catalog.CatalogServiceCatalog.reset(CatalogServiceCatalog.java:357)
	... 1 more
Caused by: java.util.concurrent.ExecutionException: java.lang.AssertionError: Sentry thrift API protocol version mismatch: Client thrift version is: 1 , server thrift verion is 2. Server Stacktrace: org.apache.sentry.provider.db.SentryThriftAPIMismatchException: Sentry thrift API protocol version mismatch: Client thrift version is: 1 , server thrift verion is 2
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.validateClientVersion(SentryPolicyStoreProcessor.java:856)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.list_sentry_roles_by_group(SentryPolicyStoreProcessor.java:515)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_roles_by_group.getResult(SentryPolicyService.java:1013)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_roles_by_group.getResult(SentryPolicyService.java:998)
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
	at org.apache.sentry.provider.db.service.thrift.SentryProcessorWrapper.process(SentryProcessorWrapper.java:35)
	at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
	at com.cloudera.impala.util.SentryProxy.refresh(SentryProxy.java:302)
	... 2 more
Caused by: java.lang.AssertionError: Sentry thrift API protocol version mismatch: Client thrift version is: 1 , server thrift verion is 2. Server Stacktrace: org.apache.sentry.provider.db.SentryThriftAPIMismatchException: Sentry thrift API protocol version mismatch: Client thrift version is: 1 , server thrift verion is 2
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.validateClientVersion(SentryPolicyStoreProcessor.java:856)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyStoreProcessor.list_sentry_roles_by_group(SentryPolicyStoreProcessor.java:515)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_roles_by_group.getResult(SentryPolicyService.java:1013)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyService$Processor$list_sentry_roles_by_group.getResult(SentryPolicyService.java:998)
	at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39)
	at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39)
	at org.apache.sentry.provider.db.service.thrift.SentryProcessorWrapper.process(SentryProcessorWrapper.java:35)
	at org.apache.thrift.TMultiplexedProcessor.process(TMultiplexedProcessor.java:123)
	at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:285)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

	at org.apache.sentry.service.thrift.Status.throwIfNotOk(Status.java:110)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClientDefaultImpl.listRolesByGroupName(SentryPolicyServiceClientDefaultImpl.java:231)
	at org.apache.sentry.provider.db.service.thrift.SentryPolicyServiceClientDefaultImpl.listRoles(SentryPolicyServiceClientDefaultImpl.java:274)
	at com.cloudera.impala.util.SentryPolicyService.listAllRoles(SentryPolicyService.java:335)
	at com.cloudera.impala.util.SentryProxy$PolicyReader.run(SentryProxy.java:104)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

Regards,

 

Rube

1 ACCEPTED SOLUTION

Accepted Solutions

Contributor
I have solved this problem.
I install impala-kudu sentry-provider-common-1.4.0-cdh5.5.0-SNAPSHOT.jar,and this mismatch cdh5.5.1's sentry.

rube

View solution in original post

4 REPLIES 4

Cloudera Employee

What version of sentry are you running? Do you have some stray jars somewhere in the classpath that Catalog can be picking up?

Contributor
sentry-core-common-1.5.1-cdh5.5.1.jar
The test environment and the producting environment have the same problem.

Contributor
I have solved this problem.
I install impala-kudu sentry-provider-common-1.4.0-cdh5.5.0-SNAPSHOT.jar,and this mismatch cdh5.5.1's sentry.

rube

View solution in original post

New Contributor


I want to ask where to find the document of sentry API .

I try to read the source code of sentry,however ,I can’t get the point .

I don’t know how to call the apache sentry API for priviledge in my app.

who can help me?