lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From HaiXin Tie <>
Subject Updated: CREATEALIAS does not work with more than one collection (Error 503: no servers hosting shard)
Date Mon, 16 Sep 2013 23:55:39 GMT
Sorry but I've fixed some typos, updated text:

Hello Solr experts,

For some strange reason, collection alias does not work in my Solr
instance when more than one collection is used. I would appreciate your

# Here is my setup, which is quite simple:
Zookeeper: 3.4.5 (used to upconfig/linkconfig collections and configs
for c1 and c2)
Solr: version 4.4.0, with two collections c1 and c2 (solr.xml included)
created using remote core API calls

# Symptoms:
1. Solr queries to each individual collection works fine:
2. CREATEALIAS name=cx for c1 or c2 alone (e.g. 1-1 mapping) works fine:
3. CREATEALIAS name=cx for c1 and c2 does not work:

     # Solr request/response to the collection alias (success):
     curl -s
     <?xml version="1.0" encoding="UTF-8"?>
     <lst name="responseHeader"><int name="status">0</int><int

     # Solr query using the alias fails with Error 503: "no servers
hosting shard"
     <response><lst name="responseHeader"><int
name="status">503</int><int name="QTime">2</int><lst name="params"><str
name="q">*:*</str></lst></lst><lst name="error"><str name="msg">no
servers hosting shard: </str><int name="code">503</int></lst></response>

# Solr logs:
3503223 [qtp724646150-11] ERROR org.apache.solr.core.SolrCore  ?
org.apache.solr.common.SolrException: no servers hosting shard:
     at java.util.concurrent.FutureTask$Sync.innerRun(
     at java.util.concurrent.FutureTask$Sync.innerRun(

3503224 [qtp724646150-11] INFO  org.apache.solr.core.SolrCore  ? [c1]
webapp=/solr path=/select params={q=*:*} status=503 QTime=2

# solr.xml
<?xml version="1.0" encoding="UTF-8" ?>
<solr persistent="true" sharedLib="lib">
   <cores host="${host:}" adminPath="/admin/cores"
hostPort="${jetty.port:}" hostContext="${hostContext:solr}">
     <core shard="shard1" instanceDir="c1/" name="c1" collection="c1"/>
     <core shard="shard1" instanceDir="c2/" name="c2" collection="c2"/>

# zookeeper alias (same from solr/cloud UI):
[zk: localhost:2181(CONNECTED) 10] get /myroot/aliases.json
cZxid = 0x110d
ctime = Fri Sep 13 17:25:18 PDT 2013
mZxid = 0x18d1
mtime = Mon Sep 16 16:31:21 PDT 2013
pZxid = 0x110d
cversion = 0
dataVersion = 19
aclVersion = 0
ephemeralOwner = 0x0
dataLength = 119
numChildren = 0

BTW, I've spent a lot of time figuring out how to make zookeeper and
solr work together. The commands are not complex, but making them work
sometimes requires a lot of digging online, to figure out missing jars
for, etc. I know a lot of things are changing since Solr 4.0,
but I really hope the Solr documentation can be better maintained, so
that people won't have to spend tons of hours figuring out simple steps
(albeit complex under the hood) like this. Thanks!



This email and any attachments may contain confidential and privileged material for the sole
use of the intended recipient. Any review, copying, or distribution of this email (or any
attachments) by others is prohibited. If you are not the intended recipient, please contact
the sender immediately and permanently delete this email and any attachments. No employee
or agent of TiVo Inc. is authorized to conclude any binding agreement on behalf of TiVo Inc.
by email. Binding agreements with TiVo Inc. may only be made by a signed written agreement.

View raw message