我无法将security.json上传到zookeeper,zkcli会抛出异常 -
Exception in thread "main" org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /etc/installer/security.json
at org.apache.zookeeper.KeeperException.create(KeeperException.java:111)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.create(ZooKeeper.java:783)
at org.apache.solr.common.cloud.SolrZkClient$9.execute(SolrZkClient.java:380)
这是我的security.json:
{
"authentication":{
"class":"solr.BasicAuthPlugin",
"credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0=
Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}
},
"authorization":{
"class":"solr.RuleBasedAuthorizationPlugin",
"permissions":[{"name":"security-edit",
"role":"admin"}]
"user-role":{"solr":"admin"},
}}
将json上传到zookeeper的命令:
bash /opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:5181/lws-map -cmd put /etc/installer/security.json '{"authentication": {"class": "org.apache.solr.security.KerberosPlugin"}}'
我正在跟踪solrwiki的步骤。我错过了任何一步吗?请建议。
答案 0 :(得分:1)
尝试执行
bash /opt/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:5181/lws-map -cmd makepath /etc/installer/
然后执行put
命令