- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我已经下载了 Solr 4.10.3,使用提供的设置运行服务器,我可以使用 SolrJ(v. 4.0.0)通过使用 HttpSolrServer
将文档插入其中。没有任何问题。但是当我尝试使用 CloudSolrServer
时我无法插入任何文件.我已经阅读了官方文档,并尝试了以下操作:
SolrServer solr;
String zkHostString = "localhost:9983/solr";
solr = new CloudSolrServer(zkHostString);
org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /clusterstate.json
当我尝试时出现异常
solr.add(document);
:
2015-03-31 11:00:18 INFO HttpClientUtil:102 - Creating new http client, config:
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:zookeeper.version=3.4.5-1392090, built on 09/30/2012 17:52 GMT
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:host.name=emre-ubuntu
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.version=1.8.0_25
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.vendor=Oracle Corporation
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.home=/usr/lib/jvm/java-8-oracle/jre
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.class.path=/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/home/emre/code/belga-big-content/belga-spark-modules/target/classes:/home/emre/.m2/repository/com/sun/jersey/jersey-core/1.9.1/jersey-core-1.9.1.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-client/2.4.0/hadoop-client-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-hdfs/2.4.0/hadoop-hdfs-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-app/2.4.0/hadoop-mapreduce-client-app-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-common/2.4.0/hadoop-mapreduce-client-common-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-yarn-client/2.4.0/hadoop-yarn-client-2.4.0.jar:/home/emre/.m2/repository/com/sun/jersey/jersey-client/1.9/jersey-client-1.9.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-yarn-server-common/2.4.0/hadoop-yarn-server-common-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-shuffle/2.4.0/hadoop-mapreduce-client-shuffle-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-yarn-api/2.4.0/hadoop-yarn-api-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-jobclient/2.4.0/hadoop-mapreduce-client-jobclient-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-annotations/2.4.0/hadoop-annotations-2.4.0.jar:/home/emre/.m2/repository/org/jsoup/jsoup/1.8.1/jsoup-1.8.1.jar:/home/emre/.m2/repository/commons-cli/commons-cli/1.2/commons-cli-1.2.jar:/home/emre/.m2/repository/xmlenc/xmlenc/0.52/xmlenc-0.52.jar:/home/emre/.m2/repository/commons-codec/commons-codec/1.4/commons-codec-1.4.jar:/home/emre/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/emre/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/home/emre/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/home/emre/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/home/emre/.m2/repository/com/sun/jersey/jersey-json/1.9/jersey-json-1.9.jar:/home/emre/.m2/repository/org/codehaus/jettison/jettison/1.1/jettison-1.1.jar:/home/emre/.m2/repository/com/sun/xml/bind/jaxb-impl/2.2.3-1/jaxb-impl-2.2.3-1.jar:/home/emre/.m2/repository/org/codehaus/jackson/jackson-jaxrs/1.8.3/jackson-jaxrs-1.8.3.jar:/home/emre/.m2/repository/org/codehaus/jackson/jackson-xc/1.8.3/jackson-xc-1.8.3.jar:/home/emre/.m2/repository/com/sun/jersey/jersey-server/1.9/jersey-server-1.9.jar:/home/emre/.m2/repository/asm/asm/3.1/asm-3.1.jar:/home/emre/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar:/home/emre/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/home/emre/.m2/repository/org/apache/httpcomponents/httpcore/4.1.2/httpcore-4.1.2.jar:/home/emre/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar:/home/emre/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar:/home/emre/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.8.8/jackson-core-asl-1.8.8.jar:/home/emre/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar:/home/emre/.m2/repository/com/google/protobuf/protobuf-java/2.5.0/protobuf-java-2.5.0.jar:/home/emre/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/home/emre/.m2/repository/org/apache/zookeeper/zookeeper/3.4.5/zookeeper-3.4.5.jar:/home/emre/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/home/emre/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-mapreduce-client-core/2.4.0/hadoop-mapreduce-client-core-2.4.0.jar:/home/emre/.m2/repository/org/apache/hadoop/hadoop-yarn-common/2.4.0/hadoop-yarn-common-2.4.0.jar:/home/emre/.m2/repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar:/home/emre/.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar:/home/emre/.m2/repository/javax/activation/activation/1.1/activation-1.1.jar:/home/emre/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/home/emre/.m2/repository/com/google/inject/guice/3.0/guice-3.0.jar:/home/emre/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar:/home/emre/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/home/emre/.m2/repository/com/sun/jersey/contribs/jersey-guice/1.9/jersey-guice-1.9.jar:/home/emre/.m2/repository/com/google/inject/extensions/guice-servlet/3.0/guice-servlet-3.0.jar:/home/emre/.m2/repository/io/netty/netty/3.6.2.Final/netty-3.6.2.Final.jar:/home/emre/.m2/repository/json-mapreduce/json-mapreduce/1.0-SNAPSHOT/json-mapreduce-1.0-SNAPSHOT.jar:/home/emre/.m2/repository/org/apache/avro/avro-mapred/1.7.7/avro-mapred-1.7.7.jar:/home/emre/.m2/repository/org/apache/avro/avro-ipc/1.7.7/avro-ipc-1.7.7.jar:/home/emre/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar:/home/emre/.m2/repository/org/mortbay/jetty/servlet-api/2.5-20081211/servlet-api-2.5-20081211.jar:/home/emre/.m2/repository/org/apache/avro/avro-ipc/1.7.7/avro-ipc-1.7.7-tests.jar:/home/emre/.m2/repository/org/apache/avro/avro/1.7.7/avro-1.7.7.jar:/home/emre/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/home/emre/.m2/repository/org/xerial/snappy/snappy-java/1.0.5/snappy-java-1.0.5.jar:/home/emre/.m2/repository/com/google/guava/guava/16.0/guava-16.0.jar:/home/emre/.m2/repository/org/slf4j/slf4j-log4j12/1.7.7/slf4j-log4j12-1.7.7.jar:/home/emre/.m2/repository/org/apache/solr/solr-solrj/4.0.0/solr-solrj-4.0.0.jar:/home/emre/.m2/repository/org/apache/httpcomponents/httpclient/4.1.3/httpclient-4.1.3.jar:/home/emre/.m2/repository/org/apache/httpcomponents/httpmime/4.1.3/httpmime-4.1.3.jar:/home/emre/.m2/repository/org/codehaus/woodstox/wstx-asl/3.2.7/wstx-asl-3.2.7.jar:/home/emre/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.5.0/jackson-databind-2.5.0.jar:/home/emre/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.5.0/jackson-annotations-2.5.0.jar:/home/emre/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.5.0/jackson-core-2.5.0.jar:/home/emre/.m2/repository/net/spy/spymemcached/2.11.6/spymemcached-2.11.6.jar:/home/emre/bin/idea-IC-139.659.2/lib/idea_rt.jar
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.library.path=/home/emre/bin/idea-IC-139.659.2/bin::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.io.tmpdir=/tmp
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:java.compiler=<NA>
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:os.name=Linux
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:os.arch=amd64
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:os.version=3.13.0-43-generic
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:user.name=emre
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:user.home=/home/emre
2015-03-31 11:00:18 INFO ZooKeeper:100 - Client environment:user.dir=/home/emre/code/belga-big-content/belga-spark-modules
2015-03-31 11:00:18 INFO ZooKeeper:438 - Initiating client connection, connectString=localhost:9983/solr sessionTimeout=10000 watcher=org.apache.solr.common.cloud.ConnectionManager@7181ae3f
2015-03-31 11:00:18 INFO ConnectionManager:156 - Waiting for client to connect to ZooKeeper
2015-03-31 11:00:18 INFO ClientCnxn:966 - Opening socket connection to server localhost/127.0.0.1:9983. Will not attempt to authenticate using SASL (unknown error)
2015-03-31 11:00:18 INFO ClientCnxn:849 - Socket connection established to localhost/127.0.0.1:9983, initiating session
2015-03-31 11:00:18 INFO ClientCnxn:1207 - Session establishment complete on server localhost/127.0.0.1:9983, sessionid = 0x14c6eeee46d0009, negotiated timeout = 10000
2015-03-31 11:00:18 INFO ConnectionManager:71 - Watcher org.apache.solr.common.cloud.ConnectionManager@7181ae3f name:ZooKeeperConnection Watcher:localhost:9983/solr got event WatchedEvent state:SyncConnected type:None path:null path:null type:None
2015-03-31 11:00:18 INFO ConnectionManager:174 - Client is connected to ZooKeeper
2015-03-31 11:00:18 INFO SolrZkClient:370 - makePath: /clusterstate.json
Exception in thread "main" org.apache.solr.common.cloud.ZooKeeperException:
at org.apache.solr.client.solrj.impl.CloudSolrServer.connect(CloudSolrServer.java:149)
at org.apache.solr.client.solrj.impl.CloudSolrServer.request(CloudSolrServer.java:165)
at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:117)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:116)
at org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:102)
at be.belga.bigcontent.util.SolrClient.addNewsItem(SolrClient.java:183)
at be.belga.bigcontent.util.SolrClient.main(SolrClient.java:198)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
Caused by: org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /clusterstate.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$10.execute(SolrZkClient.java:399)
at org.apache.solr.common.cloud.ZkCmdExecutor.retryOperation(ZkCmdExecutor.java:63)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:396)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:353)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:340)
at org.apache.solr.common.cloud.SolrZkClient.makePath(SolrZkClient.java:327)
at org.apache.solr.common.cloud.ZkCmdExecutor.ensureExists(ZkCmdExecutor.java:94)
at org.apache.solr.common.cloud.ZkCmdExecutor.ensureExists(ZkCmdExecutor.java:84)
at org.apache.solr.common.cloud.ZkStateReader.createClusterStateWatchersAndUpdate(ZkStateReader.java:176)
at org.apache.solr.client.solrj.impl.CloudSolrServer.connect(CloudSolrServer.java:142)
... 11 more
$ solr start -e cloud -noprompt -a "-Dsolr.clustering.enabled=true"
Welcome to the SolrCloud example!
Starting up 2 Solr nodes for your example SolrCloud cluster.
Starting up SolrCloud node1 on port 8983 using command:
solr start -cloud -d node1 -p 8983 -a -Dsolr.clustering.enabled=true
Waiting to see Solr listening on port 8983 [\]
Started Solr server on port 8983 (pid=3623). Happy searching!
Starting node2 on port 7574 using command:
solr start -cloud -d node2 -p 7574 -z localhost:9983 -a -Dsolr.clustering.enabled=true
Waiting to see Solr listening on port 7574 [\]
Started Solr server on port 7574 (pid=3855). Happy searching!
Deploying default Solr configuration files to embedded ZooKeeper using command:
/home/emre/bin/solr-4.10.3/example/scripts/cloud-scripts/zkcli.sh -zkhost localhost:9983 -cmd upconfig -confdir /home/emre/bin/solr-4.10.3/example/solr/collection1/conf -confname default
Successfully deployed the /home/emre/bin/solr-4.10.3/example/solr/collection1/conf configuration directory to ZooKeeper as default
Creating new collection gettingstarted with 2 shards and replication factor 2 using Collections API command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=gettingstarted&replicationFactor=2&numShards=2&collection.configName=default&maxShardsPerNode=2&wt=json&indent=2
For more information about the Collections API, please see: https://cwiki.apache.org/confluence/display/solr/Collections+API
{
"responseHeader":{
"status":400,
"QTime":61},
"Operation createcollection caused exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: collection already exists: gettingstarted",
"exception":{
"msg":"collection already exists: gettingstarted",
"rspCode":400},
"error":{
"msg":"collection already exists: gettingstarted",
"code":400}}
SolrCloud example running, please visit http://localhost:8983/solr
最佳答案
显然这是的问题SolrJ 版本,zkHostString
的值,并使用 CloudSolrServer 类。
当我切换到 SolrJ 4.10.3 并使用以下部分时:
CloudSolrServer solr
String zkHostString = "localhost:9983";
solr = new CloudSolrServer(zkHostString);
solr.setDefaultCollection("collection1");
关于solr - 为什么我在使用 SolrJ 和 SolrCloud 时会得到 "KeeperErrorCode = NoNode for/clusterstate.json"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29364871/
在 C# 及其同类语言中,我们总是使用 public string SomeString { get; set;} 但是你也可以使用(我最近才发现这个,而且是在和编译器闲逛的时候发现的) public
我已经为 Controller 中的函数编写了 Swagger 注释,但在生成 swagger-ui 代码时出现错误。以下是我的注释代码 /*** End of Annotation For dele
我正在 PHP 中开发一项服务,该服务使用 exec 函数调用 jar 文件,如下所示: $text = "string with accents á, ó, ú or العربية"; exec(
我正在尝试了解有关在程序中利用/防止缓冲区溢出的方法的更多信息。我知道如果大小是恒定的,下面的代码很容易受到攻击,但是如果大小每次都是随机的怎么办?是否还有办法从堆栈中获取它并以某种方式动态改变溢出字
对于一项学校作业,我应该制作一个可以以小时、分钟和秒为单位存储时间的时间类。一切正常,但仅声明 get 时属性总是返回 0;并设置; private int seconds, minutes, hou
我正在遍历一些测验对象并将结果存储到json变量中。出现"ReferenceError is not defined"错误,不确定原因。 JS代码 // This function will send
使用 Nifi 的 PutDatabaseRecord 处理器在 MySQL 中插入阿拉伯字符(非拉丁语)时,字符被“??????”替换 插入后,阿拉伯字符串被替换为??????。我已经使用 utf8
谁能告诉我为什么 gets(abc) 使用 char[] 而不是使用 int? int abc; char name[] = "lolrofl"; printf("Hello %s.\n",na
为什么在使用 as.POSIXct 转换下面的时间戳时得到所有 NA? > head(tmp$timestamp_utc) [1] Fri Jul 03 00:15:00 EDT 2015 Fri J
def get_submultiples(n): # Get all submultiples of n if n == 1: return [1] i = 2
有没有办法访问基本模型的实际 child ,意思是:继续使用 django Docs 中的示例,让我们假设我正在建模不同的外卖餐厅,它们只是有共同点 姓名 都有deliver方法 至此: class
我正在寻找一个范围的总和,但我总是得到“未定义”。我相信有些东西出现在错误的位置,但我不确定它是什么。 第 1 部分:“编写一个范围函数,它接受两个参数(start 和 end),并返回一个包含从 s
我已将 spring 版本从 4.2.3 更新到 5.0.2,并将安全性从 5.0.1 更新到 5.0.10 并使用 spring -flex版本1.6.0.RC1。 像这样使用 BlazeDS 依赖
我可以输入但在输出中,我得到的结果为零。我使用两门类(class),一门是主要的,是日志,另一门是成绩计算。在成绩计算器中,我编写了方法和构造函数,在日志中,类通过构造函数调用这些方法。 import
我在使用 go 时遇到了构建问题。我想知道这是编译器中的错误还是代码的问题。 // removed the error handling for sake of clarity file, _ :=
我的角色在与盒子互动时出现问题。我有一个 GameObject Player 附加了一个脚本来与游戏中的盒子交互,脚本是: using UnityEngine; using System.Collec
有谁知道为什么我不能在下面生成百分比 codeIshere (第 97-117 行)? var format=d3.format(".1%"); var percent = format(functi
我正在尝试编写图像识别代码,以针对不同动物图像训练系统,这就是代码。我使用 anaconda 作为解释器,使用pycharm作为环境。 import tensorflow as tf import o
我正在尝试在 Java 中初始化 Matcher,但无论字符串是否已初始化且不为 null,都会继续获取 NPE。 这是代码: pattern.compile("\\s"); System.out.p
所以我有这段代码: ; (function (g) { var d = document, i, am = d.createElement('script'), h = d.head || d.g
我是一名优秀的程序员,十分优秀!