solr-搭建与使用过程中问题总结-链接
以下错误可以确定在CDH版本Hbase集群+Lily hbase indexer+solrCloud的环境中可以解决,有开源版本解决成功案例的请在下方评论。
1.If you see this error:
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException :Error CREATEing SolrCore 'reviews_shard1_replica1': Unable to create core: reviews_shard1_replica1 Caused by: Could not find configName for collection reviews found:null</str>
You may have forgotten to create the collection:
solrctl instancedir --create review solr_configs
2.If you see this error:
ERROR - 2013-10-10 20:01:21.383; org.apache.solr.servlet.SolrDispatchFilter; Could not start Solr. Check solr/home property and the logs ERROR - 2013-10-10 20:01:21.409; org.apache.solr.common.SolrException; null:org.apache.solr.common.SolrException: solr.xml not found in ZooKeeper at org.apache.solr.core.ConfigSolr.fromSolrHome(ConfigSolr.java:109) Server is shutting down
You might need to force Solr to reload the configuration. Beware, this might break Apache ZooKeeper and you might need to read Error #3.
solrctl init --force
3.If you see this error:
KeeperErrorCode = NoNode for /overseer/collection-queue-work</str> <str name="trace"> org.apache.zookeeper.KeeperException$NoNodeException: KeeperErrorCode = NoNode for /overseer/collection-queue-work
It probably comes from Error #2. You might need to re-upload the config and recreate the collection.
以上来自:http://blog.cloudera.com/blog/2013/11/how-to-index-and-search-data-with-hues-search-app/
4.If you see this error:
org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'xxx_shard3_replica1': Unable to create core [noc_shard3_replica1] Caused by: Permission denied: user=solr, access=WRITE, inode="/":hdfs:hadoop:drwxr-xr-x
也许是hdfs上没有创建相应文件的权限,需要赋予solr用户权限或者采取其他的措施。
(建议使用集群管理用户创建好/solr目录,然后变更用户权限给solr用户。)
5.If you see this error:
(该错误实际的没有复制下来——条件不允许)大致上说已经有indexer和hbase中的表连接 subscription 失败了。
执行命令:hbase-indexer list-indexers (最好指定一下zookeeper啦)
//显示:(红色部分是不正常的,蓝色部分是一个正常的案例)
Number of indexes: 1 nocIndexer + Lifecycle state: ACTIVE + Incremental indexing state: SUBSCRIBE_AND_CONSUME + Batch indexing state: INACTIVE + SEP subscription ID: null //SEP subscription ID: Indexer_xxxIndexer + SEP subscription timestamp: 2017-03-21T20:04:52.923+08:00 + Connection type: solr + Connection params: + solr.zk = n1.cluster:2181,n2.cluster:2181,n3.cluster:2181/solr + solr.collection = noc + Indexer config: 403 bytes, use -dump to see content + Indexer component factory: com.ngdata.hbaseindexer.conf.DefaultIndexerComponentFactory + Additional batch index CLI arguments: (none) + Default additional batch index CLI arguments: (none) + Processes + 0 running processes //4 running processes
+ 0 failed processes
这很可能是你已经对该hbase中的表已经设置过了indexer,然后,你又选择进行配置新的indexer,但之前配置的indexer和hbase中的连接信息并没有清理掉。
这种情况下(使用的zookeeper进行协调同步):
1.关闭hbase-solr-indexer服务
2.关闭solr-server服务
3.关闭hbase集群
4.清理zookeeper上和solr有关(/solr),和indexer有关(/ngdata),和hbase有关(/hbase)
5.重新启动hbase集群,solrcloud,hbase-solr-indexer服务。
6.如果可以清理hdfs上为solr创建的目录下面的与indexer配置相关的文件
7.移除之前配置的solr collection / instancedir 相关配置文件
8.重新开始配置Lily hbase indexer。
事实上这个方案适合解决大部分的在配置lily hbase indexer中的问题-生产环境慎用。