在solr 4.3中启用基本身份验证

时间:2016-06-16 17:52:59

标签: java apache tomcat solr jetty

我正在关注solr 4.3中启用基本身份验证的链接。

https://lucidworks.com/blog/2015/08/17/securing-solr-basic-auth-permission-rules/

当我通过

上传 security.json 到ZooKeeper时
scripts/cloud-scripts/zkcli.sh -zkhost localhost:8983 -cmd putfile /security.json security.json

但收到以下错误:


    WARN  - 2016-06-16 23:19:28.798; org.apache.zookeeper.ClientCnxn$SendThread; Session 0x0 for server localhost/127.0.0.1:8983, unexpected error, closing socket connection and attempting reconnect
    java.io.IOException: Packet len1213486160 is out of range!
        at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79)
        at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366)
        at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)

任何人都可以帮忙解决这个问题。

1 个答案:

答案 0 :(得分:0)

我认为问题是您正在使用端口号8983这是您的主机端口。 Solr在hostPort + 1000上运行Zookeeper,因此在您的情况下,端口号将是localhost:9983