2
 solrctl sentry --list-roles

我正在运行上面的命令,但失败并出现以下错误。我是新来的哨兵。我在 Solr 配置中仔细检查了 sentry.service.client.server.rpc-address 的值,它具有运行 Sentry 服务的主机名的正确值。这个错误是什么意思?

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
4

1 回答 1

0

使用 CDH,solrctl sentry 命令在主机上查找哨兵配置文件(etc/sentry/conf.cloudera.sentry/sentry-site.xml 或 /etc/sentry/conf/sentry-site.xml)。此配置文件包含 sentry.service.client.server.rpc-address 以及其他配置选项,并且仅当主机在 Cloudera Manager 中具有角色 Sentry Server 或 Sentry Gateway 时才会自动部署到主机。

在大多数情况下,这意味着您需要将 Sentry Gateway 角色添加到要从中运行 solrctl sentry 命令的主机。

在 Cloudera Manager 中,转到 Sentry -> Instances -> Add Role Instances ->(选择主机)-> Ok。几分钟后,应该部署配置,您应该能够使用 solrctl sentry。

我用 CDH 5.11.1 和 kerberized Solr 对此进行了测试。

于 2017-07-17T12:53:10.877 回答