Reputation: 2745
solrctl sentry --list-roles
I am running above command but it failed with below error. I am new to Sentry. I have double checked value of sentry.service.client.server.rpc-address in Solr configuration and it has the right value of hostname where Sentry service is running. What does this error mean?
16/09/26 15:19:42 ERROR tools.SentryShellSolr: Config key sentry.service.client.server.rpc-address is required
java.lang.NullPointerException: Config key sentry.service.client.server.rpc-address is required
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:208)
at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceClientDefaultImpl.<init>(SentryGenericServiceClientDefaultImpl.java:123)
at org.apache.sentry.provider.db.generic.service.thrift.SentryGenericServiceClientFactory.create(SentryGenericServiceClientFactory.java:31)
at org.apache.sentry.provider.db.generic.tools.SentryShellSolr.run(SentryShellSolr.java:50)
at org.apache.sentry.provider.db.tools.SentryShellCommon.executeShell(SentryShellCommon.java:241)
at org.apache.sentry.provider.db.generic.tools.SentryShellSolr.main(SentryShellSolr.java:95)
The operation failed. Message: Config key sentry.service.client.server.rpc-address is required
Upvotes: 2
Views: 573
Reputation: 498
With CDH, solrctl sentry commands look for a sentry configuration file on the host (etc/sentry/conf.cloudera.sentry/sentry-site.xml or /etc/sentry/conf/sentry-site.xml). This config file contains sentry.service.client.server.rpc-address among other config options and only gets automatically deployed to the host if the host has role Sentry Server or Sentry Gateway in Cloudera Manager.
In most cases this means that you need to add the Sentry Gateway role to the host you want to run solrctl sentry commands from.
In Cloudera Manager go to Sentry -> Instances -> Add Role Instances -> (Select the host(s)) -> Ok. After a few minutes the configs should be deployed and you should be able to use solrctl sentry.
I tested this with CDH 5.11.1 and kerberized Solr.
Upvotes: 0