You shouldn't have to do the linkconfig to see the configs in the ZK
tree, and it should appear virtually instantaneously. A couple of
possibilities:

1> your browser is caching the view somehow (unlikely).
2> your Solr instance isn't pointing to the same ZK your upconfig
command is pointing to. This is easy to do if you start your Solr with
the bin scripts like 'bin/solr -c' start as that invokes the embedded
zookeeper, not the external ensemble, you have to use the -z option
for that (the -c option is unnecessary if you specify -z)

And the first form of your CREATE command is what's required, i.e.
"collection.configName=scbe_public7"
not
"collection.configName=/configs/scbe_public7"

Don't worry about the linkconfig, create or anything else until you
can see your configs in the tree view.

Best,
Erick

On Tue, Dec 1, 2015 at 1:53 PM, Kelly, Frank <frank.ke...@here.com> wrote:
> Thanks - the only thing under cloud/tree tab for /configs is mycollection
>
> But I am pretty sure my zookeeper config upload is working fine
>
> ./server/scripts/cloud-scripts/zkcli.sh -cmd upconfig -confdir
> ./server/solr/configsets/scbe_public7_config -confname scbe_public7 -z
> zk.zk.zk.zk:2181
> ./server/scripts/cloud-scripts/zkcli.sh -cmd linkconfig -collection
> scbe_public7 -confname scbe_public7 -z zk.zk.zk.zk:2181
>
> At least no errors were reported . . .
>
> I just re-ran the same commands and gave it a few minutes but I still
> don¹t see the ³scbe_public7² config under /configs?
>
> -Frank
>
>
> On 12/1/15, 4:16 PM, "Upayavira" <u...@odoko.co.uk> wrote:
>
>>Check via the admin UI - cloud/tree tab. Check inside the config
>>directory that you are attempting to use to see if there is a
>>solrconfig.xml and a schema file. I've sometimes uploaded it such that
>>there's a conf directory inside - i.e. one layer too deep.
>>
>>This is gonna be something trivial, I bet you!
>>
>>Upayavira
>>
>>On Tue, Dec 1, 2015, at 08:04 PM, Kelly, Frank wrote:
>>> Context: Solr 5.3.1 with ZooKeeper 3.4.6 (SolrCloud)
>>>
>>> Via the REST APU I am trying to create a collection  and tie it to a
>>> configuration I have loaded into ZooKeeper
>>>
>>> Here are the configs loaded into ZooKeeper
>>>
>>> [zk: localhost:2181(CONNECTED) 5] ls /configs
>>> [scbe_public7, mycollection, scbe_public_conf]
>>>
>>> Here is my Curl command with scbe_public7 as the configName
>>>
>>> $ curl -X -v
>>>
>>>"http://XX.XX.XX.XX:8983/solr/admin/collections?action=CREATE&name=tmp2&n
>>>umShards=3&replicationFactor=2&maxShardsPerNode=1&collection.configName=s
>>>cbe_public7"
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <response>
>>> <lst name="responseHeader"><int name="status">400</int><int
>>> name="QTime">28</int></lst><str name="Operation create caused
>>>
>>>exception:">org.apache.solr.common.SolrException:org.apache.solr.common.S
>>>olrException:
>>> Can not find the specified config set: scbe_public7</str><lst
>>> name="exception"><str name="msg">Can not find the specified config set:
>>> scbe_public7</str><int name="rspCode">400</int></lst><lst
>>> name="error"><str name="msg">Can not find the specified config set:
>>> scbe_public7</str><int name="code">400</int></lst>
>>> </response>
>>>
>>> And if I try the following I get
>>>
>>> $ curl -X -v
>>>
>>>"http://XX.XX.XX.XX:8983/solr/admin/collections?action=CREATE&name=tmp2&n
>>>umShards=3&replicationFactor=2&maxShardsPerNode=1&collection.configName=/
>>>configs/scbe_public7"
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <response>
>>> <lst name="responseHeader"><int name="status">500</int><int
>>> name="QTime">29</int></lst><str name="Operation create caused
>>>
>>>exception:">java.lang.IllegalArgumentException:java.lang.IllegalArgumentE
>>>xception:
>>> Invalid path string "/configs//configs/scbe_public7" caused by empty
>>>node
>>> name specified @9</str><lst name="exception"><str name="msg">Invalid
>>>path
>>> string "/configs//configs/scbe_public7" caused by empty node name
>>> specified @9</str><int name="rspCode">-1</int></lst><lst
>>> name="error"><str name="msg">Invalid path string
>>> "/configs//configs/scbe_public7" caused by empty node name specified
>>> @9</str><str name="trace">org.apache.solr.common.SolrException: Invalid
>>> path string "/configs//configs/scbe_public7" caused by empty node name
>>> specified
>>>
>>> Interestingly it will let me create WITHOUT specifying the config
>>>
>>>  curl -X -v
>>>
>>>"http://XX.XX.XX.XX:8983/solr/admin/collections?action=CREATE&name=tmp2&n
>>>umShards=3&replicationFactor=2&maxShardsPerNode=1"
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <response>
>>> <lst name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2699</int></lst><lst name="success"><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2042</int></lst><str
>>> name="core">tmp2_shard3_replica1</str></lst><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2066</int></lst><str
>>> name="core">tmp2_shard1_replica1</str></lst><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2088</int></lst><str
>>> name="core">tmp2_shard2_replica2</str></lst><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2485</int></lst><str
>>> name="core">tmp2_shard3_replica2</str></lst><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2531</int></lst><str
>>> name="core">tmp2_shard1_replica2</str></lst><lst><lst
>>> name="responseHeader"><int name="status">0</int><int
>>> name="QTime">2554</int></lst><str
>>> name="core">tmp2_shard2_replica1</str></lst></lst>
>>> </response>
>>>
>>> And it will be tied to (from CLUSTERSTATUS)
>>> "configName": "mycollection"
>>>
>>> This does not match the Documentation which states
>>>
>>>https://cwiki.apache.org/confluence/display/solr/Collections+API#Collecti
>>>onsAPI-api1
>>>
>>> collection.configName "Defines the name of the configurations (which
>>>must
>>> already be stored in ZooKeeper) to use for this collection. If not
>>> provided, Solr will default to the collection name as the configuration
>>> name.²
>>>
>>> So I am confused on two things
>>>
>>>   1.  Why doesn¹t Solr see the ZooKeeper config I specified (or
>>>   alternatively, is my syntax for the configName incorrect?)
>>>   2.  When the config is not specified why does it default to
>>>   ³mycollection" and not to the collection name (and thus cause an error
>>>   because ¹tmp2¹ is not a config )
>>>
>>> Thanks!
>>>
>>> -Frank
>>>
>>> Frank Kelly
>>> Principal Software Engineer
>>> Predictive Analytics Team (SCBE/HAC/CDA)
>>>
>>>
>>>
>>>
>>> Email:
>>>
>>>f<mailto:frank.ke...@here.com>r<mailto:frank.ke...@here.com>ank.kelly@her
>>>e.com<mailto:frank.ke...@here.com>
>>> Website: http://www.here.com<http://www.here.com/>
>>>
>>>
>>>
>>>
>>> 5 Wayside Rd, Burlington, MA 01803, USA
>>> Here, a Nokia business
>>>
>>>
>>>
>>>
>>>
>

Reply via email to