Thanks - I'll fix that retry count issue right now.

When you go to the admin UI and look at the zookeeper nodes, what is listed
under config? I'll add the config names found to that error message.

- Mark

On Mon, May 7, 2012 at 2:12 AM, "Trym R. Møller" <t...@sigmat.dk> wrote:

> Hi
>
> On Solr trunk I am trying to create a new core using the following code:
>        CoreAdminRequest.Create req = new CoreAdminRequest.Create();
>        req.setCoreName(shardName);
>        req.setInstanceDir(**instanceDir);
>        req.setDataDir(dataDir);
>        req.setCollection(**collectionName);
>        req.setShardId(shardId);
>        req.setConfigName(configName);
>        CommonsHttpSolrServer httpSolrServer = new CommonsHttpSolrServer("
> http://**localhost:8983/solr/ <http://localhost:8983/solr/>");
>
>        req.process(httpSolrServer);
>
> But it fails on the server with an exception, (see the stacktrace below).
> It seems as if it cannot find the config name of the collection, but I
> thought I specified it in "req.setConfigName(configName)**;"?
> Looking into code it seems like the parameter name zk is looking for is
> "configName" and the parameter name solrj (CoreAdminRequest) sets is
> "config" but I am uncertain if it is converted and if it represent the same
> thing.
>
> Furthermore when looking into svn I see that a bug must have sneaked into
> the
> /lucene/dev/trunk/solr/core/**src/java/org/apache/solr/**
> cloud/ZkController.java
> between Revision: 1296692 and Revision: 1294466
>  In the last condition:
>    int retry = 1;
>    for (; retry < 6; retry++) {
>    ...
>    }
>    if (retry == 10) {
>
> Any comments are appreciated.
>
> Best regards Trym
>
> 06-05-2012 17:15:53 org.apache.solr.common.**SolrException log
> SEVERE: org.apache.solr.common.**SolrException: Error executing default
> implementation of CREATE
>    at org.apache.solr.handler.admin.**CoreAdminHandler.**
> handleCreateAction(**CoreAdminHandler.java:401)
>    at org.apache.solr.handler.admin.**CoreAdminHandler.**
> handleRequestBody(**CoreAdminHandler.java:141)
>    at org.apache.solr.handler.**RequestHandlerBase.**handleRequest(**
> RequestHandlerBase.java:129)
>    at org.apache.solr.servlet.**SolrDispatchFilter.**handleAdminRequest(**
> SolrDispatchFilter.java:360)
>    at org.apache.solr.servlet.**SolrDispatchFilter.doFilter(**
> SolrDispatchFilter.java:173)
>    at org.mortbay.jetty.servlet.**ServletHandler$CachedChain.**
> doFilter(ServletHandler.java:**1212)
>    at org.mortbay.jetty.servlet.**ServletHandler.handle(**
> ServletHandler.java:399)
>    at org.mortbay.jetty.security.**SecurityHandler.handle(**
> SecurityHandler.java:216)
>    at org.mortbay.jetty.servlet.**SessionHandler.handle(**
> SessionHandler.java:182)
>    at org.mortbay.jetty.handler.**ContextHandler.handle(**
> ContextHandler.java:766)
>    at org.mortbay.jetty.webapp.**WebAppContext.handle(**
> WebAppContext.java:450)
>    at org.mortbay.jetty.handler.**ContextHandlerCollection.**handle(**
> ContextHandlerCollection.java:**230)
>    at org.mortbay.jetty.handler.**HandlerCollection.handle(**
> HandlerCollection.java:114)
>    at org.mortbay.jetty.handler.**HandlerWrapper.handle(**
> HandlerWrapper.java:152)
>    at org.mortbay.jetty.Server.**handle(Server.java:326)
>    at org.mortbay.jetty.**HttpConnection.handleRequest(**
> HttpConnection.java:542)
>    at org.mortbay.jetty.**HttpConnection$RequestHandler.**
> headerComplete(HttpConnection.**java:928)
>    at org.mortbay.jetty.HttpParser.**parseNext(HttpParser.java:549)
>    at org.mortbay.jetty.HttpParser.**parseAvailable(HttpParser.**java:212)
>    at org.mortbay.jetty.**HttpConnection.handle(**HttpConnection.java:404)
>    at org.mortbay.jetty.bio.**SocketConnector$Connection.**
> run(SocketConnector.java:228)
>    at org.mortbay.thread.**QueuedThreadPool$PoolThread.**
> run(QueuedThreadPool.java:582)
> Caused by: org.apache.solr.common.cloud.**ZooKeeperException: Could not
> find configName for collection myCollectionName
>    at org.apache.solr.cloud.**ZkController.getConfName(**
> ZkController.java:955)
>    at org.apache.solr.cloud.**ZkController.**createCollectionZkNode(**
> ZkController.java:873)
>    at org.apache.solr.core.**CoreContainer.create(**
> CoreContainer.java:690)
>    at org.apache.solr.handler.admin.**CoreAdminHandler.**
> handleCreateAction(**CoreAdminHandler.java:396)
>    ... 21 more
>
>
>
>
>


-- 
- Mark

http://www.lucidimagination.com

Reply via email to